google_cloud_dataplex_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 iam_v1;
25extern crate lazy_static;
26extern crate location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
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/// Environment represents a user-visible compute infrastructure for analytics
42/// within a lake.
43#[derive(Clone, Default, PartialEq)]
44#[non_exhaustive]
45pub struct Environment {
46    /// Output only. The relative resource name of the environment, of the form:
47    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
48    pub name: std::string::String,
49
50    /// Optional. User friendly display name.
51    pub display_name: std::string::String,
52
53    /// Output only. System generated globally unique ID for the environment. This
54    /// ID will be different if the environment is deleted and re-created with the
55    /// same name.
56    pub uid: std::string::String,
57
58    /// Output only. Environment creation time.
59    pub create_time: std::option::Option<wkt::Timestamp>,
60
61    /// Output only. The time when the environment was last updated.
62    pub update_time: std::option::Option<wkt::Timestamp>,
63
64    /// Optional. User defined labels for the environment.
65    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
66
67    /// Optional. Description of the environment.
68    pub description: std::string::String,
69
70    /// Output only. Current state of the environment.
71    pub state: crate::model::State,
72
73    /// Required. Infrastructure specification for the Environment.
74    pub infrastructure_spec: std::option::Option<crate::model::environment::InfrastructureSpec>,
75
76    /// Optional. Configuration for sessions created for this environment.
77    pub session_spec: std::option::Option<crate::model::environment::SessionSpec>,
78
79    /// Output only. Status of sessions created for this environment.
80    pub session_status: std::option::Option<crate::model::environment::SessionStatus>,
81
82    /// Output only. URI Endpoints to access sessions associated with the
83    /// Environment.
84    pub endpoints: std::option::Option<crate::model::environment::Endpoints>,
85
86    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
87}
88
89impl Environment {
90    pub fn new() -> Self {
91        std::default::Default::default()
92    }
93
94    /// Sets the value of [name][crate::model::Environment::name].
95    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96        self.name = v.into();
97        self
98    }
99
100    /// Sets the value of [display_name][crate::model::Environment::display_name].
101    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102        self.display_name = v.into();
103        self
104    }
105
106    /// Sets the value of [uid][crate::model::Environment::uid].
107    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108        self.uid = v.into();
109        self
110    }
111
112    /// Sets the value of [create_time][crate::model::Environment::create_time].
113    pub fn set_create_time<T>(mut self, v: T) -> Self
114    where
115        T: std::convert::Into<wkt::Timestamp>,
116    {
117        self.create_time = std::option::Option::Some(v.into());
118        self
119    }
120
121    /// Sets or clears the value of [create_time][crate::model::Environment::create_time].
122    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
123    where
124        T: std::convert::Into<wkt::Timestamp>,
125    {
126        self.create_time = v.map(|x| x.into());
127        self
128    }
129
130    /// Sets the value of [update_time][crate::model::Environment::update_time].
131    pub fn set_update_time<T>(mut self, v: T) -> Self
132    where
133        T: std::convert::Into<wkt::Timestamp>,
134    {
135        self.update_time = std::option::Option::Some(v.into());
136        self
137    }
138
139    /// Sets or clears the value of [update_time][crate::model::Environment::update_time].
140    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
141    where
142        T: std::convert::Into<wkt::Timestamp>,
143    {
144        self.update_time = v.map(|x| x.into());
145        self
146    }
147
148    /// Sets the value of [labels][crate::model::Environment::labels].
149    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
150    where
151        T: std::iter::IntoIterator<Item = (K, V)>,
152        K: std::convert::Into<std::string::String>,
153        V: std::convert::Into<std::string::String>,
154    {
155        use std::iter::Iterator;
156        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
157        self
158    }
159
160    /// Sets the value of [description][crate::model::Environment::description].
161    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
162        self.description = v.into();
163        self
164    }
165
166    /// Sets the value of [state][crate::model::Environment::state].
167    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
168        self.state = v.into();
169        self
170    }
171
172    /// Sets the value of [infrastructure_spec][crate::model::Environment::infrastructure_spec].
173    pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
174    where
175        T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
176    {
177        self.infrastructure_spec = std::option::Option::Some(v.into());
178        self
179    }
180
181    /// Sets or clears the value of [infrastructure_spec][crate::model::Environment::infrastructure_spec].
182    pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
183    where
184        T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
185    {
186        self.infrastructure_spec = v.map(|x| x.into());
187        self
188    }
189
190    /// Sets the value of [session_spec][crate::model::Environment::session_spec].
191    pub fn set_session_spec<T>(mut self, v: T) -> Self
192    where
193        T: std::convert::Into<crate::model::environment::SessionSpec>,
194    {
195        self.session_spec = std::option::Option::Some(v.into());
196        self
197    }
198
199    /// Sets or clears the value of [session_spec][crate::model::Environment::session_spec].
200    pub fn set_or_clear_session_spec<T>(mut self, v: std::option::Option<T>) -> Self
201    where
202        T: std::convert::Into<crate::model::environment::SessionSpec>,
203    {
204        self.session_spec = v.map(|x| x.into());
205        self
206    }
207
208    /// Sets the value of [session_status][crate::model::Environment::session_status].
209    pub fn set_session_status<T>(mut self, v: T) -> Self
210    where
211        T: std::convert::Into<crate::model::environment::SessionStatus>,
212    {
213        self.session_status = std::option::Option::Some(v.into());
214        self
215    }
216
217    /// Sets or clears the value of [session_status][crate::model::Environment::session_status].
218    pub fn set_or_clear_session_status<T>(mut self, v: std::option::Option<T>) -> Self
219    where
220        T: std::convert::Into<crate::model::environment::SessionStatus>,
221    {
222        self.session_status = v.map(|x| x.into());
223        self
224    }
225
226    /// Sets the value of [endpoints][crate::model::Environment::endpoints].
227    pub fn set_endpoints<T>(mut self, v: T) -> Self
228    where
229        T: std::convert::Into<crate::model::environment::Endpoints>,
230    {
231        self.endpoints = std::option::Option::Some(v.into());
232        self
233    }
234
235    /// Sets or clears the value of [endpoints][crate::model::Environment::endpoints].
236    pub fn set_or_clear_endpoints<T>(mut self, v: std::option::Option<T>) -> Self
237    where
238        T: std::convert::Into<crate::model::environment::Endpoints>,
239    {
240        self.endpoints = v.map(|x| x.into());
241        self
242    }
243}
244
245impl wkt::message::Message for Environment {
246    fn typename() -> &'static str {
247        "type.googleapis.com/google.cloud.dataplex.v1.Environment"
248    }
249}
250
251/// Defines additional types related to [Environment].
252pub mod environment {
253    #[allow(unused_imports)]
254    use super::*;
255
256    /// Configuration for the underlying infrastructure used to run workloads.
257    #[derive(Clone, Default, PartialEq)]
258    #[non_exhaustive]
259    pub struct InfrastructureSpec {
260        /// Hardware config
261        pub resources:
262            std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
263
264        /// Software config
265        pub runtime: std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
266
267        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
268    }
269
270    impl InfrastructureSpec {
271        pub fn new() -> Self {
272            std::default::Default::default()
273        }
274
275        /// Sets the value of [resources][crate::model::environment::InfrastructureSpec::resources].
276        ///
277        /// Note that all the setters affecting `resources` are mutually
278        /// exclusive.
279        pub fn set_resources<
280            T: std::convert::Into<
281                    std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
282                >,
283        >(
284            mut self,
285            v: T,
286        ) -> Self {
287            self.resources = v.into();
288            self
289        }
290
291        /// The value of [resources][crate::model::environment::InfrastructureSpec::resources]
292        /// if it holds a `Compute`, `None` if the field is not set or
293        /// holds a different branch.
294        pub fn compute(
295            &self,
296        ) -> std::option::Option<
297            &std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
298        > {
299            #[allow(unreachable_patterns)]
300            self.resources.as_ref().and_then(|v| match v {
301                crate::model::environment::infrastructure_spec::Resources::Compute(v) => {
302                    std::option::Option::Some(v)
303                }
304                _ => std::option::Option::None,
305            })
306        }
307
308        /// Sets the value of [resources][crate::model::environment::InfrastructureSpec::resources]
309        /// to hold a `Compute`.
310        ///
311        /// Note that all the setters affecting `resources` are
312        /// mutually exclusive.
313        pub fn set_compute<
314            T: std::convert::Into<
315                    std::boxed::Box<
316                        crate::model::environment::infrastructure_spec::ComputeResources,
317                    >,
318                >,
319        >(
320            mut self,
321            v: T,
322        ) -> Self {
323            self.resources = std::option::Option::Some(
324                crate::model::environment::infrastructure_spec::Resources::Compute(v.into()),
325            );
326            self
327        }
328
329        /// Sets the value of [runtime][crate::model::environment::InfrastructureSpec::runtime].
330        ///
331        /// Note that all the setters affecting `runtime` are mutually
332        /// exclusive.
333        pub fn set_runtime<
334            T: std::convert::Into<
335                    std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
336                >,
337        >(
338            mut self,
339            v: T,
340        ) -> Self {
341            self.runtime = v.into();
342            self
343        }
344
345        /// The value of [runtime][crate::model::environment::InfrastructureSpec::runtime]
346        /// if it holds a `OsImage`, `None` if the field is not set or
347        /// holds a different branch.
348        pub fn os_image(
349            &self,
350        ) -> std::option::Option<
351            &std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
352        > {
353            #[allow(unreachable_patterns)]
354            self.runtime.as_ref().and_then(|v| match v {
355                crate::model::environment::infrastructure_spec::Runtime::OsImage(v) => {
356                    std::option::Option::Some(v)
357                }
358                _ => std::option::Option::None,
359            })
360        }
361
362        /// Sets the value of [runtime][crate::model::environment::InfrastructureSpec::runtime]
363        /// to hold a `OsImage`.
364        ///
365        /// Note that all the setters affecting `runtime` are
366        /// mutually exclusive.
367        pub fn set_os_image<
368            T: std::convert::Into<
369                    std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
370                >,
371        >(
372            mut self,
373            v: T,
374        ) -> Self {
375            self.runtime = std::option::Option::Some(
376                crate::model::environment::infrastructure_spec::Runtime::OsImage(v.into()),
377            );
378            self
379        }
380    }
381
382    impl wkt::message::Message for InfrastructureSpec {
383        fn typename() -> &'static str {
384            "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec"
385        }
386    }
387
388    /// Defines additional types related to [InfrastructureSpec].
389    pub mod infrastructure_spec {
390        #[allow(unused_imports)]
391        use super::*;
392
393        /// Compute resources associated with the analyze interactive workloads.
394        #[derive(Clone, Default, PartialEq)]
395        #[non_exhaustive]
396        pub struct ComputeResources {
397            /// Optional. Size in GB of the disk. Default is 100 GB.
398            pub disk_size_gb: i32,
399
400            /// Optional. Total number of nodes in the sessions created for this
401            /// environment.
402            pub node_count: i32,
403
404            /// Optional. Max configurable nodes.
405            /// If max_node_count > node_count, then auto-scaling is enabled.
406            pub max_node_count: i32,
407
408            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
409        }
410
411        impl ComputeResources {
412            pub fn new() -> Self {
413                std::default::Default::default()
414            }
415
416            /// Sets the value of [disk_size_gb][crate::model::environment::infrastructure_spec::ComputeResources::disk_size_gb].
417            pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
418                self.disk_size_gb = v.into();
419                self
420            }
421
422            /// Sets the value of [node_count][crate::model::environment::infrastructure_spec::ComputeResources::node_count].
423            pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
424                self.node_count = v.into();
425                self
426            }
427
428            /// Sets the value of [max_node_count][crate::model::environment::infrastructure_spec::ComputeResources::max_node_count].
429            pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
430                self.max_node_count = v.into();
431                self
432            }
433        }
434
435        impl wkt::message::Message for ComputeResources {
436            fn typename() -> &'static str {
437                "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources"
438            }
439        }
440
441        /// Software Runtime Configuration to run Analyze.
442        #[derive(Clone, Default, PartialEq)]
443        #[non_exhaustive]
444        pub struct OsImageRuntime {
445            /// Required. Dataplex Universal Catalog Image version.
446            pub image_version: std::string::String,
447
448            /// Optional. List of Java jars to be included in the runtime environment.
449            /// Valid input includes Cloud Storage URIs to Jar binaries.
450            /// For example, gs://bucket-name/my/path/to/file.jar
451            pub java_libraries: std::vec::Vec<std::string::String>,
452
453            /// Optional. A list of python packages to be installed.
454            /// Valid formats include Cloud Storage URI to a PIP installable library.
455            /// For example, gs://bucket-name/my/path/to/lib.tar.gz
456            pub python_packages: std::vec::Vec<std::string::String>,
457
458            /// Optional. Spark properties to provide configuration for use in sessions
459            /// created for this environment. The properties to set on daemon config
460            /// files. Property keys are specified in `prefix:property` format. The
461            /// prefix must be "spark".
462            pub properties: std::collections::HashMap<std::string::String, std::string::String>,
463
464            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
465        }
466
467        impl OsImageRuntime {
468            pub fn new() -> Self {
469                std::default::Default::default()
470            }
471
472            /// Sets the value of [image_version][crate::model::environment::infrastructure_spec::OsImageRuntime::image_version].
473            pub fn set_image_version<T: std::convert::Into<std::string::String>>(
474                mut self,
475                v: T,
476            ) -> Self {
477                self.image_version = v.into();
478                self
479            }
480
481            /// Sets the value of [java_libraries][crate::model::environment::infrastructure_spec::OsImageRuntime::java_libraries].
482            pub fn set_java_libraries<T, V>(mut self, v: T) -> Self
483            where
484                T: std::iter::IntoIterator<Item = V>,
485                V: std::convert::Into<std::string::String>,
486            {
487                use std::iter::Iterator;
488                self.java_libraries = v.into_iter().map(|i| i.into()).collect();
489                self
490            }
491
492            /// Sets the value of [python_packages][crate::model::environment::infrastructure_spec::OsImageRuntime::python_packages].
493            pub fn set_python_packages<T, V>(mut self, v: T) -> Self
494            where
495                T: std::iter::IntoIterator<Item = V>,
496                V: std::convert::Into<std::string::String>,
497            {
498                use std::iter::Iterator;
499                self.python_packages = v.into_iter().map(|i| i.into()).collect();
500                self
501            }
502
503            /// Sets the value of [properties][crate::model::environment::infrastructure_spec::OsImageRuntime::properties].
504            pub fn set_properties<T, K, V>(mut self, v: T) -> Self
505            where
506                T: std::iter::IntoIterator<Item = (K, V)>,
507                K: std::convert::Into<std::string::String>,
508                V: std::convert::Into<std::string::String>,
509            {
510                use std::iter::Iterator;
511                self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
512                self
513            }
514        }
515
516        impl wkt::message::Message for OsImageRuntime {
517            fn typename() -> &'static str {
518                "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime"
519            }
520        }
521
522        /// Hardware config
523        #[derive(Clone, Debug, PartialEq)]
524        #[non_exhaustive]
525        pub enum Resources {
526            /// Optional. Compute resources needed for analyze interactive workloads.
527            Compute(
528                std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
529            ),
530        }
531
532        /// Software config
533        #[derive(Clone, Debug, PartialEq)]
534        #[non_exhaustive]
535        pub enum Runtime {
536            /// Required. Software Runtime Configuration for analyze interactive
537            /// workloads.
538            OsImage(
539                std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
540            ),
541        }
542    }
543
544    /// Configuration for sessions created for this environment.
545    #[derive(Clone, Default, PartialEq)]
546    #[non_exhaustive]
547    pub struct SessionSpec {
548        /// Optional. The idle time configuration of the session. The session will be
549        /// auto-terminated at the end of this period.
550        pub max_idle_duration: std::option::Option<wkt::Duration>,
551
552        /// Optional. If True, this causes sessions to be pre-created and available
553        /// for faster startup to enable interactive exploration use-cases. This
554        /// defaults to False to avoid additional billed charges. These can only be
555        /// set to True for the environment with name set to "default", and with
556        /// default configuration.
557        pub enable_fast_startup: bool,
558
559        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
560    }
561
562    impl SessionSpec {
563        pub fn new() -> Self {
564            std::default::Default::default()
565        }
566
567        /// Sets the value of [max_idle_duration][crate::model::environment::SessionSpec::max_idle_duration].
568        pub fn set_max_idle_duration<T>(mut self, v: T) -> Self
569        where
570            T: std::convert::Into<wkt::Duration>,
571        {
572            self.max_idle_duration = std::option::Option::Some(v.into());
573            self
574        }
575
576        /// Sets or clears the value of [max_idle_duration][crate::model::environment::SessionSpec::max_idle_duration].
577        pub fn set_or_clear_max_idle_duration<T>(mut self, v: std::option::Option<T>) -> Self
578        where
579            T: std::convert::Into<wkt::Duration>,
580        {
581            self.max_idle_duration = v.map(|x| x.into());
582            self
583        }
584
585        /// Sets the value of [enable_fast_startup][crate::model::environment::SessionSpec::enable_fast_startup].
586        pub fn set_enable_fast_startup<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
587            self.enable_fast_startup = v.into();
588            self
589        }
590    }
591
592    impl wkt::message::Message for SessionSpec {
593        fn typename() -> &'static str {
594            "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionSpec"
595        }
596    }
597
598    /// Status of sessions created for this environment.
599    #[derive(Clone, Default, PartialEq)]
600    #[non_exhaustive]
601    pub struct SessionStatus {
602        /// Output only. Queries over sessions to mark whether the environment is
603        /// currently active or not
604        pub active: bool,
605
606        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
607    }
608
609    impl SessionStatus {
610        pub fn new() -> Self {
611            std::default::Default::default()
612        }
613
614        /// Sets the value of [active][crate::model::environment::SessionStatus::active].
615        pub fn set_active<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
616            self.active = v.into();
617            self
618        }
619    }
620
621    impl wkt::message::Message for SessionStatus {
622        fn typename() -> &'static str {
623            "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionStatus"
624        }
625    }
626
627    /// URI Endpoints to access sessions associated with the Environment.
628    #[derive(Clone, Default, PartialEq)]
629    #[non_exhaustive]
630    pub struct Endpoints {
631        /// Output only. URI to serve notebook APIs
632        pub notebooks: std::string::String,
633
634        /// Output only. URI to serve SQL APIs
635        pub sql: std::string::String,
636
637        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
638    }
639
640    impl Endpoints {
641        pub fn new() -> Self {
642            std::default::Default::default()
643        }
644
645        /// Sets the value of [notebooks][crate::model::environment::Endpoints::notebooks].
646        pub fn set_notebooks<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
647            self.notebooks = v.into();
648            self
649        }
650
651        /// Sets the value of [sql][crate::model::environment::Endpoints::sql].
652        pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
653            self.sql = v.into();
654            self
655        }
656    }
657
658    impl wkt::message::Message for Endpoints {
659        fn typename() -> &'static str {
660            "type.googleapis.com/google.cloud.dataplex.v1.Environment.Endpoints"
661        }
662    }
663}
664
665/// Content represents a user-visible notebook or a sql script
666#[derive(Clone, Default, PartialEq)]
667#[non_exhaustive]
668pub struct Content {
669    /// Output only. The relative resource name of the content, of the form:
670    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
671    pub name: std::string::String,
672
673    /// Output only. System generated globally unique ID for the content. This ID
674    /// will be different if the content is deleted and re-created with the same
675    /// name.
676    pub uid: std::string::String,
677
678    /// Required. The path for the Content file, represented as directory
679    /// structure. Unique within a lake. Limited to alphanumerics, hyphens,
680    /// underscores, dots and slashes.
681    pub path: std::string::String,
682
683    /// Output only. Content creation time.
684    pub create_time: std::option::Option<wkt::Timestamp>,
685
686    /// Output only. The time when the content was last updated.
687    pub update_time: std::option::Option<wkt::Timestamp>,
688
689    /// Optional. User defined labels for the content.
690    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
691
692    /// Optional. Description of the content.
693    pub description: std::string::String,
694
695    /// Only returned in `GetContent` requests and not in `ListContent` request.
696    pub data: std::option::Option<crate::model::content::Data>,
697
698    /// Types of content
699    pub content: std::option::Option<crate::model::content::Content>,
700
701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
702}
703
704impl Content {
705    pub fn new() -> Self {
706        std::default::Default::default()
707    }
708
709    /// Sets the value of [name][crate::model::Content::name].
710    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
711        self.name = v.into();
712        self
713    }
714
715    /// Sets the value of [uid][crate::model::Content::uid].
716    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
717        self.uid = v.into();
718        self
719    }
720
721    /// Sets the value of [path][crate::model::Content::path].
722    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
723        self.path = v.into();
724        self
725    }
726
727    /// Sets the value of [create_time][crate::model::Content::create_time].
728    pub fn set_create_time<T>(mut self, v: T) -> Self
729    where
730        T: std::convert::Into<wkt::Timestamp>,
731    {
732        self.create_time = std::option::Option::Some(v.into());
733        self
734    }
735
736    /// Sets or clears the value of [create_time][crate::model::Content::create_time].
737    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
738    where
739        T: std::convert::Into<wkt::Timestamp>,
740    {
741        self.create_time = v.map(|x| x.into());
742        self
743    }
744
745    /// Sets the value of [update_time][crate::model::Content::update_time].
746    pub fn set_update_time<T>(mut self, v: T) -> Self
747    where
748        T: std::convert::Into<wkt::Timestamp>,
749    {
750        self.update_time = std::option::Option::Some(v.into());
751        self
752    }
753
754    /// Sets or clears the value of [update_time][crate::model::Content::update_time].
755    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
756    where
757        T: std::convert::Into<wkt::Timestamp>,
758    {
759        self.update_time = v.map(|x| x.into());
760        self
761    }
762
763    /// Sets the value of [labels][crate::model::Content::labels].
764    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
765    where
766        T: std::iter::IntoIterator<Item = (K, V)>,
767        K: std::convert::Into<std::string::String>,
768        V: std::convert::Into<std::string::String>,
769    {
770        use std::iter::Iterator;
771        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
772        self
773    }
774
775    /// Sets the value of [description][crate::model::Content::description].
776    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
777        self.description = v.into();
778        self
779    }
780
781    /// Sets the value of [data][crate::model::Content::data].
782    ///
783    /// Note that all the setters affecting `data` are mutually
784    /// exclusive.
785    pub fn set_data<T: std::convert::Into<std::option::Option<crate::model::content::Data>>>(
786        mut self,
787        v: T,
788    ) -> Self {
789        self.data = v.into();
790        self
791    }
792
793    /// The value of [data][crate::model::Content::data]
794    /// if it holds a `DataText`, `None` if the field is not set or
795    /// holds a different branch.
796    pub fn data_text(&self) -> std::option::Option<&std::string::String> {
797        #[allow(unreachable_patterns)]
798        self.data.as_ref().and_then(|v| match v {
799            crate::model::content::Data::DataText(v) => std::option::Option::Some(v),
800            _ => std::option::Option::None,
801        })
802    }
803
804    /// Sets the value of [data][crate::model::Content::data]
805    /// to hold a `DataText`.
806    ///
807    /// Note that all the setters affecting `data` are
808    /// mutually exclusive.
809    pub fn set_data_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
810        self.data = std::option::Option::Some(crate::model::content::Data::DataText(v.into()));
811        self
812    }
813
814    /// Sets the value of [content][crate::model::Content::content].
815    ///
816    /// Note that all the setters affecting `content` are mutually
817    /// exclusive.
818    pub fn set_content<
819        T: std::convert::Into<std::option::Option<crate::model::content::Content>>,
820    >(
821        mut self,
822        v: T,
823    ) -> Self {
824        self.content = v.into();
825        self
826    }
827
828    /// The value of [content][crate::model::Content::content]
829    /// if it holds a `SqlScript`, `None` if the field is not set or
830    /// holds a different branch.
831    pub fn sql_script(
832        &self,
833    ) -> std::option::Option<&std::boxed::Box<crate::model::content::SqlScript>> {
834        #[allow(unreachable_patterns)]
835        self.content.as_ref().and_then(|v| match v {
836            crate::model::content::Content::SqlScript(v) => std::option::Option::Some(v),
837            _ => std::option::Option::None,
838        })
839    }
840
841    /// Sets the value of [content][crate::model::Content::content]
842    /// to hold a `SqlScript`.
843    ///
844    /// Note that all the setters affecting `content` are
845    /// mutually exclusive.
846    pub fn set_sql_script<
847        T: std::convert::Into<std::boxed::Box<crate::model::content::SqlScript>>,
848    >(
849        mut self,
850        v: T,
851    ) -> Self {
852        self.content =
853            std::option::Option::Some(crate::model::content::Content::SqlScript(v.into()));
854        self
855    }
856
857    /// The value of [content][crate::model::Content::content]
858    /// if it holds a `Notebook`, `None` if the field is not set or
859    /// holds a different branch.
860    pub fn notebook(
861        &self,
862    ) -> std::option::Option<&std::boxed::Box<crate::model::content::Notebook>> {
863        #[allow(unreachable_patterns)]
864        self.content.as_ref().and_then(|v| match v {
865            crate::model::content::Content::Notebook(v) => std::option::Option::Some(v),
866            _ => std::option::Option::None,
867        })
868    }
869
870    /// Sets the value of [content][crate::model::Content::content]
871    /// to hold a `Notebook`.
872    ///
873    /// Note that all the setters affecting `content` are
874    /// mutually exclusive.
875    pub fn set_notebook<T: std::convert::Into<std::boxed::Box<crate::model::content::Notebook>>>(
876        mut self,
877        v: T,
878    ) -> Self {
879        self.content =
880            std::option::Option::Some(crate::model::content::Content::Notebook(v.into()));
881        self
882    }
883}
884
885impl wkt::message::Message for Content {
886    fn typename() -> &'static str {
887        "type.googleapis.com/google.cloud.dataplex.v1.Content"
888    }
889}
890
891/// Defines additional types related to [Content].
892pub mod content {
893    #[allow(unused_imports)]
894    use super::*;
895
896    /// Configuration for the Sql Script content.
897    #[derive(Clone, Default, PartialEq)]
898    #[non_exhaustive]
899    pub struct SqlScript {
900        /// Required. Query Engine to be used for the Sql Query.
901        pub engine: crate::model::content::sql_script::QueryEngine,
902
903        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
904    }
905
906    impl SqlScript {
907        pub fn new() -> Self {
908            std::default::Default::default()
909        }
910
911        /// Sets the value of [engine][crate::model::content::SqlScript::engine].
912        pub fn set_engine<T: std::convert::Into<crate::model::content::sql_script::QueryEngine>>(
913            mut self,
914            v: T,
915        ) -> Self {
916            self.engine = v.into();
917            self
918        }
919    }
920
921    impl wkt::message::Message for SqlScript {
922        fn typename() -> &'static str {
923            "type.googleapis.com/google.cloud.dataplex.v1.Content.SqlScript"
924        }
925    }
926
927    /// Defines additional types related to [SqlScript].
928    pub mod sql_script {
929        #[allow(unused_imports)]
930        use super::*;
931
932        /// Query Engine Type of the SQL Script.
933        ///
934        /// # Working with unknown values
935        ///
936        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
937        /// additional enum variants at any time. Adding new variants is not considered
938        /// a breaking change. Applications should write their code in anticipation of:
939        ///
940        /// - New values appearing in future releases of the client library, **and**
941        /// - New values received dynamically, without application changes.
942        ///
943        /// Please consult the [Working with enums] section in the user guide for some
944        /// guidelines.
945        ///
946        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
947        #[derive(Clone, Debug, PartialEq)]
948        #[non_exhaustive]
949        pub enum QueryEngine {
950            /// Value was unspecified.
951            Unspecified,
952            /// Spark SQL Query.
953            Spark,
954            /// If set, the enum was initialized with an unknown value.
955            ///
956            /// Applications can examine the value using [QueryEngine::value] or
957            /// [QueryEngine::name].
958            UnknownValue(query_engine::UnknownValue),
959        }
960
961        #[doc(hidden)]
962        pub mod query_engine {
963            #[allow(unused_imports)]
964            use super::*;
965            #[derive(Clone, Debug, PartialEq)]
966            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
967        }
968
969        impl QueryEngine {
970            /// Gets the enum value.
971            ///
972            /// Returns `None` if the enum contains an unknown value deserialized from
973            /// the string representation of enums.
974            pub fn value(&self) -> std::option::Option<i32> {
975                match self {
976                    Self::Unspecified => std::option::Option::Some(0),
977                    Self::Spark => std::option::Option::Some(2),
978                    Self::UnknownValue(u) => u.0.value(),
979                }
980            }
981
982            /// Gets the enum value as a string.
983            ///
984            /// Returns `None` if the enum contains an unknown value deserialized from
985            /// the integer representation of enums.
986            pub fn name(&self) -> std::option::Option<&str> {
987                match self {
988                    Self::Unspecified => std::option::Option::Some("QUERY_ENGINE_UNSPECIFIED"),
989                    Self::Spark => std::option::Option::Some("SPARK"),
990                    Self::UnknownValue(u) => u.0.name(),
991                }
992            }
993        }
994
995        impl std::default::Default for QueryEngine {
996            fn default() -> Self {
997                use std::convert::From;
998                Self::from(0)
999            }
1000        }
1001
1002        impl std::fmt::Display for QueryEngine {
1003            fn fmt(
1004                &self,
1005                f: &mut std::fmt::Formatter<'_>,
1006            ) -> std::result::Result<(), std::fmt::Error> {
1007                wkt::internal::display_enum(f, self.name(), self.value())
1008            }
1009        }
1010
1011        impl std::convert::From<i32> for QueryEngine {
1012            fn from(value: i32) -> Self {
1013                match value {
1014                    0 => Self::Unspecified,
1015                    2 => Self::Spark,
1016                    _ => Self::UnknownValue(query_engine::UnknownValue(
1017                        wkt::internal::UnknownEnumValue::Integer(value),
1018                    )),
1019                }
1020            }
1021        }
1022
1023        impl std::convert::From<&str> for QueryEngine {
1024            fn from(value: &str) -> Self {
1025                use std::string::ToString;
1026                match value {
1027                    "QUERY_ENGINE_UNSPECIFIED" => Self::Unspecified,
1028                    "SPARK" => Self::Spark,
1029                    _ => Self::UnknownValue(query_engine::UnknownValue(
1030                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1031                    )),
1032                }
1033            }
1034        }
1035
1036        impl serde::ser::Serialize for QueryEngine {
1037            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1038            where
1039                S: serde::Serializer,
1040            {
1041                match self {
1042                    Self::Unspecified => serializer.serialize_i32(0),
1043                    Self::Spark => serializer.serialize_i32(2),
1044                    Self::UnknownValue(u) => u.0.serialize(serializer),
1045                }
1046            }
1047        }
1048
1049        impl<'de> serde::de::Deserialize<'de> for QueryEngine {
1050            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1051            where
1052                D: serde::Deserializer<'de>,
1053            {
1054                deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryEngine>::new(
1055                    ".google.cloud.dataplex.v1.Content.SqlScript.QueryEngine",
1056                ))
1057            }
1058        }
1059    }
1060
1061    /// Configuration for Notebook content.
1062    #[derive(Clone, Default, PartialEq)]
1063    #[non_exhaustive]
1064    pub struct Notebook {
1065        /// Required. Kernel Type of the notebook.
1066        pub kernel_type: crate::model::content::notebook::KernelType,
1067
1068        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1069    }
1070
1071    impl Notebook {
1072        pub fn new() -> Self {
1073            std::default::Default::default()
1074        }
1075
1076        /// Sets the value of [kernel_type][crate::model::content::Notebook::kernel_type].
1077        pub fn set_kernel_type<
1078            T: std::convert::Into<crate::model::content::notebook::KernelType>,
1079        >(
1080            mut self,
1081            v: T,
1082        ) -> Self {
1083            self.kernel_type = v.into();
1084            self
1085        }
1086    }
1087
1088    impl wkt::message::Message for Notebook {
1089        fn typename() -> &'static str {
1090            "type.googleapis.com/google.cloud.dataplex.v1.Content.Notebook"
1091        }
1092    }
1093
1094    /// Defines additional types related to [Notebook].
1095    pub mod notebook {
1096        #[allow(unused_imports)]
1097        use super::*;
1098
1099        /// Kernel Type of the Jupyter notebook.
1100        ///
1101        /// # Working with unknown values
1102        ///
1103        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1104        /// additional enum variants at any time. Adding new variants is not considered
1105        /// a breaking change. Applications should write their code in anticipation of:
1106        ///
1107        /// - New values appearing in future releases of the client library, **and**
1108        /// - New values received dynamically, without application changes.
1109        ///
1110        /// Please consult the [Working with enums] section in the user guide for some
1111        /// guidelines.
1112        ///
1113        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1114        #[derive(Clone, Debug, PartialEq)]
1115        #[non_exhaustive]
1116        pub enum KernelType {
1117            /// Kernel Type unspecified.
1118            Unspecified,
1119            /// Python 3 Kernel.
1120            Python3,
1121            /// If set, the enum was initialized with an unknown value.
1122            ///
1123            /// Applications can examine the value using [KernelType::value] or
1124            /// [KernelType::name].
1125            UnknownValue(kernel_type::UnknownValue),
1126        }
1127
1128        #[doc(hidden)]
1129        pub mod kernel_type {
1130            #[allow(unused_imports)]
1131            use super::*;
1132            #[derive(Clone, Debug, PartialEq)]
1133            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1134        }
1135
1136        impl KernelType {
1137            /// Gets the enum value.
1138            ///
1139            /// Returns `None` if the enum contains an unknown value deserialized from
1140            /// the string representation of enums.
1141            pub fn value(&self) -> std::option::Option<i32> {
1142                match self {
1143                    Self::Unspecified => std::option::Option::Some(0),
1144                    Self::Python3 => std::option::Option::Some(1),
1145                    Self::UnknownValue(u) => u.0.value(),
1146                }
1147            }
1148
1149            /// Gets the enum value as a string.
1150            ///
1151            /// Returns `None` if the enum contains an unknown value deserialized from
1152            /// the integer representation of enums.
1153            pub fn name(&self) -> std::option::Option<&str> {
1154                match self {
1155                    Self::Unspecified => std::option::Option::Some("KERNEL_TYPE_UNSPECIFIED"),
1156                    Self::Python3 => std::option::Option::Some("PYTHON3"),
1157                    Self::UnknownValue(u) => u.0.name(),
1158                }
1159            }
1160        }
1161
1162        impl std::default::Default for KernelType {
1163            fn default() -> Self {
1164                use std::convert::From;
1165                Self::from(0)
1166            }
1167        }
1168
1169        impl std::fmt::Display for KernelType {
1170            fn fmt(
1171                &self,
1172                f: &mut std::fmt::Formatter<'_>,
1173            ) -> std::result::Result<(), std::fmt::Error> {
1174                wkt::internal::display_enum(f, self.name(), self.value())
1175            }
1176        }
1177
1178        impl std::convert::From<i32> for KernelType {
1179            fn from(value: i32) -> Self {
1180                match value {
1181                    0 => Self::Unspecified,
1182                    1 => Self::Python3,
1183                    _ => Self::UnknownValue(kernel_type::UnknownValue(
1184                        wkt::internal::UnknownEnumValue::Integer(value),
1185                    )),
1186                }
1187            }
1188        }
1189
1190        impl std::convert::From<&str> for KernelType {
1191            fn from(value: &str) -> Self {
1192                use std::string::ToString;
1193                match value {
1194                    "KERNEL_TYPE_UNSPECIFIED" => Self::Unspecified,
1195                    "PYTHON3" => Self::Python3,
1196                    _ => Self::UnknownValue(kernel_type::UnknownValue(
1197                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1198                    )),
1199                }
1200            }
1201        }
1202
1203        impl serde::ser::Serialize for KernelType {
1204            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1205            where
1206                S: serde::Serializer,
1207            {
1208                match self {
1209                    Self::Unspecified => serializer.serialize_i32(0),
1210                    Self::Python3 => serializer.serialize_i32(1),
1211                    Self::UnknownValue(u) => u.0.serialize(serializer),
1212                }
1213            }
1214        }
1215
1216        impl<'de> serde::de::Deserialize<'de> for KernelType {
1217            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1218            where
1219                D: serde::Deserializer<'de>,
1220            {
1221                deserializer.deserialize_any(wkt::internal::EnumVisitor::<KernelType>::new(
1222                    ".google.cloud.dataplex.v1.Content.Notebook.KernelType",
1223                ))
1224            }
1225        }
1226    }
1227
1228    /// Only returned in `GetContent` requests and not in `ListContent` request.
1229    #[derive(Clone, Debug, PartialEq)]
1230    #[non_exhaustive]
1231    pub enum Data {
1232        /// Required. Content data in string format.
1233        DataText(std::string::String),
1234    }
1235
1236    /// Types of content
1237    #[derive(Clone, Debug, PartialEq)]
1238    #[non_exhaustive]
1239    pub enum Content {
1240        /// Sql Script related configurations.
1241        SqlScript(std::boxed::Box<crate::model::content::SqlScript>),
1242        /// Notebook related configurations.
1243        Notebook(std::boxed::Box<crate::model::content::Notebook>),
1244    }
1245}
1246
1247/// Represents an active analyze session running for a user.
1248#[derive(Clone, Default, PartialEq)]
1249#[non_exhaustive]
1250pub struct Session {
1251    /// Output only. The relative resource name of the content, of the form:
1252    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id}
1253    pub name: std::string::String,
1254
1255    /// Output only. Email of user running the session.
1256    pub user_id: std::string::String,
1257
1258    /// Output only. Session start time.
1259    pub create_time: std::option::Option<wkt::Timestamp>,
1260
1261    /// Output only. State of Session
1262    pub state: crate::model::State,
1263
1264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1265}
1266
1267impl Session {
1268    pub fn new() -> Self {
1269        std::default::Default::default()
1270    }
1271
1272    /// Sets the value of [name][crate::model::Session::name].
1273    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1274        self.name = v.into();
1275        self
1276    }
1277
1278    /// Sets the value of [user_id][crate::model::Session::user_id].
1279    pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1280        self.user_id = v.into();
1281        self
1282    }
1283
1284    /// Sets the value of [create_time][crate::model::Session::create_time].
1285    pub fn set_create_time<T>(mut self, v: T) -> Self
1286    where
1287        T: std::convert::Into<wkt::Timestamp>,
1288    {
1289        self.create_time = std::option::Option::Some(v.into());
1290        self
1291    }
1292
1293    /// Sets or clears the value of [create_time][crate::model::Session::create_time].
1294    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1295    where
1296        T: std::convert::Into<wkt::Timestamp>,
1297    {
1298        self.create_time = v.map(|x| x.into());
1299        self
1300    }
1301
1302    /// Sets the value of [state][crate::model::Session::state].
1303    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
1304        self.state = v.into();
1305        self
1306    }
1307}
1308
1309impl wkt::message::Message for Session {
1310    fn typename() -> &'static str {
1311        "type.googleapis.com/google.cloud.dataplex.v1.Session"
1312    }
1313}
1314
1315/// A Glossary represents a collection of GlossaryCategories and GlossaryTerms
1316/// defined by the user. Glossary is a top level resource and is the Google Cloud
1317/// parent resource of all the GlossaryCategories and GlossaryTerms within it.
1318#[derive(Clone, Default, PartialEq)]
1319#[non_exhaustive]
1320pub struct Glossary {
1321    /// Output only. Identifier. The resource name of the Glossary.
1322    /// Format:
1323    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1324    pub name: std::string::String,
1325
1326    /// Output only. System generated unique id for the Glossary. This ID will be
1327    /// different if the Glossary is deleted and re-created with the
1328    /// same name.
1329    pub uid: std::string::String,
1330
1331    /// Optional. User friendly display name of the Glossary. This is user-mutable.
1332    /// This will be same as the GlossaryId, if not specified.
1333    pub display_name: std::string::String,
1334
1335    /// Optional. The user-mutable description of the Glossary.
1336    pub description: std::string::String,
1337
1338    /// Output only. The time at which the Glossary was created.
1339    pub create_time: std::option::Option<wkt::Timestamp>,
1340
1341    /// Output only. The time at which the Glossary was last updated.
1342    pub update_time: std::option::Option<wkt::Timestamp>,
1343
1344    /// Optional. User-defined labels for the Glossary.
1345    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1346
1347    /// Output only. The number of GlossaryTerms in the Glossary.
1348    pub term_count: i32,
1349
1350    /// Output only. The number of GlossaryCategories in the Glossary.
1351    pub category_count: i32,
1352
1353    /// Optional. Needed for resource freshness validation.
1354    /// This checksum is computed by the server based on the value of other
1355    /// fields, and may be sent on update and delete requests to ensure the
1356    /// client has an up-to-date value before proceeding.
1357    pub etag: std::string::String,
1358
1359    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1360}
1361
1362impl Glossary {
1363    pub fn new() -> Self {
1364        std::default::Default::default()
1365    }
1366
1367    /// Sets the value of [name][crate::model::Glossary::name].
1368    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1369        self.name = v.into();
1370        self
1371    }
1372
1373    /// Sets the value of [uid][crate::model::Glossary::uid].
1374    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1375        self.uid = v.into();
1376        self
1377    }
1378
1379    /// Sets the value of [display_name][crate::model::Glossary::display_name].
1380    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1381        self.display_name = v.into();
1382        self
1383    }
1384
1385    /// Sets the value of [description][crate::model::Glossary::description].
1386    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1387        self.description = v.into();
1388        self
1389    }
1390
1391    /// Sets the value of [create_time][crate::model::Glossary::create_time].
1392    pub fn set_create_time<T>(mut self, v: T) -> Self
1393    where
1394        T: std::convert::Into<wkt::Timestamp>,
1395    {
1396        self.create_time = std::option::Option::Some(v.into());
1397        self
1398    }
1399
1400    /// Sets or clears the value of [create_time][crate::model::Glossary::create_time].
1401    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1402    where
1403        T: std::convert::Into<wkt::Timestamp>,
1404    {
1405        self.create_time = v.map(|x| x.into());
1406        self
1407    }
1408
1409    /// Sets the value of [update_time][crate::model::Glossary::update_time].
1410    pub fn set_update_time<T>(mut self, v: T) -> Self
1411    where
1412        T: std::convert::Into<wkt::Timestamp>,
1413    {
1414        self.update_time = std::option::Option::Some(v.into());
1415        self
1416    }
1417
1418    /// Sets or clears the value of [update_time][crate::model::Glossary::update_time].
1419    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1420    where
1421        T: std::convert::Into<wkt::Timestamp>,
1422    {
1423        self.update_time = v.map(|x| x.into());
1424        self
1425    }
1426
1427    /// Sets the value of [labels][crate::model::Glossary::labels].
1428    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1429    where
1430        T: std::iter::IntoIterator<Item = (K, V)>,
1431        K: std::convert::Into<std::string::String>,
1432        V: std::convert::Into<std::string::String>,
1433    {
1434        use std::iter::Iterator;
1435        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1436        self
1437    }
1438
1439    /// Sets the value of [term_count][crate::model::Glossary::term_count].
1440    pub fn set_term_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1441        self.term_count = v.into();
1442        self
1443    }
1444
1445    /// Sets the value of [category_count][crate::model::Glossary::category_count].
1446    pub fn set_category_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1447        self.category_count = v.into();
1448        self
1449    }
1450
1451    /// Sets the value of [etag][crate::model::Glossary::etag].
1452    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1453        self.etag = v.into();
1454        self
1455    }
1456}
1457
1458impl wkt::message::Message for Glossary {
1459    fn typename() -> &'static str {
1460        "type.googleapis.com/google.cloud.dataplex.v1.Glossary"
1461    }
1462}
1463
1464/// A GlossaryCategory represents a collection of GlossaryCategories and
1465/// GlossaryTerms within a Glossary that are related to each other.
1466#[derive(Clone, Default, PartialEq)]
1467#[non_exhaustive]
1468pub struct GlossaryCategory {
1469    /// Output only. Identifier. The resource name of the GlossaryCategory.
1470    /// Format:
1471    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
1472    pub name: std::string::String,
1473
1474    /// Output only. System generated unique id for the GlossaryCategory. This ID
1475    /// will be different if the GlossaryCategory is deleted and re-created with
1476    /// the same name.
1477    pub uid: std::string::String,
1478
1479    /// Optional. User friendly display name of the GlossaryCategory. This is
1480    /// user-mutable. This will be same as the GlossaryCategoryId, if not
1481    /// specified.
1482    pub display_name: std::string::String,
1483
1484    /// Optional. The user-mutable description of the GlossaryCategory.
1485    pub description: std::string::String,
1486
1487    /// Output only. The time at which the GlossaryCategory was created.
1488    pub create_time: std::option::Option<wkt::Timestamp>,
1489
1490    /// Output only. The time at which the GlossaryCategory was last updated.
1491    pub update_time: std::option::Option<wkt::Timestamp>,
1492
1493    /// Optional. User-defined labels for the GlossaryCategory.
1494    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1495
1496    /// Required. The immediate parent of the GlossaryCategory in the
1497    /// resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
1498    /// Format:
1499    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1500    /// OR
1501    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
1502    pub parent: std::string::String,
1503
1504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1505}
1506
1507impl GlossaryCategory {
1508    pub fn new() -> Self {
1509        std::default::Default::default()
1510    }
1511
1512    /// Sets the value of [name][crate::model::GlossaryCategory::name].
1513    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1514        self.name = v.into();
1515        self
1516    }
1517
1518    /// Sets the value of [uid][crate::model::GlossaryCategory::uid].
1519    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1520        self.uid = v.into();
1521        self
1522    }
1523
1524    /// Sets the value of [display_name][crate::model::GlossaryCategory::display_name].
1525    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1526        self.display_name = v.into();
1527        self
1528    }
1529
1530    /// Sets the value of [description][crate::model::GlossaryCategory::description].
1531    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1532        self.description = v.into();
1533        self
1534    }
1535
1536    /// Sets the value of [create_time][crate::model::GlossaryCategory::create_time].
1537    pub fn set_create_time<T>(mut self, v: T) -> Self
1538    where
1539        T: std::convert::Into<wkt::Timestamp>,
1540    {
1541        self.create_time = std::option::Option::Some(v.into());
1542        self
1543    }
1544
1545    /// Sets or clears the value of [create_time][crate::model::GlossaryCategory::create_time].
1546    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1547    where
1548        T: std::convert::Into<wkt::Timestamp>,
1549    {
1550        self.create_time = v.map(|x| x.into());
1551        self
1552    }
1553
1554    /// Sets the value of [update_time][crate::model::GlossaryCategory::update_time].
1555    pub fn set_update_time<T>(mut self, v: T) -> Self
1556    where
1557        T: std::convert::Into<wkt::Timestamp>,
1558    {
1559        self.update_time = std::option::Option::Some(v.into());
1560        self
1561    }
1562
1563    /// Sets or clears the value of [update_time][crate::model::GlossaryCategory::update_time].
1564    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1565    where
1566        T: std::convert::Into<wkt::Timestamp>,
1567    {
1568        self.update_time = v.map(|x| x.into());
1569        self
1570    }
1571
1572    /// Sets the value of [labels][crate::model::GlossaryCategory::labels].
1573    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1574    where
1575        T: std::iter::IntoIterator<Item = (K, V)>,
1576        K: std::convert::Into<std::string::String>,
1577        V: std::convert::Into<std::string::String>,
1578    {
1579        use std::iter::Iterator;
1580        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1581        self
1582    }
1583
1584    /// Sets the value of [parent][crate::model::GlossaryCategory::parent].
1585    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1586        self.parent = v.into();
1587        self
1588    }
1589}
1590
1591impl wkt::message::Message for GlossaryCategory {
1592    fn typename() -> &'static str {
1593        "type.googleapis.com/google.cloud.dataplex.v1.GlossaryCategory"
1594    }
1595}
1596
1597/// GlossaryTerms are the core of Glossary.
1598/// A GlossaryTerm holds a rich text description that can be attached to Entries
1599/// or specific columns to enrich them.
1600#[derive(Clone, Default, PartialEq)]
1601#[non_exhaustive]
1602pub struct GlossaryTerm {
1603    /// Output only. Identifier. The resource name of the GlossaryTerm.
1604    /// Format:
1605    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
1606    pub name: std::string::String,
1607
1608    /// Output only. System generated unique id for the GlossaryTerm. This ID will
1609    /// be different if the GlossaryTerm is deleted and re-created with the same
1610    /// name.
1611    pub uid: std::string::String,
1612
1613    /// Optional. User friendly display name of the GlossaryTerm. This is
1614    /// user-mutable. This will be same as the GlossaryTermId, if not specified.
1615    pub display_name: std::string::String,
1616
1617    /// Optional. The user-mutable description of the GlossaryTerm.
1618    pub description: std::string::String,
1619
1620    /// Output only. The time at which the GlossaryTerm was created.
1621    pub create_time: std::option::Option<wkt::Timestamp>,
1622
1623    /// Output only. The time at which the GlossaryTerm was last updated.
1624    pub update_time: std::option::Option<wkt::Timestamp>,
1625
1626    /// Optional. User-defined labels for the GlossaryTerm.
1627    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1628
1629    /// Required. The immediate parent of the GlossaryTerm in the
1630    /// resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
1631    /// Format:
1632    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1633    /// OR
1634    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
1635    pub parent: std::string::String,
1636
1637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1638}
1639
1640impl GlossaryTerm {
1641    pub fn new() -> Self {
1642        std::default::Default::default()
1643    }
1644
1645    /// Sets the value of [name][crate::model::GlossaryTerm::name].
1646    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1647        self.name = v.into();
1648        self
1649    }
1650
1651    /// Sets the value of [uid][crate::model::GlossaryTerm::uid].
1652    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1653        self.uid = v.into();
1654        self
1655    }
1656
1657    /// Sets the value of [display_name][crate::model::GlossaryTerm::display_name].
1658    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1659        self.display_name = v.into();
1660        self
1661    }
1662
1663    /// Sets the value of [description][crate::model::GlossaryTerm::description].
1664    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1665        self.description = v.into();
1666        self
1667    }
1668
1669    /// Sets the value of [create_time][crate::model::GlossaryTerm::create_time].
1670    pub fn set_create_time<T>(mut self, v: T) -> Self
1671    where
1672        T: std::convert::Into<wkt::Timestamp>,
1673    {
1674        self.create_time = std::option::Option::Some(v.into());
1675        self
1676    }
1677
1678    /// Sets or clears the value of [create_time][crate::model::GlossaryTerm::create_time].
1679    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1680    where
1681        T: std::convert::Into<wkt::Timestamp>,
1682    {
1683        self.create_time = v.map(|x| x.into());
1684        self
1685    }
1686
1687    /// Sets the value of [update_time][crate::model::GlossaryTerm::update_time].
1688    pub fn set_update_time<T>(mut self, v: T) -> Self
1689    where
1690        T: std::convert::Into<wkt::Timestamp>,
1691    {
1692        self.update_time = std::option::Option::Some(v.into());
1693        self
1694    }
1695
1696    /// Sets or clears the value of [update_time][crate::model::GlossaryTerm::update_time].
1697    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1698    where
1699        T: std::convert::Into<wkt::Timestamp>,
1700    {
1701        self.update_time = v.map(|x| x.into());
1702        self
1703    }
1704
1705    /// Sets the value of [labels][crate::model::GlossaryTerm::labels].
1706    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1707    where
1708        T: std::iter::IntoIterator<Item = (K, V)>,
1709        K: std::convert::Into<std::string::String>,
1710        V: std::convert::Into<std::string::String>,
1711    {
1712        use std::iter::Iterator;
1713        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1714        self
1715    }
1716
1717    /// Sets the value of [parent][crate::model::GlossaryTerm::parent].
1718    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1719        self.parent = v.into();
1720        self
1721    }
1722}
1723
1724impl wkt::message::Message for GlossaryTerm {
1725    fn typename() -> &'static str {
1726        "type.googleapis.com/google.cloud.dataplex.v1.GlossaryTerm"
1727    }
1728}
1729
1730/// Create Glossary Request
1731#[derive(Clone, Default, PartialEq)]
1732#[non_exhaustive]
1733pub struct CreateGlossaryRequest {
1734    /// Required. The parent resource where this Glossary will be created.
1735    /// Format: projects/{project_id_or_number}/locations/{location_id}
1736    /// where `location_id` refers to a Google Cloud region.
1737    pub parent: std::string::String,
1738
1739    /// Required. Glossary ID: Glossary identifier.
1740    pub glossary_id: std::string::String,
1741
1742    /// Required. The Glossary to create.
1743    pub glossary: std::option::Option<crate::model::Glossary>,
1744
1745    /// Optional. Validates the request without actually creating the Glossary.
1746    /// Default: false.
1747    pub validate_only: bool,
1748
1749    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1750}
1751
1752impl CreateGlossaryRequest {
1753    pub fn new() -> Self {
1754        std::default::Default::default()
1755    }
1756
1757    /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
1758    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1759        self.parent = v.into();
1760        self
1761    }
1762
1763    /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
1764    pub fn set_glossary_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1765        self.glossary_id = v.into();
1766        self
1767    }
1768
1769    /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
1770    pub fn set_glossary<T>(mut self, v: T) -> Self
1771    where
1772        T: std::convert::Into<crate::model::Glossary>,
1773    {
1774        self.glossary = std::option::Option::Some(v.into());
1775        self
1776    }
1777
1778    /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
1779    pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
1780    where
1781        T: std::convert::Into<crate::model::Glossary>,
1782    {
1783        self.glossary = v.map(|x| x.into());
1784        self
1785    }
1786
1787    /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
1788    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1789        self.validate_only = v.into();
1790        self
1791    }
1792}
1793
1794impl wkt::message::Message for CreateGlossaryRequest {
1795    fn typename() -> &'static str {
1796        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryRequest"
1797    }
1798}
1799
1800/// Update Glossary Request
1801#[derive(Clone, Default, PartialEq)]
1802#[non_exhaustive]
1803pub struct UpdateGlossaryRequest {
1804    /// Required. The Glossary to update.
1805    /// The Glossary's `name` field is used to identify the Glossary to update.
1806    /// Format:
1807    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1808    pub glossary: std::option::Option<crate::model::Glossary>,
1809
1810    /// Required. The list of fields to update.
1811    pub update_mask: std::option::Option<wkt::FieldMask>,
1812
1813    /// Optional. Validates the request without actually updating the Glossary.
1814    /// Default: false.
1815    pub validate_only: bool,
1816
1817    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1818}
1819
1820impl UpdateGlossaryRequest {
1821    pub fn new() -> Self {
1822        std::default::Default::default()
1823    }
1824
1825    /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
1826    pub fn set_glossary<T>(mut self, v: T) -> Self
1827    where
1828        T: std::convert::Into<crate::model::Glossary>,
1829    {
1830        self.glossary = std::option::Option::Some(v.into());
1831        self
1832    }
1833
1834    /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
1835    pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
1836    where
1837        T: std::convert::Into<crate::model::Glossary>,
1838    {
1839        self.glossary = v.map(|x| x.into());
1840        self
1841    }
1842
1843    /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
1844    pub fn set_update_mask<T>(mut self, v: T) -> Self
1845    where
1846        T: std::convert::Into<wkt::FieldMask>,
1847    {
1848        self.update_mask = std::option::Option::Some(v.into());
1849        self
1850    }
1851
1852    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
1853    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1854    where
1855        T: std::convert::Into<wkt::FieldMask>,
1856    {
1857        self.update_mask = v.map(|x| x.into());
1858        self
1859    }
1860
1861    /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
1862    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1863        self.validate_only = v.into();
1864        self
1865    }
1866}
1867
1868impl wkt::message::Message for UpdateGlossaryRequest {
1869    fn typename() -> &'static str {
1870        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryRequest"
1871    }
1872}
1873
1874/// Delete Glossary Request
1875#[derive(Clone, Default, PartialEq)]
1876#[non_exhaustive]
1877pub struct DeleteGlossaryRequest {
1878    /// Required. The name of the Glossary to delete.
1879    /// Format:
1880    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1881    pub name: std::string::String,
1882
1883    /// Optional. The etag of the Glossary.
1884    /// If this is provided, it must match the server's etag.
1885    /// If the etag is provided and does not match the server-computed etag,
1886    /// the request must fail with a ABORTED error code.
1887    pub etag: std::string::String,
1888
1889    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1890}
1891
1892impl DeleteGlossaryRequest {
1893    pub fn new() -> Self {
1894        std::default::Default::default()
1895    }
1896
1897    /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
1898    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1899        self.name = v.into();
1900        self
1901    }
1902
1903    /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
1904    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1905        self.etag = v.into();
1906        self
1907    }
1908}
1909
1910impl wkt::message::Message for DeleteGlossaryRequest {
1911    fn typename() -> &'static str {
1912        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryRequest"
1913    }
1914}
1915
1916/// Get Glossary Request
1917#[derive(Clone, Default, PartialEq)]
1918#[non_exhaustive]
1919pub struct GetGlossaryRequest {
1920    /// Required. The name of the Glossary to retrieve.
1921    /// Format:
1922    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1923    pub name: std::string::String,
1924
1925    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1926}
1927
1928impl GetGlossaryRequest {
1929    pub fn new() -> Self {
1930        std::default::Default::default()
1931    }
1932
1933    /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
1934    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1935        self.name = v.into();
1936        self
1937    }
1938}
1939
1940impl wkt::message::Message for GetGlossaryRequest {
1941    fn typename() -> &'static str {
1942        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryRequest"
1943    }
1944}
1945
1946/// List Glossaries Request
1947#[derive(Clone, Default, PartialEq)]
1948#[non_exhaustive]
1949pub struct ListGlossariesRequest {
1950    /// Required. The parent, which has this collection of Glossaries.
1951    /// Format: projects/{project_id_or_number}/locations/{location_id}
1952    /// where `location_id` refers to a Google Cloud region.
1953    pub parent: std::string::String,
1954
1955    /// Optional. The maximum number of Glossaries to return. The service may
1956    /// return fewer than this value. If unspecified, at most 50 Glossaries will be
1957    /// returned. The maximum value is 1000; values above 1000 will be coerced to
1958    /// 1000.
1959    pub page_size: i32,
1960
1961    /// Optional. A page token, received from a previous `ListGlossaries` call.
1962    /// Provide this to retrieve the subsequent page.
1963    /// When paginating, all other parameters provided to `ListGlossaries` must
1964    /// match the call that provided the page token.
1965    pub page_token: std::string::String,
1966
1967    /// Optional. Filter expression that filters Glossaries listed in the response.
1968    /// Filters on proto fields of Glossary are supported.
1969    /// Examples of using a filter are:
1970    ///
1971    /// - `display_name="my-glossary"`
1972    /// - `categoryCount=1`
1973    /// - `termCount=0`
1974    pub filter: std::string::String,
1975
1976    /// Optional. Order by expression that orders Glossaries listed in the
1977    /// response. Order by fields are: `name` or `create_time` for the result. If
1978    /// not specified, the ordering is undefined.
1979    pub order_by: std::string::String,
1980
1981    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1982}
1983
1984impl ListGlossariesRequest {
1985    pub fn new() -> Self {
1986        std::default::Default::default()
1987    }
1988
1989    /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
1990    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1991        self.parent = v.into();
1992        self
1993    }
1994
1995    /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
1996    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1997        self.page_size = v.into();
1998        self
1999    }
2000
2001    /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
2002    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2003        self.page_token = v.into();
2004        self
2005    }
2006
2007    /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
2008    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2009        self.filter = v.into();
2010        self
2011    }
2012
2013    /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
2014    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2015        self.order_by = v.into();
2016        self
2017    }
2018}
2019
2020impl wkt::message::Message for ListGlossariesRequest {
2021    fn typename() -> &'static str {
2022        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesRequest"
2023    }
2024}
2025
2026/// List Glossaries Response
2027#[derive(Clone, Default, PartialEq)]
2028#[non_exhaustive]
2029pub struct ListGlossariesResponse {
2030    /// Lists the Glossaries in the specified parent.
2031    pub glossaries: std::vec::Vec<crate::model::Glossary>,
2032
2033    /// A token, which can be sent as `page_token` to retrieve the next page.
2034    /// If this field is omitted, there are no subsequent pages.
2035    pub next_page_token: std::string::String,
2036
2037    /// Locations that the service couldn't reach.
2038    pub unreachable_locations: std::vec::Vec<std::string::String>,
2039
2040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2041}
2042
2043impl ListGlossariesResponse {
2044    pub fn new() -> Self {
2045        std::default::Default::default()
2046    }
2047
2048    /// Sets the value of [glossaries][crate::model::ListGlossariesResponse::glossaries].
2049    pub fn set_glossaries<T, V>(mut self, v: T) -> Self
2050    where
2051        T: std::iter::IntoIterator<Item = V>,
2052        V: std::convert::Into<crate::model::Glossary>,
2053    {
2054        use std::iter::Iterator;
2055        self.glossaries = v.into_iter().map(|i| i.into()).collect();
2056        self
2057    }
2058
2059    /// Sets the value of [next_page_token][crate::model::ListGlossariesResponse::next_page_token].
2060    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2061        self.next_page_token = v.into();
2062        self
2063    }
2064
2065    /// Sets the value of [unreachable_locations][crate::model::ListGlossariesResponse::unreachable_locations].
2066    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2067    where
2068        T: std::iter::IntoIterator<Item = V>,
2069        V: std::convert::Into<std::string::String>,
2070    {
2071        use std::iter::Iterator;
2072        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2073        self
2074    }
2075}
2076
2077impl wkt::message::Message for ListGlossariesResponse {
2078    fn typename() -> &'static str {
2079        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesResponse"
2080    }
2081}
2082
2083#[doc(hidden)]
2084impl gax::paginator::internal::PageableResponse for ListGlossariesResponse {
2085    type PageItem = crate::model::Glossary;
2086
2087    fn items(self) -> std::vec::Vec<Self::PageItem> {
2088        self.glossaries
2089    }
2090
2091    fn next_page_token(&self) -> std::string::String {
2092        use std::clone::Clone;
2093        self.next_page_token.clone()
2094    }
2095}
2096
2097/// Creates a new GlossaryCategory under the specified Glossary.
2098#[derive(Clone, Default, PartialEq)]
2099#[non_exhaustive]
2100pub struct CreateGlossaryCategoryRequest {
2101    /// Required. The parent resource where this GlossaryCategory will be created.
2102    /// Format:
2103    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2104    /// where `locationId` refers to a Google Cloud region.
2105    pub parent: std::string::String,
2106
2107    /// Required. GlossaryCategory identifier.
2108    pub category_id: std::string::String,
2109
2110    /// Required. The GlossaryCategory to create.
2111    pub category: std::option::Option<crate::model::GlossaryCategory>,
2112
2113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2114}
2115
2116impl CreateGlossaryCategoryRequest {
2117    pub fn new() -> Self {
2118        std::default::Default::default()
2119    }
2120
2121    /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
2122    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2123        self.parent = v.into();
2124        self
2125    }
2126
2127    /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
2128    pub fn set_category_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2129        self.category_id = v.into();
2130        self
2131    }
2132
2133    /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
2134    pub fn set_category<T>(mut self, v: T) -> Self
2135    where
2136        T: std::convert::Into<crate::model::GlossaryCategory>,
2137    {
2138        self.category = std::option::Option::Some(v.into());
2139        self
2140    }
2141
2142    /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
2143    pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2144    where
2145        T: std::convert::Into<crate::model::GlossaryCategory>,
2146    {
2147        self.category = v.map(|x| x.into());
2148        self
2149    }
2150}
2151
2152impl wkt::message::Message for CreateGlossaryCategoryRequest {
2153    fn typename() -> &'static str {
2154        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryCategoryRequest"
2155    }
2156}
2157
2158/// Update GlossaryCategory Request
2159#[derive(Clone, Default, PartialEq)]
2160#[non_exhaustive]
2161pub struct UpdateGlossaryCategoryRequest {
2162    /// Required. The GlossaryCategory to update.
2163    /// The GlossaryCategory's `name` field is used to identify the
2164    /// GlossaryCategory to update. Format:
2165    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
2166    pub category: std::option::Option<crate::model::GlossaryCategory>,
2167
2168    /// Required. The list of fields to update.
2169    pub update_mask: std::option::Option<wkt::FieldMask>,
2170
2171    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2172}
2173
2174impl UpdateGlossaryCategoryRequest {
2175    pub fn new() -> Self {
2176        std::default::Default::default()
2177    }
2178
2179    /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
2180    pub fn set_category<T>(mut self, v: T) -> Self
2181    where
2182        T: std::convert::Into<crate::model::GlossaryCategory>,
2183    {
2184        self.category = std::option::Option::Some(v.into());
2185        self
2186    }
2187
2188    /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
2189    pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2190    where
2191        T: std::convert::Into<crate::model::GlossaryCategory>,
2192    {
2193        self.category = v.map(|x| x.into());
2194        self
2195    }
2196
2197    /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
2198    pub fn set_update_mask<T>(mut self, v: T) -> Self
2199    where
2200        T: std::convert::Into<wkt::FieldMask>,
2201    {
2202        self.update_mask = std::option::Option::Some(v.into());
2203        self
2204    }
2205
2206    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
2207    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2208    where
2209        T: std::convert::Into<wkt::FieldMask>,
2210    {
2211        self.update_mask = v.map(|x| x.into());
2212        self
2213    }
2214}
2215
2216impl wkt::message::Message for UpdateGlossaryCategoryRequest {
2217    fn typename() -> &'static str {
2218        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest"
2219    }
2220}
2221
2222/// Delete GlossaryCategory Request
2223#[derive(Clone, Default, PartialEq)]
2224#[non_exhaustive]
2225pub struct DeleteGlossaryCategoryRequest {
2226    /// Required. The name of the GlossaryCategory to delete.
2227    /// Format:
2228    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
2229    pub name: std::string::String,
2230
2231    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2232}
2233
2234impl DeleteGlossaryCategoryRequest {
2235    pub fn new() -> Self {
2236        std::default::Default::default()
2237    }
2238
2239    /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
2240    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2241        self.name = v.into();
2242        self
2243    }
2244}
2245
2246impl wkt::message::Message for DeleteGlossaryCategoryRequest {
2247    fn typename() -> &'static str {
2248        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest"
2249    }
2250}
2251
2252/// Get GlossaryCategory Request
2253#[derive(Clone, Default, PartialEq)]
2254#[non_exhaustive]
2255pub struct GetGlossaryCategoryRequest {
2256    /// Required. The name of the GlossaryCategory to retrieve.
2257    /// Format:
2258    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
2259    pub name: std::string::String,
2260
2261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2262}
2263
2264impl GetGlossaryCategoryRequest {
2265    pub fn new() -> Self {
2266        std::default::Default::default()
2267    }
2268
2269    /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
2270    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2271        self.name = v.into();
2272        self
2273    }
2274}
2275
2276impl wkt::message::Message for GetGlossaryCategoryRequest {
2277    fn typename() -> &'static str {
2278        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryCategoryRequest"
2279    }
2280}
2281
2282/// List GlossaryCategories Request
2283#[derive(Clone, Default, PartialEq)]
2284#[non_exhaustive]
2285pub struct ListGlossaryCategoriesRequest {
2286    /// Required. The parent, which has this collection of GlossaryCategories.
2287    /// Format:
2288    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2289    /// Location is the Google Cloud region.
2290    pub parent: std::string::String,
2291
2292    /// Optional. The maximum number of GlossaryCategories to return. The service
2293    /// may return fewer than this value. If unspecified, at most 50
2294    /// GlossaryCategories will be returned. The maximum value is 1000; values
2295    /// above 1000 will be coerced to 1000.
2296    pub page_size: i32,
2297
2298    /// Optional. A page token, received from a previous `ListGlossaryCategories`
2299    /// call. Provide this to retrieve the subsequent page. When paginating, all
2300    /// other parameters provided to `ListGlossaryCategories` must match the call
2301    /// that provided the page token.
2302    pub page_token: std::string::String,
2303
2304    /// Optional. Filter expression that filters GlossaryCategories listed in the
2305    /// response. Filters are supported on the following fields:
2306    ///
2307    /// - immediate_parent
2308    ///
2309    /// ## Examples of using a filter are:
2310    ///
2311    /// ## `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
2312    ///
2313    /// `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
2314    ///
2315    /// This will only return the GlossaryCategories that are directly nested
2316    /// under the specified parent.
2317    pub filter: std::string::String,
2318
2319    /// Optional. Order by expression that orders GlossaryCategories listed in the
2320    /// response. Order by fields are: `name` or `create_time` for the result. If
2321    /// not specified, the ordering is undefined.
2322    pub order_by: std::string::String,
2323
2324    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2325}
2326
2327impl ListGlossaryCategoriesRequest {
2328    pub fn new() -> Self {
2329        std::default::Default::default()
2330    }
2331
2332    /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
2333    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2334        self.parent = v.into();
2335        self
2336    }
2337
2338    /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
2339    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2340        self.page_size = v.into();
2341        self
2342    }
2343
2344    /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
2345    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2346        self.page_token = v.into();
2347        self
2348    }
2349
2350    /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
2351    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2352        self.filter = v.into();
2353        self
2354    }
2355
2356    /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
2357    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2358        self.order_by = v.into();
2359        self
2360    }
2361}
2362
2363impl wkt::message::Message for ListGlossaryCategoriesRequest {
2364    fn typename() -> &'static str {
2365        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesRequest"
2366    }
2367}
2368
2369/// List GlossaryCategories Response
2370#[derive(Clone, Default, PartialEq)]
2371#[non_exhaustive]
2372pub struct ListGlossaryCategoriesResponse {
2373    /// Lists the GlossaryCategories in the specified parent.
2374    pub categories: std::vec::Vec<crate::model::GlossaryCategory>,
2375
2376    /// A token, which can be sent as `page_token` to retrieve the next page.
2377    /// If this field is omitted, there are no subsequent pages.
2378    pub next_page_token: std::string::String,
2379
2380    /// Locations that the service couldn't reach.
2381    pub unreachable_locations: std::vec::Vec<std::string::String>,
2382
2383    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2384}
2385
2386impl ListGlossaryCategoriesResponse {
2387    pub fn new() -> Self {
2388        std::default::Default::default()
2389    }
2390
2391    /// Sets the value of [categories][crate::model::ListGlossaryCategoriesResponse::categories].
2392    pub fn set_categories<T, V>(mut self, v: T) -> Self
2393    where
2394        T: std::iter::IntoIterator<Item = V>,
2395        V: std::convert::Into<crate::model::GlossaryCategory>,
2396    {
2397        use std::iter::Iterator;
2398        self.categories = v.into_iter().map(|i| i.into()).collect();
2399        self
2400    }
2401
2402    /// Sets the value of [next_page_token][crate::model::ListGlossaryCategoriesResponse::next_page_token].
2403    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2404        self.next_page_token = v.into();
2405        self
2406    }
2407
2408    /// Sets the value of [unreachable_locations][crate::model::ListGlossaryCategoriesResponse::unreachable_locations].
2409    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2410    where
2411        T: std::iter::IntoIterator<Item = V>,
2412        V: std::convert::Into<std::string::String>,
2413    {
2414        use std::iter::Iterator;
2415        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2416        self
2417    }
2418}
2419
2420impl wkt::message::Message for ListGlossaryCategoriesResponse {
2421    fn typename() -> &'static str {
2422        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesResponse"
2423    }
2424}
2425
2426#[doc(hidden)]
2427impl gax::paginator::internal::PageableResponse for ListGlossaryCategoriesResponse {
2428    type PageItem = crate::model::GlossaryCategory;
2429
2430    fn items(self) -> std::vec::Vec<Self::PageItem> {
2431        self.categories
2432    }
2433
2434    fn next_page_token(&self) -> std::string::String {
2435        use std::clone::Clone;
2436        self.next_page_token.clone()
2437    }
2438}
2439
2440/// Creates a new GlossaryTerm under the specified Glossary.
2441#[derive(Clone, Default, PartialEq)]
2442#[non_exhaustive]
2443pub struct CreateGlossaryTermRequest {
2444    /// Required. The parent resource where the GlossaryTerm will be created.
2445    /// Format:
2446    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2447    /// where `location_id` refers to a Google Cloud region.
2448    pub parent: std::string::String,
2449
2450    /// Required. GlossaryTerm identifier.
2451    pub term_id: std::string::String,
2452
2453    /// Required. The GlossaryTerm to create.
2454    pub term: std::option::Option<crate::model::GlossaryTerm>,
2455
2456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2457}
2458
2459impl CreateGlossaryTermRequest {
2460    pub fn new() -> Self {
2461        std::default::Default::default()
2462    }
2463
2464    /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
2465    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2466        self.parent = v.into();
2467        self
2468    }
2469
2470    /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
2471    pub fn set_term_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2472        self.term_id = v.into();
2473        self
2474    }
2475
2476    /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
2477    pub fn set_term<T>(mut self, v: T) -> Self
2478    where
2479        T: std::convert::Into<crate::model::GlossaryTerm>,
2480    {
2481        self.term = std::option::Option::Some(v.into());
2482        self
2483    }
2484
2485    /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
2486    pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
2487    where
2488        T: std::convert::Into<crate::model::GlossaryTerm>,
2489    {
2490        self.term = v.map(|x| x.into());
2491        self
2492    }
2493}
2494
2495impl wkt::message::Message for CreateGlossaryTermRequest {
2496    fn typename() -> &'static str {
2497        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryTermRequest"
2498    }
2499}
2500
2501/// Update GlossaryTerm Request
2502#[derive(Clone, Default, PartialEq)]
2503#[non_exhaustive]
2504pub struct UpdateGlossaryTermRequest {
2505    /// Required. The GlossaryTerm to update.
2506    /// The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
2507    /// update. Format:
2508    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
2509    pub term: std::option::Option<crate::model::GlossaryTerm>,
2510
2511    /// Required. The list of fields to update.
2512    pub update_mask: std::option::Option<wkt::FieldMask>,
2513
2514    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2515}
2516
2517impl UpdateGlossaryTermRequest {
2518    pub fn new() -> Self {
2519        std::default::Default::default()
2520    }
2521
2522    /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
2523    pub fn set_term<T>(mut self, v: T) -> Self
2524    where
2525        T: std::convert::Into<crate::model::GlossaryTerm>,
2526    {
2527        self.term = std::option::Option::Some(v.into());
2528        self
2529    }
2530
2531    /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
2532    pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
2533    where
2534        T: std::convert::Into<crate::model::GlossaryTerm>,
2535    {
2536        self.term = v.map(|x| x.into());
2537        self
2538    }
2539
2540    /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
2541    pub fn set_update_mask<T>(mut self, v: T) -> Self
2542    where
2543        T: std::convert::Into<wkt::FieldMask>,
2544    {
2545        self.update_mask = std::option::Option::Some(v.into());
2546        self
2547    }
2548
2549    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
2550    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2551    where
2552        T: std::convert::Into<wkt::FieldMask>,
2553    {
2554        self.update_mask = v.map(|x| x.into());
2555        self
2556    }
2557}
2558
2559impl wkt::message::Message for UpdateGlossaryTermRequest {
2560    fn typename() -> &'static str {
2561        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryTermRequest"
2562    }
2563}
2564
2565/// Delete GlossaryTerm Request
2566#[derive(Clone, Default, PartialEq)]
2567#[non_exhaustive]
2568pub struct DeleteGlossaryTermRequest {
2569    /// Required. The name of the GlossaryTerm to delete.
2570    /// Format:
2571    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
2572    pub name: std::string::String,
2573
2574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2575}
2576
2577impl DeleteGlossaryTermRequest {
2578    pub fn new() -> Self {
2579        std::default::Default::default()
2580    }
2581
2582    /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
2583    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2584        self.name = v.into();
2585        self
2586    }
2587}
2588
2589impl wkt::message::Message for DeleteGlossaryTermRequest {
2590    fn typename() -> &'static str {
2591        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryTermRequest"
2592    }
2593}
2594
2595/// Get GlossaryTerm Request
2596#[derive(Clone, Default, PartialEq)]
2597#[non_exhaustive]
2598pub struct GetGlossaryTermRequest {
2599    /// Required. The name of the GlossaryTerm to retrieve.
2600    /// Format:
2601    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
2602    pub name: std::string::String,
2603
2604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2605}
2606
2607impl GetGlossaryTermRequest {
2608    pub fn new() -> Self {
2609        std::default::Default::default()
2610    }
2611
2612    /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
2613    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2614        self.name = v.into();
2615        self
2616    }
2617}
2618
2619impl wkt::message::Message for GetGlossaryTermRequest {
2620    fn typename() -> &'static str {
2621        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryTermRequest"
2622    }
2623}
2624
2625/// List GlossaryTerms Request
2626#[derive(Clone, Default, PartialEq)]
2627#[non_exhaustive]
2628pub struct ListGlossaryTermsRequest {
2629    /// Required. The parent, which has this collection of GlossaryTerms.
2630    /// Format:
2631    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2632    /// where `location_id` refers to a Google Cloud region.
2633    pub parent: std::string::String,
2634
2635    /// Optional. The maximum number of GlossaryTerms to return. The service may
2636    /// return fewer than this value. If unspecified, at most 50 GlossaryTerms will
2637    /// be returned. The maximum value is 1000; values above 1000 will be coerced
2638    /// to 1000.
2639    pub page_size: i32,
2640
2641    /// Optional. A page token, received from a previous `ListGlossaryTerms` call.
2642    /// Provide this to retrieve the subsequent page.
2643    /// When paginating, all other parameters provided to `ListGlossaryTerms` must
2644    /// match the call that provided the page token.
2645    pub page_token: std::string::String,
2646
2647    /// Optional. Filter expression that filters GlossaryTerms listed in the
2648    /// response. Filters are supported on the following fields:
2649    ///
2650    /// - immediate_parent
2651    ///
2652    /// ## Examples of using a filter are:
2653    ///
2654    /// ## `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
2655    ///
2656    /// `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
2657    ///
2658    /// This will only return the GlossaryTerms that are directly nested under the
2659    /// specified parent.
2660    pub filter: std::string::String,
2661
2662    /// Optional. Order by expression that orders GlossaryTerms listed in the
2663    /// response. Order by fields are: `name` or `create_time` for the result. If
2664    /// not specified, the ordering is undefined.
2665    pub order_by: std::string::String,
2666
2667    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2668}
2669
2670impl ListGlossaryTermsRequest {
2671    pub fn new() -> Self {
2672        std::default::Default::default()
2673    }
2674
2675    /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
2676    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2677        self.parent = v.into();
2678        self
2679    }
2680
2681    /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
2682    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2683        self.page_size = v.into();
2684        self
2685    }
2686
2687    /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
2688    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2689        self.page_token = v.into();
2690        self
2691    }
2692
2693    /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
2694    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2695        self.filter = v.into();
2696        self
2697    }
2698
2699    /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
2700    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2701        self.order_by = v.into();
2702        self
2703    }
2704}
2705
2706impl wkt::message::Message for ListGlossaryTermsRequest {
2707    fn typename() -> &'static str {
2708        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsRequest"
2709    }
2710}
2711
2712/// List GlossaryTerms Response
2713#[derive(Clone, Default, PartialEq)]
2714#[non_exhaustive]
2715pub struct ListGlossaryTermsResponse {
2716    /// Lists the GlossaryTerms in the specified parent.
2717    pub terms: std::vec::Vec<crate::model::GlossaryTerm>,
2718
2719    /// A token, which can be sent as `page_token` to retrieve the next page.
2720    /// If this field is omitted, there are no subsequent pages.
2721    pub next_page_token: std::string::String,
2722
2723    /// Locations that the service couldn't reach.
2724    pub unreachable_locations: std::vec::Vec<std::string::String>,
2725
2726    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2727}
2728
2729impl ListGlossaryTermsResponse {
2730    pub fn new() -> Self {
2731        std::default::Default::default()
2732    }
2733
2734    /// Sets the value of [terms][crate::model::ListGlossaryTermsResponse::terms].
2735    pub fn set_terms<T, V>(mut self, v: T) -> Self
2736    where
2737        T: std::iter::IntoIterator<Item = V>,
2738        V: std::convert::Into<crate::model::GlossaryTerm>,
2739    {
2740        use std::iter::Iterator;
2741        self.terms = v.into_iter().map(|i| i.into()).collect();
2742        self
2743    }
2744
2745    /// Sets the value of [next_page_token][crate::model::ListGlossaryTermsResponse::next_page_token].
2746    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2747        self.next_page_token = v.into();
2748        self
2749    }
2750
2751    /// Sets the value of [unreachable_locations][crate::model::ListGlossaryTermsResponse::unreachable_locations].
2752    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2753    where
2754        T: std::iter::IntoIterator<Item = V>,
2755        V: std::convert::Into<std::string::String>,
2756    {
2757        use std::iter::Iterator;
2758        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2759        self
2760    }
2761}
2762
2763impl wkt::message::Message for ListGlossaryTermsResponse {
2764    fn typename() -> &'static str {
2765        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsResponse"
2766    }
2767}
2768
2769#[doc(hidden)]
2770impl gax::paginator::internal::PageableResponse for ListGlossaryTermsResponse {
2771    type PageItem = crate::model::GlossaryTerm;
2772
2773    fn items(self) -> std::vec::Vec<Self::PageItem> {
2774        self.terms
2775    }
2776
2777    fn next_page_token(&self) -> std::string::String {
2778        use std::clone::Clone;
2779        self.next_page_token.clone()
2780    }
2781}
2782
2783/// AspectType is a template for creating Aspects, and represents the
2784/// JSON-schema for a given Entry, for example, BigQuery Table Schema.
2785#[derive(Clone, Default, PartialEq)]
2786#[non_exhaustive]
2787pub struct AspectType {
2788    /// Output only. The relative resource name of the AspectType, of the form:
2789    /// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.
2790    pub name: std::string::String,
2791
2792    /// Output only. System generated globally unique ID for the AspectType.
2793    /// If you delete and recreate the AspectType with the same name, then this ID
2794    /// will be different.
2795    pub uid: std::string::String,
2796
2797    /// Output only. The time when the AspectType was created.
2798    pub create_time: std::option::Option<wkt::Timestamp>,
2799
2800    /// Output only. The time when the AspectType was last updated.
2801    pub update_time: std::option::Option<wkt::Timestamp>,
2802
2803    /// Optional. Description of the AspectType.
2804    pub description: std::string::String,
2805
2806    /// Optional. User friendly display name.
2807    pub display_name: std::string::String,
2808
2809    /// Optional. User-defined labels for the AspectType.
2810    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2811
2812    /// The service computes this checksum. The client may send it on update and
2813    /// delete requests to ensure it has an up-to-date value before proceeding.
2814    pub etag: std::string::String,
2815
2816    /// Optional. Immutable. Stores data classification of the aspect.
2817    pub data_classification: crate::model::aspect_type::DataClassification,
2818
2819    /// Immutable. Defines the Authorization for this type.
2820    pub authorization: std::option::Option<crate::model::aspect_type::Authorization>,
2821
2822    /// Required. MetadataTemplate of the aspect.
2823    pub metadata_template: std::option::Option<crate::model::aspect_type::MetadataTemplate>,
2824
2825    /// Output only. Denotes the transfer status of the Aspect Type. It is
2826    /// unspecified for Aspect Types created from Dataplex API.
2827    pub transfer_status: crate::model::TransferStatus,
2828
2829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2830}
2831
2832impl AspectType {
2833    pub fn new() -> Self {
2834        std::default::Default::default()
2835    }
2836
2837    /// Sets the value of [name][crate::model::AspectType::name].
2838    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2839        self.name = v.into();
2840        self
2841    }
2842
2843    /// Sets the value of [uid][crate::model::AspectType::uid].
2844    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2845        self.uid = v.into();
2846        self
2847    }
2848
2849    /// Sets the value of [create_time][crate::model::AspectType::create_time].
2850    pub fn set_create_time<T>(mut self, v: T) -> Self
2851    where
2852        T: std::convert::Into<wkt::Timestamp>,
2853    {
2854        self.create_time = std::option::Option::Some(v.into());
2855        self
2856    }
2857
2858    /// Sets or clears the value of [create_time][crate::model::AspectType::create_time].
2859    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2860    where
2861        T: std::convert::Into<wkt::Timestamp>,
2862    {
2863        self.create_time = v.map(|x| x.into());
2864        self
2865    }
2866
2867    /// Sets the value of [update_time][crate::model::AspectType::update_time].
2868    pub fn set_update_time<T>(mut self, v: T) -> Self
2869    where
2870        T: std::convert::Into<wkt::Timestamp>,
2871    {
2872        self.update_time = std::option::Option::Some(v.into());
2873        self
2874    }
2875
2876    /// Sets or clears the value of [update_time][crate::model::AspectType::update_time].
2877    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2878    where
2879        T: std::convert::Into<wkt::Timestamp>,
2880    {
2881        self.update_time = v.map(|x| x.into());
2882        self
2883    }
2884
2885    /// Sets the value of [description][crate::model::AspectType::description].
2886    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2887        self.description = v.into();
2888        self
2889    }
2890
2891    /// Sets the value of [display_name][crate::model::AspectType::display_name].
2892    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2893        self.display_name = v.into();
2894        self
2895    }
2896
2897    /// Sets the value of [labels][crate::model::AspectType::labels].
2898    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2899    where
2900        T: std::iter::IntoIterator<Item = (K, V)>,
2901        K: std::convert::Into<std::string::String>,
2902        V: std::convert::Into<std::string::String>,
2903    {
2904        use std::iter::Iterator;
2905        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2906        self
2907    }
2908
2909    /// Sets the value of [etag][crate::model::AspectType::etag].
2910    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2911        self.etag = v.into();
2912        self
2913    }
2914
2915    /// Sets the value of [data_classification][crate::model::AspectType::data_classification].
2916    pub fn set_data_classification<
2917        T: std::convert::Into<crate::model::aspect_type::DataClassification>,
2918    >(
2919        mut self,
2920        v: T,
2921    ) -> Self {
2922        self.data_classification = v.into();
2923        self
2924    }
2925
2926    /// Sets the value of [authorization][crate::model::AspectType::authorization].
2927    pub fn set_authorization<T>(mut self, v: T) -> Self
2928    where
2929        T: std::convert::Into<crate::model::aspect_type::Authorization>,
2930    {
2931        self.authorization = std::option::Option::Some(v.into());
2932        self
2933    }
2934
2935    /// Sets or clears the value of [authorization][crate::model::AspectType::authorization].
2936    pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
2937    where
2938        T: std::convert::Into<crate::model::aspect_type::Authorization>,
2939    {
2940        self.authorization = v.map(|x| x.into());
2941        self
2942    }
2943
2944    /// Sets the value of [metadata_template][crate::model::AspectType::metadata_template].
2945    pub fn set_metadata_template<T>(mut self, v: T) -> Self
2946    where
2947        T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
2948    {
2949        self.metadata_template = std::option::Option::Some(v.into());
2950        self
2951    }
2952
2953    /// Sets or clears the value of [metadata_template][crate::model::AspectType::metadata_template].
2954    pub fn set_or_clear_metadata_template<T>(mut self, v: std::option::Option<T>) -> Self
2955    where
2956        T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
2957    {
2958        self.metadata_template = v.map(|x| x.into());
2959        self
2960    }
2961
2962    /// Sets the value of [transfer_status][crate::model::AspectType::transfer_status].
2963    pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
2964        mut self,
2965        v: T,
2966    ) -> Self {
2967        self.transfer_status = v.into();
2968        self
2969    }
2970}
2971
2972impl wkt::message::Message for AspectType {
2973    fn typename() -> &'static str {
2974        "type.googleapis.com/google.cloud.dataplex.v1.AspectType"
2975    }
2976}
2977
2978/// Defines additional types related to [AspectType].
2979pub mod aspect_type {
2980    #[allow(unused_imports)]
2981    use super::*;
2982
2983    /// Authorization for an AspectType.
2984    #[derive(Clone, Default, PartialEq)]
2985    #[non_exhaustive]
2986    pub struct Authorization {
2987        /// Immutable. The IAM permission grantable on the EntryGroup to allow access
2988        /// to instantiate Aspects of Dataplex Universal Catalog owned AspectTypes,
2989        /// only settable for Dataplex Universal Catalog owned Types.
2990        pub alternate_use_permission: std::string::String,
2991
2992        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2993    }
2994
2995    impl Authorization {
2996        pub fn new() -> Self {
2997            std::default::Default::default()
2998        }
2999
3000        /// Sets the value of [alternate_use_permission][crate::model::aspect_type::Authorization::alternate_use_permission].
3001        pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
3002            mut self,
3003            v: T,
3004        ) -> Self {
3005            self.alternate_use_permission = v.into();
3006            self
3007        }
3008    }
3009
3010    impl wkt::message::Message for Authorization {
3011        fn typename() -> &'static str {
3012            "type.googleapis.com/google.cloud.dataplex.v1.AspectType.Authorization"
3013        }
3014    }
3015
3016    /// MetadataTemplate definition for an AspectType.
3017    #[derive(Clone, Default, PartialEq)]
3018    #[non_exhaustive]
3019    pub struct MetadataTemplate {
3020        /// Optional. Index is used to encode Template messages. The value of index
3021        /// can range between 1 and 2,147,483,647. Index must be unique within all
3022        /// fields in a Template. (Nested Templates can reuse indexes). Once a
3023        /// Template is defined, the index cannot be changed, because it identifies
3024        /// the field in the actual storage format. Index is a mandatory field, but
3025        /// it is optional for top level fields, and map/array "values" definitions.
3026        pub index: i32,
3027
3028        /// Required. The name of the field.
3029        pub name: std::string::String,
3030
3031        /// Required. The datatype of this field. The following values are supported:
3032        ///
3033        /// Primitive types:
3034        ///
3035        /// * string
3036        /// * int
3037        /// * bool
3038        /// * double
3039        /// * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples:
3040        ///   "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z").
3041        ///
3042        /// Complex types:
3043        ///
3044        /// * enum
3045        /// * array
3046        /// * map
3047        /// * record
3048        pub r#type: std::string::String,
3049
3050        /// Optional. Field definition. You must specify it if the type is record. It
3051        /// defines the nested fields.
3052        pub record_fields: std::vec::Vec<crate::model::aspect_type::MetadataTemplate>,
3053
3054        /// Optional. The list of values for an enum type. You must define it if the
3055        /// type is enum.
3056        pub enum_values: std::vec::Vec<crate::model::aspect_type::metadata_template::EnumValue>,
3057
3058        /// Optional. If the type is map, set map_items. map_items can refer to a
3059        /// primitive field or a complex (record only) field. To specify a primitive
3060        /// field, you only need to set name and type in the nested
3061        /// MetadataTemplate. The recommended value for the name field is item, as
3062        /// this isn't used in the actual payload.
3063        pub map_items:
3064            std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
3065
3066        /// Optional. If the type is array, set array_items. array_items can refer
3067        /// to a primitive field or a complex (record only) field. To specify a
3068        /// primitive field, you only need to set name and type in the nested
3069        /// MetadataTemplate. The recommended value for the name field is item, as
3070        /// this isn't used in the actual payload.
3071        pub array_items:
3072            std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
3073
3074        /// Optional. You can use type id if this definition of the field needs to be
3075        /// reused later. The type id must be unique across the entire template. You
3076        /// can only specify it if the field type is record.
3077        pub type_id: std::string::String,
3078
3079        /// Optional. A reference to another field definition (not an inline
3080        /// definition). The value must be equal to the value of an id field defined
3081        /// elsewhere in the MetadataTemplate. Only fields with record type can
3082        /// refer to other fields.
3083        pub type_ref: std::string::String,
3084
3085        /// Optional. Specifies the constraints on this field.
3086        pub constraints:
3087            std::option::Option<crate::model::aspect_type::metadata_template::Constraints>,
3088
3089        /// Optional. Specifies annotations on this field.
3090        pub annotations:
3091            std::option::Option<crate::model::aspect_type::metadata_template::Annotations>,
3092
3093        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3094    }
3095
3096    impl MetadataTemplate {
3097        pub fn new() -> Self {
3098            std::default::Default::default()
3099        }
3100
3101        /// Sets the value of [index][crate::model::aspect_type::MetadataTemplate::index].
3102        pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3103            self.index = v.into();
3104            self
3105        }
3106
3107        /// Sets the value of [name][crate::model::aspect_type::MetadataTemplate::name].
3108        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3109            self.name = v.into();
3110            self
3111        }
3112
3113        /// Sets the value of [r#type][crate::model::aspect_type::MetadataTemplate::type].
3114        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3115            self.r#type = v.into();
3116            self
3117        }
3118
3119        /// Sets the value of [record_fields][crate::model::aspect_type::MetadataTemplate::record_fields].
3120        pub fn set_record_fields<T, V>(mut self, v: T) -> Self
3121        where
3122            T: std::iter::IntoIterator<Item = V>,
3123            V: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3124        {
3125            use std::iter::Iterator;
3126            self.record_fields = v.into_iter().map(|i| i.into()).collect();
3127            self
3128        }
3129
3130        /// Sets the value of [enum_values][crate::model::aspect_type::MetadataTemplate::enum_values].
3131        pub fn set_enum_values<T, V>(mut self, v: T) -> Self
3132        where
3133            T: std::iter::IntoIterator<Item = V>,
3134            V: std::convert::Into<crate::model::aspect_type::metadata_template::EnumValue>,
3135        {
3136            use std::iter::Iterator;
3137            self.enum_values = v.into_iter().map(|i| i.into()).collect();
3138            self
3139        }
3140
3141        /// Sets the value of [map_items][crate::model::aspect_type::MetadataTemplate::map_items].
3142        pub fn set_map_items<T>(mut self, v: T) -> Self
3143        where
3144            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3145        {
3146            self.map_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
3147            self
3148        }
3149
3150        /// Sets or clears the value of [map_items][crate::model::aspect_type::MetadataTemplate::map_items].
3151        pub fn set_or_clear_map_items<T>(mut self, v: std::option::Option<T>) -> Self
3152        where
3153            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3154        {
3155            self.map_items = v.map(|x| std::boxed::Box::new(x.into()));
3156            self
3157        }
3158
3159        /// Sets the value of [array_items][crate::model::aspect_type::MetadataTemplate::array_items].
3160        pub fn set_array_items<T>(mut self, v: T) -> Self
3161        where
3162            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3163        {
3164            self.array_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
3165            self
3166        }
3167
3168        /// Sets or clears the value of [array_items][crate::model::aspect_type::MetadataTemplate::array_items].
3169        pub fn set_or_clear_array_items<T>(mut self, v: std::option::Option<T>) -> Self
3170        where
3171            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3172        {
3173            self.array_items = v.map(|x| std::boxed::Box::new(x.into()));
3174            self
3175        }
3176
3177        /// Sets the value of [type_id][crate::model::aspect_type::MetadataTemplate::type_id].
3178        pub fn set_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3179            self.type_id = v.into();
3180            self
3181        }
3182
3183        /// Sets the value of [type_ref][crate::model::aspect_type::MetadataTemplate::type_ref].
3184        pub fn set_type_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3185            self.type_ref = v.into();
3186            self
3187        }
3188
3189        /// Sets the value of [constraints][crate::model::aspect_type::MetadataTemplate::constraints].
3190        pub fn set_constraints<T>(mut self, v: T) -> Self
3191        where
3192            T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
3193        {
3194            self.constraints = std::option::Option::Some(v.into());
3195            self
3196        }
3197
3198        /// Sets or clears the value of [constraints][crate::model::aspect_type::MetadataTemplate::constraints].
3199        pub fn set_or_clear_constraints<T>(mut self, v: std::option::Option<T>) -> Self
3200        where
3201            T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
3202        {
3203            self.constraints = v.map(|x| x.into());
3204            self
3205        }
3206
3207        /// Sets the value of [annotations][crate::model::aspect_type::MetadataTemplate::annotations].
3208        pub fn set_annotations<T>(mut self, v: T) -> Self
3209        where
3210            T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
3211        {
3212            self.annotations = std::option::Option::Some(v.into());
3213            self
3214        }
3215
3216        /// Sets or clears the value of [annotations][crate::model::aspect_type::MetadataTemplate::annotations].
3217        pub fn set_or_clear_annotations<T>(mut self, v: std::option::Option<T>) -> Self
3218        where
3219            T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
3220        {
3221            self.annotations = v.map(|x| x.into());
3222            self
3223        }
3224    }
3225
3226    impl wkt::message::Message for MetadataTemplate {
3227        fn typename() -> &'static str {
3228            "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate"
3229        }
3230    }
3231
3232    /// Defines additional types related to [MetadataTemplate].
3233    pub mod metadata_template {
3234        #[allow(unused_imports)]
3235        use super::*;
3236
3237        /// Definition of Enumvalue, to be used for enum fields.
3238        #[derive(Clone, Default, PartialEq)]
3239        #[non_exhaustive]
3240        pub struct EnumValue {
3241            /// Required. Index for the enum value. It can't be modified.
3242            pub index: i32,
3243
3244            /// Required. Name of the enumvalue. This is the actual value that the
3245            /// aspect can contain.
3246            pub name: std::string::String,
3247
3248            /// Optional. You can set this message if you need to deprecate an enum
3249            /// value.
3250            pub deprecated: std::string::String,
3251
3252            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3253        }
3254
3255        impl EnumValue {
3256            pub fn new() -> Self {
3257                std::default::Default::default()
3258            }
3259
3260            /// Sets the value of [index][crate::model::aspect_type::metadata_template::EnumValue::index].
3261            pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3262                self.index = v.into();
3263                self
3264            }
3265
3266            /// Sets the value of [name][crate::model::aspect_type::metadata_template::EnumValue::name].
3267            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3268                self.name = v.into();
3269                self
3270            }
3271
3272            /// Sets the value of [deprecated][crate::model::aspect_type::metadata_template::EnumValue::deprecated].
3273            pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
3274                mut self,
3275                v: T,
3276            ) -> Self {
3277                self.deprecated = v.into();
3278                self
3279            }
3280        }
3281
3282        impl wkt::message::Message for EnumValue {
3283            fn typename() -> &'static str {
3284                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue"
3285            }
3286        }
3287
3288        /// Definition of the constraints of a field.
3289        #[derive(Clone, Default, PartialEq)]
3290        #[non_exhaustive]
3291        pub struct Constraints {
3292            /// Optional. Marks this field as optional or required.
3293            pub required: bool,
3294
3295            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3296        }
3297
3298        impl Constraints {
3299            pub fn new() -> Self {
3300                std::default::Default::default()
3301            }
3302
3303            /// Sets the value of [required][crate::model::aspect_type::metadata_template::Constraints::required].
3304            pub fn set_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3305                self.required = v.into();
3306                self
3307            }
3308        }
3309
3310        impl wkt::message::Message for Constraints {
3311            fn typename() -> &'static str {
3312                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints"
3313            }
3314        }
3315
3316        /// Definition of the annotations of a field.
3317        #[derive(Clone, Default, PartialEq)]
3318        #[non_exhaustive]
3319        pub struct Annotations {
3320            /// Optional. Marks a field as deprecated. You can include a deprecation
3321            /// message.
3322            pub deprecated: std::string::String,
3323
3324            /// Optional. Display name for a field.
3325            pub display_name: std::string::String,
3326
3327            /// Optional. Description for a field.
3328            pub description: std::string::String,
3329
3330            /// Optional. Display order for a field. You can use this to reorder where
3331            /// a field is rendered.
3332            pub display_order: i32,
3333
3334            /// Optional. You can use String Type annotations to specify special
3335            /// meaning to string fields. The following values are supported:
3336            ///
3337            /// * richText: The field must be interpreted as a rich text field.
3338            /// * url: A fully qualified URL link.
3339            /// * resource: A service qualified resource reference.
3340            pub string_type: std::string::String,
3341
3342            /// Optional. Suggested hints for string fields. You can use them to
3343            /// suggest values to users through console.
3344            pub string_values: std::vec::Vec<std::string::String>,
3345
3346            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3347        }
3348
3349        impl Annotations {
3350            pub fn new() -> Self {
3351                std::default::Default::default()
3352            }
3353
3354            /// Sets the value of [deprecated][crate::model::aspect_type::metadata_template::Annotations::deprecated].
3355            pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
3356                mut self,
3357                v: T,
3358            ) -> Self {
3359                self.deprecated = v.into();
3360                self
3361            }
3362
3363            /// Sets the value of [display_name][crate::model::aspect_type::metadata_template::Annotations::display_name].
3364            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
3365                mut self,
3366                v: T,
3367            ) -> Self {
3368                self.display_name = v.into();
3369                self
3370            }
3371
3372            /// Sets the value of [description][crate::model::aspect_type::metadata_template::Annotations::description].
3373            pub fn set_description<T: std::convert::Into<std::string::String>>(
3374                mut self,
3375                v: T,
3376            ) -> Self {
3377                self.description = v.into();
3378                self
3379            }
3380
3381            /// Sets the value of [display_order][crate::model::aspect_type::metadata_template::Annotations::display_order].
3382            pub fn set_display_order<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3383                self.display_order = v.into();
3384                self
3385            }
3386
3387            /// Sets the value of [string_type][crate::model::aspect_type::metadata_template::Annotations::string_type].
3388            pub fn set_string_type<T: std::convert::Into<std::string::String>>(
3389                mut self,
3390                v: T,
3391            ) -> Self {
3392                self.string_type = v.into();
3393                self
3394            }
3395
3396            /// Sets the value of [string_values][crate::model::aspect_type::metadata_template::Annotations::string_values].
3397            pub fn set_string_values<T, V>(mut self, v: T) -> Self
3398            where
3399                T: std::iter::IntoIterator<Item = V>,
3400                V: std::convert::Into<std::string::String>,
3401            {
3402                use std::iter::Iterator;
3403                self.string_values = v.into_iter().map(|i| i.into()).collect();
3404                self
3405            }
3406        }
3407
3408        impl wkt::message::Message for Annotations {
3409            fn typename() -> &'static str {
3410                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations"
3411            }
3412        }
3413    }
3414
3415    /// Classifies the data stored by the aspect.
3416    ///
3417    /// # Working with unknown values
3418    ///
3419    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3420    /// additional enum variants at any time. Adding new variants is not considered
3421    /// a breaking change. Applications should write their code in anticipation of:
3422    ///
3423    /// - New values appearing in future releases of the client library, **and**
3424    /// - New values received dynamically, without application changes.
3425    ///
3426    /// Please consult the [Working with enums] section in the user guide for some
3427    /// guidelines.
3428    ///
3429    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3430    #[derive(Clone, Debug, PartialEq)]
3431    #[non_exhaustive]
3432    pub enum DataClassification {
3433        /// Denotes that the aspect contains only metadata.
3434        Unspecified,
3435        /// Metadata and data classification.
3436        MetadataAndData,
3437        /// If set, the enum was initialized with an unknown value.
3438        ///
3439        /// Applications can examine the value using [DataClassification::value] or
3440        /// [DataClassification::name].
3441        UnknownValue(data_classification::UnknownValue),
3442    }
3443
3444    #[doc(hidden)]
3445    pub mod data_classification {
3446        #[allow(unused_imports)]
3447        use super::*;
3448        #[derive(Clone, Debug, PartialEq)]
3449        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3450    }
3451
3452    impl DataClassification {
3453        /// Gets the enum value.
3454        ///
3455        /// Returns `None` if the enum contains an unknown value deserialized from
3456        /// the string representation of enums.
3457        pub fn value(&self) -> std::option::Option<i32> {
3458            match self {
3459                Self::Unspecified => std::option::Option::Some(0),
3460                Self::MetadataAndData => std::option::Option::Some(1),
3461                Self::UnknownValue(u) => u.0.value(),
3462            }
3463        }
3464
3465        /// Gets the enum value as a string.
3466        ///
3467        /// Returns `None` if the enum contains an unknown value deserialized from
3468        /// the integer representation of enums.
3469        pub fn name(&self) -> std::option::Option<&str> {
3470            match self {
3471                Self::Unspecified => std::option::Option::Some("DATA_CLASSIFICATION_UNSPECIFIED"),
3472                Self::MetadataAndData => std::option::Option::Some("METADATA_AND_DATA"),
3473                Self::UnknownValue(u) => u.0.name(),
3474            }
3475        }
3476    }
3477
3478    impl std::default::Default for DataClassification {
3479        fn default() -> Self {
3480            use std::convert::From;
3481            Self::from(0)
3482        }
3483    }
3484
3485    impl std::fmt::Display for DataClassification {
3486        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3487            wkt::internal::display_enum(f, self.name(), self.value())
3488        }
3489    }
3490
3491    impl std::convert::From<i32> for DataClassification {
3492        fn from(value: i32) -> Self {
3493            match value {
3494                0 => Self::Unspecified,
3495                1 => Self::MetadataAndData,
3496                _ => Self::UnknownValue(data_classification::UnknownValue(
3497                    wkt::internal::UnknownEnumValue::Integer(value),
3498                )),
3499            }
3500        }
3501    }
3502
3503    impl std::convert::From<&str> for DataClassification {
3504        fn from(value: &str) -> Self {
3505            use std::string::ToString;
3506            match value {
3507                "DATA_CLASSIFICATION_UNSPECIFIED" => Self::Unspecified,
3508                "METADATA_AND_DATA" => Self::MetadataAndData,
3509                _ => Self::UnknownValue(data_classification::UnknownValue(
3510                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3511                )),
3512            }
3513        }
3514    }
3515
3516    impl serde::ser::Serialize for DataClassification {
3517        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3518        where
3519            S: serde::Serializer,
3520        {
3521            match self {
3522                Self::Unspecified => serializer.serialize_i32(0),
3523                Self::MetadataAndData => serializer.serialize_i32(1),
3524                Self::UnknownValue(u) => u.0.serialize(serializer),
3525            }
3526        }
3527    }
3528
3529    impl<'de> serde::de::Deserialize<'de> for DataClassification {
3530        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3531        where
3532            D: serde::Deserializer<'de>,
3533        {
3534            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataClassification>::new(
3535                ".google.cloud.dataplex.v1.AspectType.DataClassification",
3536            ))
3537        }
3538    }
3539}
3540
3541/// An Entry Group represents a logical grouping of one or more Entries.
3542#[derive(Clone, Default, PartialEq)]
3543#[non_exhaustive]
3544pub struct EntryGroup {
3545    /// Output only. The relative resource name of the EntryGroup, in the format
3546    /// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}.
3547    pub name: std::string::String,
3548
3549    /// Output only. System generated globally unique ID for the EntryGroup. If you
3550    /// delete and recreate the EntryGroup with the same name, this ID will be
3551    /// different.
3552    pub uid: std::string::String,
3553
3554    /// Output only. The time when the EntryGroup was created.
3555    pub create_time: std::option::Option<wkt::Timestamp>,
3556
3557    /// Output only. The time when the EntryGroup was last updated.
3558    pub update_time: std::option::Option<wkt::Timestamp>,
3559
3560    /// Optional. Description of the EntryGroup.
3561    pub description: std::string::String,
3562
3563    /// Optional. User friendly display name.
3564    pub display_name: std::string::String,
3565
3566    /// Optional. User-defined labels for the EntryGroup.
3567    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3568
3569    /// This checksum is computed by the service, and might be sent on update and
3570    /// delete requests to ensure the client has an up-to-date value before
3571    /// proceeding.
3572    pub etag: std::string::String,
3573
3574    /// Output only. Denotes the transfer status of the Entry Group. It is
3575    /// unspecified for Entry Group created from Dataplex API.
3576    pub transfer_status: crate::model::TransferStatus,
3577
3578    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3579}
3580
3581impl EntryGroup {
3582    pub fn new() -> Self {
3583        std::default::Default::default()
3584    }
3585
3586    /// Sets the value of [name][crate::model::EntryGroup::name].
3587    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3588        self.name = v.into();
3589        self
3590    }
3591
3592    /// Sets the value of [uid][crate::model::EntryGroup::uid].
3593    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3594        self.uid = v.into();
3595        self
3596    }
3597
3598    /// Sets the value of [create_time][crate::model::EntryGroup::create_time].
3599    pub fn set_create_time<T>(mut self, v: T) -> Self
3600    where
3601        T: std::convert::Into<wkt::Timestamp>,
3602    {
3603        self.create_time = std::option::Option::Some(v.into());
3604        self
3605    }
3606
3607    /// Sets or clears the value of [create_time][crate::model::EntryGroup::create_time].
3608    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3609    where
3610        T: std::convert::Into<wkt::Timestamp>,
3611    {
3612        self.create_time = v.map(|x| x.into());
3613        self
3614    }
3615
3616    /// Sets the value of [update_time][crate::model::EntryGroup::update_time].
3617    pub fn set_update_time<T>(mut self, v: T) -> Self
3618    where
3619        T: std::convert::Into<wkt::Timestamp>,
3620    {
3621        self.update_time = std::option::Option::Some(v.into());
3622        self
3623    }
3624
3625    /// Sets or clears the value of [update_time][crate::model::EntryGroup::update_time].
3626    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3627    where
3628        T: std::convert::Into<wkt::Timestamp>,
3629    {
3630        self.update_time = v.map(|x| x.into());
3631        self
3632    }
3633
3634    /// Sets the value of [description][crate::model::EntryGroup::description].
3635    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3636        self.description = v.into();
3637        self
3638    }
3639
3640    /// Sets the value of [display_name][crate::model::EntryGroup::display_name].
3641    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3642        self.display_name = v.into();
3643        self
3644    }
3645
3646    /// Sets the value of [labels][crate::model::EntryGroup::labels].
3647    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3648    where
3649        T: std::iter::IntoIterator<Item = (K, V)>,
3650        K: std::convert::Into<std::string::String>,
3651        V: std::convert::Into<std::string::String>,
3652    {
3653        use std::iter::Iterator;
3654        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3655        self
3656    }
3657
3658    /// Sets the value of [etag][crate::model::EntryGroup::etag].
3659    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3660        self.etag = v.into();
3661        self
3662    }
3663
3664    /// Sets the value of [transfer_status][crate::model::EntryGroup::transfer_status].
3665    pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
3666        mut self,
3667        v: T,
3668    ) -> Self {
3669        self.transfer_status = v.into();
3670        self
3671    }
3672}
3673
3674impl wkt::message::Message for EntryGroup {
3675    fn typename() -> &'static str {
3676        "type.googleapis.com/google.cloud.dataplex.v1.EntryGroup"
3677    }
3678}
3679
3680/// Entry Type is a template for creating Entries.
3681#[derive(Clone, Default, PartialEq)]
3682#[non_exhaustive]
3683pub struct EntryType {
3684    /// Output only. The relative resource name of the EntryType, of the form:
3685    /// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.
3686    pub name: std::string::String,
3687
3688    /// Output only. System generated globally unique ID for the EntryType. This ID
3689    /// will be different if the EntryType is deleted and re-created with the same
3690    /// name.
3691    pub uid: std::string::String,
3692
3693    /// Output only. The time when the EntryType was created.
3694    pub create_time: std::option::Option<wkt::Timestamp>,
3695
3696    /// Output only. The time when the EntryType was last updated.
3697    pub update_time: std::option::Option<wkt::Timestamp>,
3698
3699    /// Optional. Description of the EntryType.
3700    pub description: std::string::String,
3701
3702    /// Optional. User friendly display name.
3703    pub display_name: std::string::String,
3704
3705    /// Optional. User-defined labels for the EntryType.
3706    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3707
3708    /// Optional. This checksum is computed by the service, and might be sent on
3709    /// update and delete requests to ensure the client has an up-to-date value
3710    /// before proceeding.
3711    pub etag: std::string::String,
3712
3713    /// Optional. Indicates the classes this Entry Type belongs to, for example,
3714    /// TABLE, DATABASE, MODEL.
3715    pub type_aliases: std::vec::Vec<std::string::String>,
3716
3717    /// Optional. The platform that Entries of this type belongs to.
3718    pub platform: std::string::String,
3719
3720    /// Optional. The system that Entries of this type belongs to. Examples include
3721    /// CloudSQL, MariaDB etc
3722    pub system: std::string::String,
3723
3724    /// AspectInfo for the entry type.
3725    pub required_aspects: std::vec::Vec<crate::model::entry_type::AspectInfo>,
3726
3727    /// Immutable. Authorization defined for this type.
3728    pub authorization: std::option::Option<crate::model::entry_type::Authorization>,
3729
3730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3731}
3732
3733impl EntryType {
3734    pub fn new() -> Self {
3735        std::default::Default::default()
3736    }
3737
3738    /// Sets the value of [name][crate::model::EntryType::name].
3739    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3740        self.name = v.into();
3741        self
3742    }
3743
3744    /// Sets the value of [uid][crate::model::EntryType::uid].
3745    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3746        self.uid = v.into();
3747        self
3748    }
3749
3750    /// Sets the value of [create_time][crate::model::EntryType::create_time].
3751    pub fn set_create_time<T>(mut self, v: T) -> Self
3752    where
3753        T: std::convert::Into<wkt::Timestamp>,
3754    {
3755        self.create_time = std::option::Option::Some(v.into());
3756        self
3757    }
3758
3759    /// Sets or clears the value of [create_time][crate::model::EntryType::create_time].
3760    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3761    where
3762        T: std::convert::Into<wkt::Timestamp>,
3763    {
3764        self.create_time = v.map(|x| x.into());
3765        self
3766    }
3767
3768    /// Sets the value of [update_time][crate::model::EntryType::update_time].
3769    pub fn set_update_time<T>(mut self, v: T) -> Self
3770    where
3771        T: std::convert::Into<wkt::Timestamp>,
3772    {
3773        self.update_time = std::option::Option::Some(v.into());
3774        self
3775    }
3776
3777    /// Sets or clears the value of [update_time][crate::model::EntryType::update_time].
3778    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3779    where
3780        T: std::convert::Into<wkt::Timestamp>,
3781    {
3782        self.update_time = v.map(|x| x.into());
3783        self
3784    }
3785
3786    /// Sets the value of [description][crate::model::EntryType::description].
3787    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3788        self.description = v.into();
3789        self
3790    }
3791
3792    /// Sets the value of [display_name][crate::model::EntryType::display_name].
3793    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3794        self.display_name = v.into();
3795        self
3796    }
3797
3798    /// Sets the value of [labels][crate::model::EntryType::labels].
3799    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3800    where
3801        T: std::iter::IntoIterator<Item = (K, V)>,
3802        K: std::convert::Into<std::string::String>,
3803        V: std::convert::Into<std::string::String>,
3804    {
3805        use std::iter::Iterator;
3806        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3807        self
3808    }
3809
3810    /// Sets the value of [etag][crate::model::EntryType::etag].
3811    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3812        self.etag = v.into();
3813        self
3814    }
3815
3816    /// Sets the value of [type_aliases][crate::model::EntryType::type_aliases].
3817    pub fn set_type_aliases<T, V>(mut self, v: T) -> Self
3818    where
3819        T: std::iter::IntoIterator<Item = V>,
3820        V: std::convert::Into<std::string::String>,
3821    {
3822        use std::iter::Iterator;
3823        self.type_aliases = v.into_iter().map(|i| i.into()).collect();
3824        self
3825    }
3826
3827    /// Sets the value of [platform][crate::model::EntryType::platform].
3828    pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3829        self.platform = v.into();
3830        self
3831    }
3832
3833    /// Sets the value of [system][crate::model::EntryType::system].
3834    pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3835        self.system = v.into();
3836        self
3837    }
3838
3839    /// Sets the value of [required_aspects][crate::model::EntryType::required_aspects].
3840    pub fn set_required_aspects<T, V>(mut self, v: T) -> Self
3841    where
3842        T: std::iter::IntoIterator<Item = V>,
3843        V: std::convert::Into<crate::model::entry_type::AspectInfo>,
3844    {
3845        use std::iter::Iterator;
3846        self.required_aspects = v.into_iter().map(|i| i.into()).collect();
3847        self
3848    }
3849
3850    /// Sets the value of [authorization][crate::model::EntryType::authorization].
3851    pub fn set_authorization<T>(mut self, v: T) -> Self
3852    where
3853        T: std::convert::Into<crate::model::entry_type::Authorization>,
3854    {
3855        self.authorization = std::option::Option::Some(v.into());
3856        self
3857    }
3858
3859    /// Sets or clears the value of [authorization][crate::model::EntryType::authorization].
3860    pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
3861    where
3862        T: std::convert::Into<crate::model::entry_type::Authorization>,
3863    {
3864        self.authorization = v.map(|x| x.into());
3865        self
3866    }
3867}
3868
3869impl wkt::message::Message for EntryType {
3870    fn typename() -> &'static str {
3871        "type.googleapis.com/google.cloud.dataplex.v1.EntryType"
3872    }
3873}
3874
3875/// Defines additional types related to [EntryType].
3876pub mod entry_type {
3877    #[allow(unused_imports)]
3878    use super::*;
3879
3880    #[derive(Clone, Default, PartialEq)]
3881    #[non_exhaustive]
3882    pub struct AspectInfo {
3883        /// Required aspect type for the entry type.
3884        pub r#type: std::string::String,
3885
3886        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3887    }
3888
3889    impl AspectInfo {
3890        pub fn new() -> Self {
3891            std::default::Default::default()
3892        }
3893
3894        /// Sets the value of [r#type][crate::model::entry_type::AspectInfo::type].
3895        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3896            self.r#type = v.into();
3897            self
3898        }
3899    }
3900
3901    impl wkt::message::Message for AspectInfo {
3902        fn typename() -> &'static str {
3903            "type.googleapis.com/google.cloud.dataplex.v1.EntryType.AspectInfo"
3904        }
3905    }
3906
3907    /// Authorization for an Entry Type.
3908    #[derive(Clone, Default, PartialEq)]
3909    #[non_exhaustive]
3910    pub struct Authorization {
3911        /// Immutable. The IAM permission grantable on the Entry Group to allow
3912        /// access to instantiate Entries of Dataplex Universal Catalog owned Entry
3913        /// Types, only settable for Dataplex Universal Catalog owned Types.
3914        pub alternate_use_permission: std::string::String,
3915
3916        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3917    }
3918
3919    impl Authorization {
3920        pub fn new() -> Self {
3921            std::default::Default::default()
3922        }
3923
3924        /// Sets the value of [alternate_use_permission][crate::model::entry_type::Authorization::alternate_use_permission].
3925        pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
3926            mut self,
3927            v: T,
3928        ) -> Self {
3929            self.alternate_use_permission = v.into();
3930            self
3931        }
3932    }
3933
3934    impl wkt::message::Message for Authorization {
3935        fn typename() -> &'static str {
3936            "type.googleapis.com/google.cloud.dataplex.v1.EntryType.Authorization"
3937        }
3938    }
3939}
3940
3941/// An aspect is a single piece of metadata describing an entry.
3942#[derive(Clone, Default, PartialEq)]
3943#[non_exhaustive]
3944pub struct Aspect {
3945    /// Output only. The resource name of the type used to create this Aspect.
3946    pub aspect_type: std::string::String,
3947
3948    /// Output only. The path in the entry under which the aspect is attached.
3949    pub path: std::string::String,
3950
3951    /// Output only. The time when the Aspect was created.
3952    pub create_time: std::option::Option<wkt::Timestamp>,
3953
3954    /// Output only. The time when the Aspect was last updated.
3955    pub update_time: std::option::Option<wkt::Timestamp>,
3956
3957    /// Required. The content of the aspect, according to its aspect type schema.
3958    /// The maximum size of the field is 120KB (encoded as UTF-8).
3959    pub data: std::option::Option<wkt::Struct>,
3960
3961    /// Optional. Information related to the source system of the aspect.
3962    pub aspect_source: std::option::Option<crate::model::AspectSource>,
3963
3964    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3965}
3966
3967impl Aspect {
3968    pub fn new() -> Self {
3969        std::default::Default::default()
3970    }
3971
3972    /// Sets the value of [aspect_type][crate::model::Aspect::aspect_type].
3973    pub fn set_aspect_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3974        self.aspect_type = v.into();
3975        self
3976    }
3977
3978    /// Sets the value of [path][crate::model::Aspect::path].
3979    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3980        self.path = v.into();
3981        self
3982    }
3983
3984    /// Sets the value of [create_time][crate::model::Aspect::create_time].
3985    pub fn set_create_time<T>(mut self, v: T) -> Self
3986    where
3987        T: std::convert::Into<wkt::Timestamp>,
3988    {
3989        self.create_time = std::option::Option::Some(v.into());
3990        self
3991    }
3992
3993    /// Sets or clears the value of [create_time][crate::model::Aspect::create_time].
3994    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3995    where
3996        T: std::convert::Into<wkt::Timestamp>,
3997    {
3998        self.create_time = v.map(|x| x.into());
3999        self
4000    }
4001
4002    /// Sets the value of [update_time][crate::model::Aspect::update_time].
4003    pub fn set_update_time<T>(mut self, v: T) -> Self
4004    where
4005        T: std::convert::Into<wkt::Timestamp>,
4006    {
4007        self.update_time = std::option::Option::Some(v.into());
4008        self
4009    }
4010
4011    /// Sets or clears the value of [update_time][crate::model::Aspect::update_time].
4012    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4013    where
4014        T: std::convert::Into<wkt::Timestamp>,
4015    {
4016        self.update_time = v.map(|x| x.into());
4017        self
4018    }
4019
4020    /// Sets the value of [data][crate::model::Aspect::data].
4021    pub fn set_data<T>(mut self, v: T) -> Self
4022    where
4023        T: std::convert::Into<wkt::Struct>,
4024    {
4025        self.data = std::option::Option::Some(v.into());
4026        self
4027    }
4028
4029    /// Sets or clears the value of [data][crate::model::Aspect::data].
4030    pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
4031    where
4032        T: std::convert::Into<wkt::Struct>,
4033    {
4034        self.data = v.map(|x| x.into());
4035        self
4036    }
4037
4038    /// Sets the value of [aspect_source][crate::model::Aspect::aspect_source].
4039    pub fn set_aspect_source<T>(mut self, v: T) -> Self
4040    where
4041        T: std::convert::Into<crate::model::AspectSource>,
4042    {
4043        self.aspect_source = std::option::Option::Some(v.into());
4044        self
4045    }
4046
4047    /// Sets or clears the value of [aspect_source][crate::model::Aspect::aspect_source].
4048    pub fn set_or_clear_aspect_source<T>(mut self, v: std::option::Option<T>) -> Self
4049    where
4050        T: std::convert::Into<crate::model::AspectSource>,
4051    {
4052        self.aspect_source = v.map(|x| x.into());
4053        self
4054    }
4055}
4056
4057impl wkt::message::Message for Aspect {
4058    fn typename() -> &'static str {
4059        "type.googleapis.com/google.cloud.dataplex.v1.Aspect"
4060    }
4061}
4062
4063/// Information related to the source system of the aspect.
4064#[derive(Clone, Default, PartialEq)]
4065#[non_exhaustive]
4066pub struct AspectSource {
4067    /// The time the aspect was created in the source system.
4068    pub create_time: std::option::Option<wkt::Timestamp>,
4069
4070    /// The time the aspect was last updated in the source system.
4071    pub update_time: std::option::Option<wkt::Timestamp>,
4072
4073    /// The version of the data format used to produce this data. This field is
4074    /// used to indicated when the underlying data format changes (e.g., schema
4075    /// modifications, changes to the source URL format definition, etc).
4076    pub data_version: std::string::String,
4077
4078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4079}
4080
4081impl AspectSource {
4082    pub fn new() -> Self {
4083        std::default::Default::default()
4084    }
4085
4086    /// Sets the value of [create_time][crate::model::AspectSource::create_time].
4087    pub fn set_create_time<T>(mut self, v: T) -> Self
4088    where
4089        T: std::convert::Into<wkt::Timestamp>,
4090    {
4091        self.create_time = std::option::Option::Some(v.into());
4092        self
4093    }
4094
4095    /// Sets or clears the value of [create_time][crate::model::AspectSource::create_time].
4096    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4097    where
4098        T: std::convert::Into<wkt::Timestamp>,
4099    {
4100        self.create_time = v.map(|x| x.into());
4101        self
4102    }
4103
4104    /// Sets the value of [update_time][crate::model::AspectSource::update_time].
4105    pub fn set_update_time<T>(mut self, v: T) -> Self
4106    where
4107        T: std::convert::Into<wkt::Timestamp>,
4108    {
4109        self.update_time = std::option::Option::Some(v.into());
4110        self
4111    }
4112
4113    /// Sets or clears the value of [update_time][crate::model::AspectSource::update_time].
4114    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4115    where
4116        T: std::convert::Into<wkt::Timestamp>,
4117    {
4118        self.update_time = v.map(|x| x.into());
4119        self
4120    }
4121
4122    /// Sets the value of [data_version][crate::model::AspectSource::data_version].
4123    pub fn set_data_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4124        self.data_version = v.into();
4125        self
4126    }
4127}
4128
4129impl wkt::message::Message for AspectSource {
4130    fn typename() -> &'static str {
4131        "type.googleapis.com/google.cloud.dataplex.v1.AspectSource"
4132    }
4133}
4134
4135/// An entry is a representation of a data resource that can be described by
4136/// various metadata.
4137#[derive(Clone, Default, PartialEq)]
4138#[non_exhaustive]
4139pub struct Entry {
4140    /// Identifier. The relative resource name of the entry, in the format
4141    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
4142    pub name: std::string::String,
4143
4144    /// Required. Immutable. The relative resource name of the entry type that was
4145    /// used to create this entry, in the format
4146    /// `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
4147    pub entry_type: std::string::String,
4148
4149    /// Output only. The time when the entry was created in Dataplex Universal
4150    /// Catalog.
4151    pub create_time: std::option::Option<wkt::Timestamp>,
4152
4153    /// Output only. The time when the entry was last updated in Dataplex Universal
4154    /// Catalog.
4155    pub update_time: std::option::Option<wkt::Timestamp>,
4156
4157    /// Optional. The aspects that are attached to the entry. Depending on how the
4158    /// aspect is attached to the entry, the format of the aspect key can be one of
4159    /// the following:
4160    ///
4161    /// * If the aspect is attached directly to the entry:
4162    ///   `{project_id_or_number}.{location_id}.{aspect_type_id}`
4163    /// * If the aspect is attached to an entry's path:
4164    ///   `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}`
4165    pub aspects: std::collections::HashMap<std::string::String, crate::model::Aspect>,
4166
4167    /// Optional. Immutable. The resource name of the parent entry, in the format
4168    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
4169    pub parent_entry: std::string::String,
4170
4171    /// Optional. A name for the entry that can be referenced by an external
4172    /// system. For more information, see [Fully qualified
4173    /// names](https://cloud.google.com/data-catalog/docs/fully-qualified-names).
4174    /// The maximum size of the field is 4000 characters.
4175    pub fully_qualified_name: std::string::String,
4176
4177    /// Optional. Information related to the source system of the data resource
4178    /// that is represented by the entry.
4179    pub entry_source: std::option::Option<crate::model::EntrySource>,
4180
4181    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4182}
4183
4184impl Entry {
4185    pub fn new() -> Self {
4186        std::default::Default::default()
4187    }
4188
4189    /// Sets the value of [name][crate::model::Entry::name].
4190    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4191        self.name = v.into();
4192        self
4193    }
4194
4195    /// Sets the value of [entry_type][crate::model::Entry::entry_type].
4196    pub fn set_entry_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4197        self.entry_type = v.into();
4198        self
4199    }
4200
4201    /// Sets the value of [create_time][crate::model::Entry::create_time].
4202    pub fn set_create_time<T>(mut self, v: T) -> Self
4203    where
4204        T: std::convert::Into<wkt::Timestamp>,
4205    {
4206        self.create_time = std::option::Option::Some(v.into());
4207        self
4208    }
4209
4210    /// Sets or clears the value of [create_time][crate::model::Entry::create_time].
4211    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4212    where
4213        T: std::convert::Into<wkt::Timestamp>,
4214    {
4215        self.create_time = v.map(|x| x.into());
4216        self
4217    }
4218
4219    /// Sets the value of [update_time][crate::model::Entry::update_time].
4220    pub fn set_update_time<T>(mut self, v: T) -> Self
4221    where
4222        T: std::convert::Into<wkt::Timestamp>,
4223    {
4224        self.update_time = std::option::Option::Some(v.into());
4225        self
4226    }
4227
4228    /// Sets or clears the value of [update_time][crate::model::Entry::update_time].
4229    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4230    where
4231        T: std::convert::Into<wkt::Timestamp>,
4232    {
4233        self.update_time = v.map(|x| x.into());
4234        self
4235    }
4236
4237    /// Sets the value of [aspects][crate::model::Entry::aspects].
4238    pub fn set_aspects<T, K, V>(mut self, v: T) -> Self
4239    where
4240        T: std::iter::IntoIterator<Item = (K, V)>,
4241        K: std::convert::Into<std::string::String>,
4242        V: std::convert::Into<crate::model::Aspect>,
4243    {
4244        use std::iter::Iterator;
4245        self.aspects = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4246        self
4247    }
4248
4249    /// Sets the value of [parent_entry][crate::model::Entry::parent_entry].
4250    pub fn set_parent_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4251        self.parent_entry = v.into();
4252        self
4253    }
4254
4255    /// Sets the value of [fully_qualified_name][crate::model::Entry::fully_qualified_name].
4256    pub fn set_fully_qualified_name<T: std::convert::Into<std::string::String>>(
4257        mut self,
4258        v: T,
4259    ) -> Self {
4260        self.fully_qualified_name = v.into();
4261        self
4262    }
4263
4264    /// Sets the value of [entry_source][crate::model::Entry::entry_source].
4265    pub fn set_entry_source<T>(mut self, v: T) -> Self
4266    where
4267        T: std::convert::Into<crate::model::EntrySource>,
4268    {
4269        self.entry_source = std::option::Option::Some(v.into());
4270        self
4271    }
4272
4273    /// Sets or clears the value of [entry_source][crate::model::Entry::entry_source].
4274    pub fn set_or_clear_entry_source<T>(mut self, v: std::option::Option<T>) -> Self
4275    where
4276        T: std::convert::Into<crate::model::EntrySource>,
4277    {
4278        self.entry_source = v.map(|x| x.into());
4279        self
4280    }
4281}
4282
4283impl wkt::message::Message for Entry {
4284    fn typename() -> &'static str {
4285        "type.googleapis.com/google.cloud.dataplex.v1.Entry"
4286    }
4287}
4288
4289/// Information related to the source system of the data resource that is
4290/// represented by the entry.
4291#[derive(Clone, Default, PartialEq)]
4292#[non_exhaustive]
4293pub struct EntrySource {
4294    /// The name of the resource in the source system.
4295    /// Maximum length is 4,000 characters.
4296    pub resource: std::string::String,
4297
4298    /// The name of the source system.
4299    /// Maximum length is 64 characters.
4300    pub system: std::string::String,
4301
4302    /// The platform containing the source system.
4303    /// Maximum length is 64 characters.
4304    pub platform: std::string::String,
4305
4306    /// A user-friendly display name.
4307    /// Maximum length is 500 characters.
4308    pub display_name: std::string::String,
4309
4310    /// A description of the data resource.
4311    /// Maximum length is 2,000 characters.
4312    pub description: std::string::String,
4313
4314    /// User-defined labels.
4315    /// The maximum size of keys and values is 128 characters each.
4316    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4317
4318    /// Immutable. The entries representing the ancestors of the data resource in
4319    /// the source system.
4320    pub ancestors: std::vec::Vec<crate::model::entry_source::Ancestor>,
4321
4322    /// The time when the resource was created in the source system.
4323    pub create_time: std::option::Option<wkt::Timestamp>,
4324
4325    /// The time when the resource was last updated in the source system. If the
4326    /// entry exists in the system and its `EntrySource` has `update_time`
4327    /// populated, further updates to the `EntrySource` of the entry must provide
4328    /// incremental updates to its `update_time`.
4329    pub update_time: std::option::Option<wkt::Timestamp>,
4330
4331    /// Output only. Location of the resource in the source system. You can search
4332    /// the entry by this location. By default, this should match the location of
4333    /// the entry group containing this entry. A different value allows capturing
4334    /// the source location for data external to Google Cloud.
4335    pub location: std::string::String,
4336
4337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4338}
4339
4340impl EntrySource {
4341    pub fn new() -> Self {
4342        std::default::Default::default()
4343    }
4344
4345    /// Sets the value of [resource][crate::model::EntrySource::resource].
4346    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4347        self.resource = v.into();
4348        self
4349    }
4350
4351    /// Sets the value of [system][crate::model::EntrySource::system].
4352    pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4353        self.system = v.into();
4354        self
4355    }
4356
4357    /// Sets the value of [platform][crate::model::EntrySource::platform].
4358    pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4359        self.platform = v.into();
4360        self
4361    }
4362
4363    /// Sets the value of [display_name][crate::model::EntrySource::display_name].
4364    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4365        self.display_name = v.into();
4366        self
4367    }
4368
4369    /// Sets the value of [description][crate::model::EntrySource::description].
4370    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4371        self.description = v.into();
4372        self
4373    }
4374
4375    /// Sets the value of [labels][crate::model::EntrySource::labels].
4376    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4377    where
4378        T: std::iter::IntoIterator<Item = (K, V)>,
4379        K: std::convert::Into<std::string::String>,
4380        V: std::convert::Into<std::string::String>,
4381    {
4382        use std::iter::Iterator;
4383        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4384        self
4385    }
4386
4387    /// Sets the value of [ancestors][crate::model::EntrySource::ancestors].
4388    pub fn set_ancestors<T, V>(mut self, v: T) -> Self
4389    where
4390        T: std::iter::IntoIterator<Item = V>,
4391        V: std::convert::Into<crate::model::entry_source::Ancestor>,
4392    {
4393        use std::iter::Iterator;
4394        self.ancestors = v.into_iter().map(|i| i.into()).collect();
4395        self
4396    }
4397
4398    /// Sets the value of [create_time][crate::model::EntrySource::create_time].
4399    pub fn set_create_time<T>(mut self, v: T) -> Self
4400    where
4401        T: std::convert::Into<wkt::Timestamp>,
4402    {
4403        self.create_time = std::option::Option::Some(v.into());
4404        self
4405    }
4406
4407    /// Sets or clears the value of [create_time][crate::model::EntrySource::create_time].
4408    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4409    where
4410        T: std::convert::Into<wkt::Timestamp>,
4411    {
4412        self.create_time = v.map(|x| x.into());
4413        self
4414    }
4415
4416    /// Sets the value of [update_time][crate::model::EntrySource::update_time].
4417    pub fn set_update_time<T>(mut self, v: T) -> Self
4418    where
4419        T: std::convert::Into<wkt::Timestamp>,
4420    {
4421        self.update_time = std::option::Option::Some(v.into());
4422        self
4423    }
4424
4425    /// Sets or clears the value of [update_time][crate::model::EntrySource::update_time].
4426    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4427    where
4428        T: std::convert::Into<wkt::Timestamp>,
4429    {
4430        self.update_time = v.map(|x| x.into());
4431        self
4432    }
4433
4434    /// Sets the value of [location][crate::model::EntrySource::location].
4435    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4436        self.location = v.into();
4437        self
4438    }
4439}
4440
4441impl wkt::message::Message for EntrySource {
4442    fn typename() -> &'static str {
4443        "type.googleapis.com/google.cloud.dataplex.v1.EntrySource"
4444    }
4445}
4446
4447/// Defines additional types related to [EntrySource].
4448pub mod entry_source {
4449    #[allow(unused_imports)]
4450    use super::*;
4451
4452    /// Information about individual items in the hierarchy that is associated with
4453    /// the data resource.
4454    #[derive(Clone, Default, PartialEq)]
4455    #[non_exhaustive]
4456    pub struct Ancestor {
4457        /// Optional. The name of the ancestor resource.
4458        pub name: std::string::String,
4459
4460        /// Optional. The type of the ancestor resource.
4461        pub r#type: std::string::String,
4462
4463        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4464    }
4465
4466    impl Ancestor {
4467        pub fn new() -> Self {
4468            std::default::Default::default()
4469        }
4470
4471        /// Sets the value of [name][crate::model::entry_source::Ancestor::name].
4472        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4473            self.name = v.into();
4474            self
4475        }
4476
4477        /// Sets the value of [r#type][crate::model::entry_source::Ancestor::type].
4478        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4479            self.r#type = v.into();
4480            self
4481        }
4482    }
4483
4484    impl wkt::message::Message for Ancestor {
4485        fn typename() -> &'static str {
4486            "type.googleapis.com/google.cloud.dataplex.v1.EntrySource.Ancestor"
4487        }
4488    }
4489}
4490
4491/// Create EntryGroup Request.
4492#[derive(Clone, Default, PartialEq)]
4493#[non_exhaustive]
4494pub struct CreateEntryGroupRequest {
4495    /// Required. The resource name of the entryGroup, of the form:
4496    /// projects/{project_number}/locations/{location_id}
4497    /// where `location_id` refers to a Google Cloud region.
4498    pub parent: std::string::String,
4499
4500    /// Required. EntryGroup identifier.
4501    pub entry_group_id: std::string::String,
4502
4503    /// Required. EntryGroup Resource.
4504    pub entry_group: std::option::Option<crate::model::EntryGroup>,
4505
4506    /// Optional. The service validates the request without performing any
4507    /// mutations. The default is false.
4508    pub validate_only: bool,
4509
4510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4511}
4512
4513impl CreateEntryGroupRequest {
4514    pub fn new() -> Self {
4515        std::default::Default::default()
4516    }
4517
4518    /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
4519    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4520        self.parent = v.into();
4521        self
4522    }
4523
4524    /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
4525    pub fn set_entry_group_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4526        self.entry_group_id = v.into();
4527        self
4528    }
4529
4530    /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
4531    pub fn set_entry_group<T>(mut self, v: T) -> Self
4532    where
4533        T: std::convert::Into<crate::model::EntryGroup>,
4534    {
4535        self.entry_group = std::option::Option::Some(v.into());
4536        self
4537    }
4538
4539    /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
4540    pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
4541    where
4542        T: std::convert::Into<crate::model::EntryGroup>,
4543    {
4544        self.entry_group = v.map(|x| x.into());
4545        self
4546    }
4547
4548    /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
4549    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4550        self.validate_only = v.into();
4551        self
4552    }
4553}
4554
4555impl wkt::message::Message for CreateEntryGroupRequest {
4556    fn typename() -> &'static str {
4557        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryGroupRequest"
4558    }
4559}
4560
4561/// Update EntryGroup Request.
4562#[derive(Clone, Default, PartialEq)]
4563#[non_exhaustive]
4564pub struct UpdateEntryGroupRequest {
4565    /// Required. EntryGroup Resource.
4566    pub entry_group: std::option::Option<crate::model::EntryGroup>,
4567
4568    /// Required. Mask of fields to update.
4569    pub update_mask: std::option::Option<wkt::FieldMask>,
4570
4571    /// Optional. The service validates the request, without performing any
4572    /// mutations. The default is false.
4573    pub validate_only: bool,
4574
4575    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4576}
4577
4578impl UpdateEntryGroupRequest {
4579    pub fn new() -> Self {
4580        std::default::Default::default()
4581    }
4582
4583    /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
4584    pub fn set_entry_group<T>(mut self, v: T) -> Self
4585    where
4586        T: std::convert::Into<crate::model::EntryGroup>,
4587    {
4588        self.entry_group = std::option::Option::Some(v.into());
4589        self
4590    }
4591
4592    /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
4593    pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
4594    where
4595        T: std::convert::Into<crate::model::EntryGroup>,
4596    {
4597        self.entry_group = v.map(|x| x.into());
4598        self
4599    }
4600
4601    /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
4602    pub fn set_update_mask<T>(mut self, v: T) -> Self
4603    where
4604        T: std::convert::Into<wkt::FieldMask>,
4605    {
4606        self.update_mask = std::option::Option::Some(v.into());
4607        self
4608    }
4609
4610    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
4611    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4612    where
4613        T: std::convert::Into<wkt::FieldMask>,
4614    {
4615        self.update_mask = v.map(|x| x.into());
4616        self
4617    }
4618
4619    /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
4620    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4621        self.validate_only = v.into();
4622        self
4623    }
4624}
4625
4626impl wkt::message::Message for UpdateEntryGroupRequest {
4627    fn typename() -> &'static str {
4628        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryGroupRequest"
4629    }
4630}
4631
4632/// Delete EntryGroup Request.
4633#[derive(Clone, Default, PartialEq)]
4634#[non_exhaustive]
4635pub struct DeleteEntryGroupRequest {
4636    /// Required. The resource name of the EntryGroup:
4637    /// `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
4638    pub name: std::string::String,
4639
4640    /// Optional. If the client provided etag value does not match the current etag
4641    /// value, the DeleteEntryGroupRequest method returns an ABORTED error
4642    /// response.
4643    pub etag: std::string::String,
4644
4645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4646}
4647
4648impl DeleteEntryGroupRequest {
4649    pub fn new() -> Self {
4650        std::default::Default::default()
4651    }
4652
4653    /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
4654    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4655        self.name = v.into();
4656        self
4657    }
4658
4659    /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
4660    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4661        self.etag = v.into();
4662        self
4663    }
4664}
4665
4666impl wkt::message::Message for DeleteEntryGroupRequest {
4667    fn typename() -> &'static str {
4668        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryGroupRequest"
4669    }
4670}
4671
4672/// List entryGroups request.
4673#[derive(Clone, Default, PartialEq)]
4674#[non_exhaustive]
4675pub struct ListEntryGroupsRequest {
4676    /// Required. The resource name of the entryGroup location, of the form:
4677    /// `projects/{project_number}/locations/{location_id}`
4678    /// where `location_id` refers to a Google Cloud region.
4679    pub parent: std::string::String,
4680
4681    /// Optional. Maximum number of EntryGroups to return. The service may return
4682    /// fewer than this value. If unspecified, the service returns at most 10
4683    /// EntryGroups. The maximum value is 1000; values above 1000 will be coerced
4684    /// to 1000.
4685    pub page_size: i32,
4686
4687    /// Optional. Page token received from a previous `ListEntryGroups` call.
4688    /// Provide this to retrieve the subsequent page. When paginating, all other
4689    /// parameters you provide to `ListEntryGroups` must match the call that
4690    /// provided the page token.
4691    pub page_token: std::string::String,
4692
4693    /// Optional. Filter request.
4694    pub filter: std::string::String,
4695
4696    /// Optional. Order by fields for the result.
4697    pub order_by: std::string::String,
4698
4699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4700}
4701
4702impl ListEntryGroupsRequest {
4703    pub fn new() -> Self {
4704        std::default::Default::default()
4705    }
4706
4707    /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
4708    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4709        self.parent = v.into();
4710        self
4711    }
4712
4713    /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
4714    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4715        self.page_size = v.into();
4716        self
4717    }
4718
4719    /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
4720    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4721        self.page_token = v.into();
4722        self
4723    }
4724
4725    /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
4726    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4727        self.filter = v.into();
4728        self
4729    }
4730
4731    /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
4732    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4733        self.order_by = v.into();
4734        self
4735    }
4736}
4737
4738impl wkt::message::Message for ListEntryGroupsRequest {
4739    fn typename() -> &'static str {
4740        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsRequest"
4741    }
4742}
4743
4744/// List entry groups response.
4745#[derive(Clone, Default, PartialEq)]
4746#[non_exhaustive]
4747pub struct ListEntryGroupsResponse {
4748    /// Entry groups under the given parent location.
4749    pub entry_groups: std::vec::Vec<crate::model::EntryGroup>,
4750
4751    /// Token to retrieve the next page of results, or empty if there are no more
4752    /// results in the list.
4753    pub next_page_token: std::string::String,
4754
4755    /// Locations that the service couldn't reach.
4756    pub unreachable_locations: std::vec::Vec<std::string::String>,
4757
4758    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4759}
4760
4761impl ListEntryGroupsResponse {
4762    pub fn new() -> Self {
4763        std::default::Default::default()
4764    }
4765
4766    /// Sets the value of [entry_groups][crate::model::ListEntryGroupsResponse::entry_groups].
4767    pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
4768    where
4769        T: std::iter::IntoIterator<Item = V>,
4770        V: std::convert::Into<crate::model::EntryGroup>,
4771    {
4772        use std::iter::Iterator;
4773        self.entry_groups = v.into_iter().map(|i| i.into()).collect();
4774        self
4775    }
4776
4777    /// Sets the value of [next_page_token][crate::model::ListEntryGroupsResponse::next_page_token].
4778    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4779        self.next_page_token = v.into();
4780        self
4781    }
4782
4783    /// Sets the value of [unreachable_locations][crate::model::ListEntryGroupsResponse::unreachable_locations].
4784    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
4785    where
4786        T: std::iter::IntoIterator<Item = V>,
4787        V: std::convert::Into<std::string::String>,
4788    {
4789        use std::iter::Iterator;
4790        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
4791        self
4792    }
4793}
4794
4795impl wkt::message::Message for ListEntryGroupsResponse {
4796    fn typename() -> &'static str {
4797        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsResponse"
4798    }
4799}
4800
4801#[doc(hidden)]
4802impl gax::paginator::internal::PageableResponse for ListEntryGroupsResponse {
4803    type PageItem = crate::model::EntryGroup;
4804
4805    fn items(self) -> std::vec::Vec<Self::PageItem> {
4806        self.entry_groups
4807    }
4808
4809    fn next_page_token(&self) -> std::string::String {
4810        use std::clone::Clone;
4811        self.next_page_token.clone()
4812    }
4813}
4814
4815/// Get EntryGroup request.
4816#[derive(Clone, Default, PartialEq)]
4817#[non_exhaustive]
4818pub struct GetEntryGroupRequest {
4819    /// Required. The resource name of the EntryGroup:
4820    /// `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
4821    pub name: std::string::String,
4822
4823    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4824}
4825
4826impl GetEntryGroupRequest {
4827    pub fn new() -> Self {
4828        std::default::Default::default()
4829    }
4830
4831    /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
4832    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4833        self.name = v.into();
4834        self
4835    }
4836}
4837
4838impl wkt::message::Message for GetEntryGroupRequest {
4839    fn typename() -> &'static str {
4840        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryGroupRequest"
4841    }
4842}
4843
4844/// Create EntryType Request.
4845#[derive(Clone, Default, PartialEq)]
4846#[non_exhaustive]
4847pub struct CreateEntryTypeRequest {
4848    /// Required. The resource name of the EntryType, of the form:
4849    /// projects/{project_number}/locations/{location_id}
4850    /// where `location_id` refers to a Google Cloud region.
4851    pub parent: std::string::String,
4852
4853    /// Required. EntryType identifier.
4854    pub entry_type_id: std::string::String,
4855
4856    /// Required. EntryType Resource.
4857    pub entry_type: std::option::Option<crate::model::EntryType>,
4858
4859    /// Optional. The service validates the request without performing any
4860    /// mutations. The default is false.
4861    pub validate_only: bool,
4862
4863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4864}
4865
4866impl CreateEntryTypeRequest {
4867    pub fn new() -> Self {
4868        std::default::Default::default()
4869    }
4870
4871    /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
4872    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4873        self.parent = v.into();
4874        self
4875    }
4876
4877    /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
4878    pub fn set_entry_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4879        self.entry_type_id = v.into();
4880        self
4881    }
4882
4883    /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
4884    pub fn set_entry_type<T>(mut self, v: T) -> Self
4885    where
4886        T: std::convert::Into<crate::model::EntryType>,
4887    {
4888        self.entry_type = std::option::Option::Some(v.into());
4889        self
4890    }
4891
4892    /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
4893    pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
4894    where
4895        T: std::convert::Into<crate::model::EntryType>,
4896    {
4897        self.entry_type = v.map(|x| x.into());
4898        self
4899    }
4900
4901    /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
4902    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4903        self.validate_only = v.into();
4904        self
4905    }
4906}
4907
4908impl wkt::message::Message for CreateEntryTypeRequest {
4909    fn typename() -> &'static str {
4910        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryTypeRequest"
4911    }
4912}
4913
4914/// Update EntryType Request.
4915#[derive(Clone, Default, PartialEq)]
4916#[non_exhaustive]
4917pub struct UpdateEntryTypeRequest {
4918    /// Required. EntryType Resource.
4919    pub entry_type: std::option::Option<crate::model::EntryType>,
4920
4921    /// Required. Mask of fields to update.
4922    pub update_mask: std::option::Option<wkt::FieldMask>,
4923
4924    /// Optional. The service validates the request without performing any
4925    /// mutations. The default is false.
4926    pub validate_only: bool,
4927
4928    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4929}
4930
4931impl UpdateEntryTypeRequest {
4932    pub fn new() -> Self {
4933        std::default::Default::default()
4934    }
4935
4936    /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
4937    pub fn set_entry_type<T>(mut self, v: T) -> Self
4938    where
4939        T: std::convert::Into<crate::model::EntryType>,
4940    {
4941        self.entry_type = std::option::Option::Some(v.into());
4942        self
4943    }
4944
4945    /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
4946    pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
4947    where
4948        T: std::convert::Into<crate::model::EntryType>,
4949    {
4950        self.entry_type = v.map(|x| x.into());
4951        self
4952    }
4953
4954    /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
4955    pub fn set_update_mask<T>(mut self, v: T) -> Self
4956    where
4957        T: std::convert::Into<wkt::FieldMask>,
4958    {
4959        self.update_mask = std::option::Option::Some(v.into());
4960        self
4961    }
4962
4963    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
4964    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4965    where
4966        T: std::convert::Into<wkt::FieldMask>,
4967    {
4968        self.update_mask = v.map(|x| x.into());
4969        self
4970    }
4971
4972    /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
4973    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4974        self.validate_only = v.into();
4975        self
4976    }
4977}
4978
4979impl wkt::message::Message for UpdateEntryTypeRequest {
4980    fn typename() -> &'static str {
4981        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryTypeRequest"
4982    }
4983}
4984
4985/// Delete EntryType Request.
4986#[derive(Clone, Default, PartialEq)]
4987#[non_exhaustive]
4988pub struct DeleteEntryTypeRequest {
4989    /// Required. The resource name of the EntryType:
4990    /// `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
4991    pub name: std::string::String,
4992
4993    /// Optional. If the client provided etag value does not match the current etag
4994    /// value, the DeleteEntryTypeRequest method returns an ABORTED error response.
4995    pub etag: std::string::String,
4996
4997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4998}
4999
5000impl DeleteEntryTypeRequest {
5001    pub fn new() -> Self {
5002        std::default::Default::default()
5003    }
5004
5005    /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
5006    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5007        self.name = v.into();
5008        self
5009    }
5010
5011    /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
5012    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5013        self.etag = v.into();
5014        self
5015    }
5016}
5017
5018impl wkt::message::Message for DeleteEntryTypeRequest {
5019    fn typename() -> &'static str {
5020        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryTypeRequest"
5021    }
5022}
5023
5024/// List EntryTypes request
5025#[derive(Clone, Default, PartialEq)]
5026#[non_exhaustive]
5027pub struct ListEntryTypesRequest {
5028    /// Required. The resource name of the EntryType location, of the form:
5029    /// `projects/{project_number}/locations/{location_id}`
5030    /// where `location_id` refers to a Google Cloud region.
5031    pub parent: std::string::String,
5032
5033    /// Optional. Maximum number of EntryTypes to return. The service may return
5034    /// fewer than this value. If unspecified, the service returns at most 10
5035    /// EntryTypes. The maximum value is 1000; values above 1000 will be coerced to
5036    /// 1000.
5037    pub page_size: i32,
5038
5039    /// Optional. Page token received from a previous `ListEntryTypes` call.
5040    /// Provide this to retrieve the subsequent page. When paginating, all other
5041    /// parameters you provided to `ListEntryTypes` must match the call that
5042    /// provided the page token.
5043    pub page_token: std::string::String,
5044
5045    /// Optional. Filter request. Filters are case-sensitive.
5046    /// The service supports the following formats:
5047    ///
5048    /// * labels.key1 = "value1"
5049    /// * labels:key1
5050    /// * name = "value"
5051    ///
5052    /// These restrictions can be conjoined with AND, OR, and NOT conjunctions.
5053    pub filter: std::string::String,
5054
5055    /// Optional. Orders the result by `name` or `create_time` fields.
5056    /// If not specified, the ordering is undefined.
5057    pub order_by: std::string::String,
5058
5059    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5060}
5061
5062impl ListEntryTypesRequest {
5063    pub fn new() -> Self {
5064        std::default::Default::default()
5065    }
5066
5067    /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
5068    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5069        self.parent = v.into();
5070        self
5071    }
5072
5073    /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
5074    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5075        self.page_size = v.into();
5076        self
5077    }
5078
5079    /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
5080    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5081        self.page_token = v.into();
5082        self
5083    }
5084
5085    /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
5086    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5087        self.filter = v.into();
5088        self
5089    }
5090
5091    /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
5092    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5093        self.order_by = v.into();
5094        self
5095    }
5096}
5097
5098impl wkt::message::Message for ListEntryTypesRequest {
5099    fn typename() -> &'static str {
5100        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesRequest"
5101    }
5102}
5103
5104/// List EntryTypes response.
5105#[derive(Clone, Default, PartialEq)]
5106#[non_exhaustive]
5107pub struct ListEntryTypesResponse {
5108    /// EntryTypes under the given parent location.
5109    pub entry_types: std::vec::Vec<crate::model::EntryType>,
5110
5111    /// Token to retrieve the next page of results, or empty if there are no more
5112    /// results in the list.
5113    pub next_page_token: std::string::String,
5114
5115    /// Locations that the service couldn't reach.
5116    pub unreachable_locations: std::vec::Vec<std::string::String>,
5117
5118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5119}
5120
5121impl ListEntryTypesResponse {
5122    pub fn new() -> Self {
5123        std::default::Default::default()
5124    }
5125
5126    /// Sets the value of [entry_types][crate::model::ListEntryTypesResponse::entry_types].
5127    pub fn set_entry_types<T, V>(mut self, v: T) -> Self
5128    where
5129        T: std::iter::IntoIterator<Item = V>,
5130        V: std::convert::Into<crate::model::EntryType>,
5131    {
5132        use std::iter::Iterator;
5133        self.entry_types = v.into_iter().map(|i| i.into()).collect();
5134        self
5135    }
5136
5137    /// Sets the value of [next_page_token][crate::model::ListEntryTypesResponse::next_page_token].
5138    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5139        self.next_page_token = v.into();
5140        self
5141    }
5142
5143    /// Sets the value of [unreachable_locations][crate::model::ListEntryTypesResponse::unreachable_locations].
5144    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
5145    where
5146        T: std::iter::IntoIterator<Item = V>,
5147        V: std::convert::Into<std::string::String>,
5148    {
5149        use std::iter::Iterator;
5150        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
5151        self
5152    }
5153}
5154
5155impl wkt::message::Message for ListEntryTypesResponse {
5156    fn typename() -> &'static str {
5157        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesResponse"
5158    }
5159}
5160
5161#[doc(hidden)]
5162impl gax::paginator::internal::PageableResponse for ListEntryTypesResponse {
5163    type PageItem = crate::model::EntryType;
5164
5165    fn items(self) -> std::vec::Vec<Self::PageItem> {
5166        self.entry_types
5167    }
5168
5169    fn next_page_token(&self) -> std::string::String {
5170        use std::clone::Clone;
5171        self.next_page_token.clone()
5172    }
5173}
5174
5175/// Get EntryType request.
5176#[derive(Clone, Default, PartialEq)]
5177#[non_exhaustive]
5178pub struct GetEntryTypeRequest {
5179    /// Required. The resource name of the EntryType:
5180    /// `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
5181    pub name: std::string::String,
5182
5183    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5184}
5185
5186impl GetEntryTypeRequest {
5187    pub fn new() -> Self {
5188        std::default::Default::default()
5189    }
5190
5191    /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
5192    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5193        self.name = v.into();
5194        self
5195    }
5196}
5197
5198impl wkt::message::Message for GetEntryTypeRequest {
5199    fn typename() -> &'static str {
5200        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryTypeRequest"
5201    }
5202}
5203
5204/// Create AspectType Request.
5205#[derive(Clone, Default, PartialEq)]
5206#[non_exhaustive]
5207pub struct CreateAspectTypeRequest {
5208    /// Required. The resource name of the AspectType, of the form:
5209    /// projects/{project_number}/locations/{location_id}
5210    /// where `location_id` refers to a Google Cloud region.
5211    pub parent: std::string::String,
5212
5213    /// Required. AspectType identifier.
5214    pub aspect_type_id: std::string::String,
5215
5216    /// Required. AspectType Resource.
5217    pub aspect_type: std::option::Option<crate::model::AspectType>,
5218
5219    /// Optional. The service validates the request without performing any
5220    /// mutations. The default is false.
5221    pub validate_only: bool,
5222
5223    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5224}
5225
5226impl CreateAspectTypeRequest {
5227    pub fn new() -> Self {
5228        std::default::Default::default()
5229    }
5230
5231    /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
5232    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5233        self.parent = v.into();
5234        self
5235    }
5236
5237    /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
5238    pub fn set_aspect_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5239        self.aspect_type_id = v.into();
5240        self
5241    }
5242
5243    /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
5244    pub fn set_aspect_type<T>(mut self, v: T) -> Self
5245    where
5246        T: std::convert::Into<crate::model::AspectType>,
5247    {
5248        self.aspect_type = std::option::Option::Some(v.into());
5249        self
5250    }
5251
5252    /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
5253    pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
5254    where
5255        T: std::convert::Into<crate::model::AspectType>,
5256    {
5257        self.aspect_type = v.map(|x| x.into());
5258        self
5259    }
5260
5261    /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
5262    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5263        self.validate_only = v.into();
5264        self
5265    }
5266}
5267
5268impl wkt::message::Message for CreateAspectTypeRequest {
5269    fn typename() -> &'static str {
5270        "type.googleapis.com/google.cloud.dataplex.v1.CreateAspectTypeRequest"
5271    }
5272}
5273
5274/// Update AspectType Request
5275#[derive(Clone, Default, PartialEq)]
5276#[non_exhaustive]
5277pub struct UpdateAspectTypeRequest {
5278    /// Required. AspectType Resource
5279    pub aspect_type: std::option::Option<crate::model::AspectType>,
5280
5281    /// Required. Mask of fields to update.
5282    pub update_mask: std::option::Option<wkt::FieldMask>,
5283
5284    /// Optional. Only validate the request, but do not perform mutations.
5285    /// The default is false.
5286    pub validate_only: bool,
5287
5288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5289}
5290
5291impl UpdateAspectTypeRequest {
5292    pub fn new() -> Self {
5293        std::default::Default::default()
5294    }
5295
5296    /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
5297    pub fn set_aspect_type<T>(mut self, v: T) -> Self
5298    where
5299        T: std::convert::Into<crate::model::AspectType>,
5300    {
5301        self.aspect_type = std::option::Option::Some(v.into());
5302        self
5303    }
5304
5305    /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
5306    pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
5307    where
5308        T: std::convert::Into<crate::model::AspectType>,
5309    {
5310        self.aspect_type = v.map(|x| x.into());
5311        self
5312    }
5313
5314    /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
5315    pub fn set_update_mask<T>(mut self, v: T) -> Self
5316    where
5317        T: std::convert::Into<wkt::FieldMask>,
5318    {
5319        self.update_mask = std::option::Option::Some(v.into());
5320        self
5321    }
5322
5323    /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
5324    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5325    where
5326        T: std::convert::Into<wkt::FieldMask>,
5327    {
5328        self.update_mask = v.map(|x| x.into());
5329        self
5330    }
5331
5332    /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
5333    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5334        self.validate_only = v.into();
5335        self
5336    }
5337}
5338
5339impl wkt::message::Message for UpdateAspectTypeRequest {
5340    fn typename() -> &'static str {
5341        "type.googleapis.com/google.cloud.dataplex.v1.UpdateAspectTypeRequest"
5342    }
5343}
5344
5345/// Delete AspectType Request.
5346#[derive(Clone, Default, PartialEq)]
5347#[non_exhaustive]
5348pub struct DeleteAspectTypeRequest {
5349    /// Required. The resource name of the AspectType:
5350    /// `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
5351    pub name: std::string::String,
5352
5353    /// Optional. If the client provided etag value does not match the current etag
5354    /// value, the DeleteAspectTypeRequest method returns an ABORTED error
5355    /// response.
5356    pub etag: std::string::String,
5357
5358    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5359}
5360
5361impl DeleteAspectTypeRequest {
5362    pub fn new() -> Self {
5363        std::default::Default::default()
5364    }
5365
5366    /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
5367    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5368        self.name = v.into();
5369        self
5370    }
5371
5372    /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
5373    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5374        self.etag = v.into();
5375        self
5376    }
5377}
5378
5379impl wkt::message::Message for DeleteAspectTypeRequest {
5380    fn typename() -> &'static str {
5381        "type.googleapis.com/google.cloud.dataplex.v1.DeleteAspectTypeRequest"
5382    }
5383}
5384
5385/// List AspectTypes request.
5386#[derive(Clone, Default, PartialEq)]
5387#[non_exhaustive]
5388pub struct ListAspectTypesRequest {
5389    /// Required. The resource name of the AspectType location, of the form:
5390    /// `projects/{project_number}/locations/{location_id}`
5391    /// where `location_id` refers to a Google Cloud region.
5392    pub parent: std::string::String,
5393
5394    /// Optional. Maximum number of AspectTypes to return. The service may return
5395    /// fewer than this value. If unspecified, the service returns at most 10
5396    /// AspectTypes. The maximum value is 1000; values above 1000 will be coerced
5397    /// to 1000.
5398    pub page_size: i32,
5399
5400    /// Optional. Page token received from a previous `ListAspectTypes` call.
5401    /// Provide this to retrieve the subsequent page. When paginating, all other
5402    /// parameters you provide to `ListAspectTypes` must match the call that
5403    /// provided the page token.
5404    pub page_token: std::string::String,
5405
5406    /// Optional. Filter request. Filters are case-sensitive.
5407    /// The service supports the following formats:
5408    ///
5409    /// * labels.key1 = "value1"
5410    /// * labels:key1
5411    /// * name = "value"
5412    ///
5413    /// These restrictions can be conjoined with AND, OR, and NOT conjunctions.
5414    pub filter: std::string::String,
5415
5416    /// Optional. Orders the result by `name` or `create_time` fields.
5417    /// If not specified, the ordering is undefined.
5418    pub order_by: std::string::String,
5419
5420    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5421}
5422
5423impl ListAspectTypesRequest {
5424    pub fn new() -> Self {
5425        std::default::Default::default()
5426    }
5427
5428    /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
5429    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5430        self.parent = v.into();
5431        self
5432    }
5433
5434    /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
5435    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5436        self.page_size = v.into();
5437        self
5438    }
5439
5440    /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
5441    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5442        self.page_token = v.into();
5443        self
5444    }
5445
5446    /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
5447    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5448        self.filter = v.into();
5449        self
5450    }
5451
5452    /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
5453    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5454        self.order_by = v.into();
5455        self
5456    }
5457}
5458
5459impl wkt::message::Message for ListAspectTypesRequest {
5460    fn typename() -> &'static str {
5461        "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesRequest"
5462    }
5463}
5464
5465/// List AspectTypes response.
5466#[derive(Clone, Default, PartialEq)]
5467#[non_exhaustive]
5468pub struct ListAspectTypesResponse {
5469    /// AspectTypes under the given parent location.
5470    pub aspect_types: std::vec::Vec<crate::model::AspectType>,
5471
5472    /// Token to retrieve the next page of results, or empty if there are no more
5473    /// results in the list.
5474    pub next_page_token: std::string::String,
5475
5476    /// Locations that the service couldn't reach.
5477    pub unreachable_locations: std::vec::Vec<std::string::String>,
5478
5479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5480}
5481
5482impl ListAspectTypesResponse {
5483    pub fn new() -> Self {
5484        std::default::Default::default()
5485    }
5486
5487    /// Sets the value of [aspect_types][crate::model::ListAspectTypesResponse::aspect_types].
5488    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
5489    where
5490        T: std::iter::IntoIterator<Item = V>,
5491        V: std::convert::Into<crate::model::AspectType>,
5492    {
5493        use std::iter::Iterator;
5494        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
5495        self
5496    }
5497
5498    /// Sets the value of [next_page_token][crate::model::ListAspectTypesResponse::next_page_token].
5499    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5500        self.next_page_token = v.into();
5501        self
5502    }
5503
5504    /// Sets the value of [unreachable_locations][crate::model::ListAspectTypesResponse::unreachable_locations].
5505    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
5506    where
5507        T: std::iter::IntoIterator<Item = V>,
5508        V: std::convert::Into<std::string::String>,
5509    {
5510        use std::iter::Iterator;
5511        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
5512        self
5513    }
5514}
5515
5516impl wkt::message::Message for ListAspectTypesResponse {
5517    fn typename() -> &'static str {
5518        "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesResponse"
5519    }
5520}
5521
5522#[doc(hidden)]
5523impl gax::paginator::internal::PageableResponse for ListAspectTypesResponse {
5524    type PageItem = crate::model::AspectType;
5525
5526    fn items(self) -> std::vec::Vec<Self::PageItem> {
5527        self.aspect_types
5528    }
5529
5530    fn next_page_token(&self) -> std::string::String {
5531        use std::clone::Clone;
5532        self.next_page_token.clone()
5533    }
5534}
5535
5536/// Get AspectType request.
5537#[derive(Clone, Default, PartialEq)]
5538#[non_exhaustive]
5539pub struct GetAspectTypeRequest {
5540    /// Required. The resource name of the AspectType:
5541    /// `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
5542    pub name: std::string::String,
5543
5544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5545}
5546
5547impl GetAspectTypeRequest {
5548    pub fn new() -> Self {
5549        std::default::Default::default()
5550    }
5551
5552    /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
5553    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5554        self.name = v.into();
5555        self
5556    }
5557}
5558
5559impl wkt::message::Message for GetAspectTypeRequest {
5560    fn typename() -> &'static str {
5561        "type.googleapis.com/google.cloud.dataplex.v1.GetAspectTypeRequest"
5562    }
5563}
5564
5565/// Create Entry request.
5566#[derive(Clone, Default, PartialEq)]
5567#[non_exhaustive]
5568pub struct CreateEntryRequest {
5569    /// Required. The resource name of the parent Entry Group:
5570    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
5571    pub parent: std::string::String,
5572
5573    /// Required. Entry identifier. It has to be unique within an Entry Group.
5574    ///
5575    /// Entries corresponding to Google Cloud resources use an Entry ID format
5576    /// based on [full resource
5577    /// names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
5578    /// The format is a full resource name of the resource without the
5579    /// prefix double slashes in the API service name part of the full resource
5580    /// name. This allows retrieval of entries using their associated resource
5581    /// name.
5582    ///
5583    /// For example, if the full resource name of a resource is
5584    /// `//library.googleapis.com/shelves/shelf1/books/book2`,
5585    /// then the suggested entry_id is
5586    /// `library.googleapis.com/shelves/shelf1/books/book2`.
5587    ///
5588    /// It is also suggested to follow the same convention for entries
5589    /// corresponding to resources from providers or systems other than Google
5590    /// Cloud.
5591    ///
5592    /// The maximum size of the field is 4000 characters.
5593    pub entry_id: std::string::String,
5594
5595    /// Required. Entry resource.
5596    pub entry: std::option::Option<crate::model::Entry>,
5597
5598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5599}
5600
5601impl CreateEntryRequest {
5602    pub fn new() -> Self {
5603        std::default::Default::default()
5604    }
5605
5606    /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
5607    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5608        self.parent = v.into();
5609        self
5610    }
5611
5612    /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
5613    pub fn set_entry_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5614        self.entry_id = v.into();
5615        self
5616    }
5617
5618    /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
5619    pub fn set_entry<T>(mut self, v: T) -> Self
5620    where
5621        T: std::convert::Into<crate::model::Entry>,
5622    {
5623        self.entry = std::option::Option::Some(v.into());
5624        self
5625    }
5626
5627    /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
5628    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
5629    where
5630        T: std::convert::Into<crate::model::Entry>,
5631    {
5632        self.entry = v.map(|x| x.into());
5633        self
5634    }
5635}
5636
5637impl wkt::message::Message for CreateEntryRequest {
5638    fn typename() -> &'static str {
5639        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryRequest"
5640    }
5641}
5642
5643/// Update Entry request.
5644#[derive(Clone, Default, PartialEq)]
5645#[non_exhaustive]
5646pub struct UpdateEntryRequest {
5647    /// Required. Entry resource.
5648    pub entry: std::option::Option<crate::model::Entry>,
5649
5650    /// Optional. Mask of fields to update. To update Aspects, the update_mask must
5651    /// contain the value "aspects".
5652    ///
5653    /// If the update_mask is empty, the service will update all modifiable fields
5654    /// present in the request.
5655    pub update_mask: std::option::Option<wkt::FieldMask>,
5656
5657    /// Optional. If set to true and the entry doesn't exist, the service will
5658    /// create it.
5659    pub allow_missing: bool,
5660
5661    /// Optional. If set to true and the aspect_keys specify aspect ranges, the
5662    /// service deletes any existing aspects from that range that weren't provided
5663    /// in the request.
5664    pub delete_missing_aspects: bool,
5665
5666    /// Optional. The map keys of the Aspects which the service should modify. It
5667    /// supports the following syntaxes:
5668    ///
5669    /// * `<aspect_type_reference>` - matches an aspect of the given type and empty
5670    ///   path.
5671    /// * `<aspect_type_reference>@path` - matches an aspect of the given type and
5672    ///   specified path. For example, to attach an aspect to a field that is
5673    ///   specified by the `schema` aspect, the path should have the format
5674    ///   `Schema.<field_name>`.
5675    /// * `<aspect_type_reference>@*` - matches aspects of the given type for all
5676    ///   paths.
5677    /// * `*@path` - matches aspects of all types on the given path.
5678    ///
5679    /// The service will not remove existing aspects matching the syntax unless
5680    /// `delete_missing_aspects` is set to true.
5681    ///
5682    /// If this field is left empty, the service treats it as specifying
5683    /// exactly those Aspects present in the request.
5684    pub aspect_keys: std::vec::Vec<std::string::String>,
5685
5686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5687}
5688
5689impl UpdateEntryRequest {
5690    pub fn new() -> Self {
5691        std::default::Default::default()
5692    }
5693
5694    /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
5695    pub fn set_entry<T>(mut self, v: T) -> Self
5696    where
5697        T: std::convert::Into<crate::model::Entry>,
5698    {
5699        self.entry = std::option::Option::Some(v.into());
5700        self
5701    }
5702
5703    /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
5704    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
5705    where
5706        T: std::convert::Into<crate::model::Entry>,
5707    {
5708        self.entry = v.map(|x| x.into());
5709        self
5710    }
5711
5712    /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
5713    pub fn set_update_mask<T>(mut self, v: T) -> Self
5714    where
5715        T: std::convert::Into<wkt::FieldMask>,
5716    {
5717        self.update_mask = std::option::Option::Some(v.into());
5718        self
5719    }
5720
5721    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
5722    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5723    where
5724        T: std::convert::Into<wkt::FieldMask>,
5725    {
5726        self.update_mask = v.map(|x| x.into());
5727        self
5728    }
5729
5730    /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
5731    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5732        self.allow_missing = v.into();
5733        self
5734    }
5735
5736    /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
5737    pub fn set_delete_missing_aspects<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5738        self.delete_missing_aspects = v.into();
5739        self
5740    }
5741
5742    /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
5743    pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
5744    where
5745        T: std::iter::IntoIterator<Item = V>,
5746        V: std::convert::Into<std::string::String>,
5747    {
5748        use std::iter::Iterator;
5749        self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
5750        self
5751    }
5752}
5753
5754impl wkt::message::Message for UpdateEntryRequest {
5755    fn typename() -> &'static str {
5756        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryRequest"
5757    }
5758}
5759
5760/// Delete Entry request.
5761#[derive(Clone, Default, PartialEq)]
5762#[non_exhaustive]
5763pub struct DeleteEntryRequest {
5764    /// Required. The resource name of the Entry:
5765    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
5766    pub name: std::string::String,
5767
5768    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5769}
5770
5771impl DeleteEntryRequest {
5772    pub fn new() -> Self {
5773        std::default::Default::default()
5774    }
5775
5776    /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
5777    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5778        self.name = v.into();
5779        self
5780    }
5781}
5782
5783impl wkt::message::Message for DeleteEntryRequest {
5784    fn typename() -> &'static str {
5785        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryRequest"
5786    }
5787}
5788
5789/// List Entries request.
5790#[derive(Clone, Default, PartialEq)]
5791#[non_exhaustive]
5792pub struct ListEntriesRequest {
5793    /// Required. The resource name of the parent Entry Group:
5794    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
5795    pub parent: std::string::String,
5796
5797    /// Optional. Number of items to return per page. If there are remaining
5798    /// results, the service returns a next_page_token. If unspecified, the service
5799    /// returns at most 10 Entries. The maximum value is 100; values above 100 will
5800    /// be coerced to 100.
5801    pub page_size: i32,
5802
5803    /// Optional. Page token received from a previous `ListEntries` call. Provide
5804    /// this to retrieve the subsequent page.
5805    pub page_token: std::string::String,
5806
5807    /// Optional. A filter on the entries to return. Filters are case-sensitive.
5808    /// You can filter the request by the following fields:
5809    ///
5810    /// * entry_type
5811    /// * entry_source.display_name
5812    /// * parent_entry
5813    ///
5814    /// The comparison operators are =, !=, <, >, <=, >=. The service compares
5815    /// strings according to lexical order.
5816    ///
5817    /// You can use the logical operators AND, OR, NOT in the filter.
5818    ///
5819    /// You can use Wildcard "*", but for entry_type and parent_entry you need to
5820    /// provide the full project id or number.
5821    ///
5822    /// You cannot use parent_entry in conjunction with other fields.
5823    ///
5824    /// Example filter expressions:
5825    ///
5826    /// * "entry_source.display_name=AnExampleDisplayName"
5827    /// * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type"
5828    /// * "entry_type=projects/example-project/locations/us/entryTypes/a* OR
5829    ///   entry_type=projects/another-project/locations/*"
5830    /// * "NOT entry_source.display_name=AnotherExampleDisplayName"
5831    /// * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry"
5832    pub filter: std::string::String,
5833
5834    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5835}
5836
5837impl ListEntriesRequest {
5838    pub fn new() -> Self {
5839        std::default::Default::default()
5840    }
5841
5842    /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
5843    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5844        self.parent = v.into();
5845        self
5846    }
5847
5848    /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
5849    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5850        self.page_size = v.into();
5851        self
5852    }
5853
5854    /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
5855    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5856        self.page_token = v.into();
5857        self
5858    }
5859
5860    /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
5861    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5862        self.filter = v.into();
5863        self
5864    }
5865}
5866
5867impl wkt::message::Message for ListEntriesRequest {
5868    fn typename() -> &'static str {
5869        "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesRequest"
5870    }
5871}
5872
5873/// List Entries response.
5874#[derive(Clone, Default, PartialEq)]
5875#[non_exhaustive]
5876pub struct ListEntriesResponse {
5877    /// The list of entries under the given parent location.
5878    pub entries: std::vec::Vec<crate::model::Entry>,
5879
5880    /// Token to retrieve the next page of results, or empty if there are no more
5881    /// results in the list.
5882    pub next_page_token: std::string::String,
5883
5884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5885}
5886
5887impl ListEntriesResponse {
5888    pub fn new() -> Self {
5889        std::default::Default::default()
5890    }
5891
5892    /// Sets the value of [entries][crate::model::ListEntriesResponse::entries].
5893    pub fn set_entries<T, V>(mut self, v: T) -> Self
5894    where
5895        T: std::iter::IntoIterator<Item = V>,
5896        V: std::convert::Into<crate::model::Entry>,
5897    {
5898        use std::iter::Iterator;
5899        self.entries = v.into_iter().map(|i| i.into()).collect();
5900        self
5901    }
5902
5903    /// Sets the value of [next_page_token][crate::model::ListEntriesResponse::next_page_token].
5904    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5905        self.next_page_token = v.into();
5906        self
5907    }
5908}
5909
5910impl wkt::message::Message for ListEntriesResponse {
5911    fn typename() -> &'static str {
5912        "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesResponse"
5913    }
5914}
5915
5916#[doc(hidden)]
5917impl gax::paginator::internal::PageableResponse for ListEntriesResponse {
5918    type PageItem = crate::model::Entry;
5919
5920    fn items(self) -> std::vec::Vec<Self::PageItem> {
5921        self.entries
5922    }
5923
5924    fn next_page_token(&self) -> std::string::String {
5925        use std::clone::Clone;
5926        self.next_page_token.clone()
5927    }
5928}
5929
5930/// Get Entry request.
5931#[derive(Clone, Default, PartialEq)]
5932#[non_exhaustive]
5933pub struct GetEntryRequest {
5934    /// Required. The resource name of the Entry:
5935    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
5936    pub name: std::string::String,
5937
5938    /// Optional. View to control which parts of an entry the service should
5939    /// return.
5940    pub view: crate::model::EntryView,
5941
5942    /// Optional. Limits the aspects returned to the provided aspect types.
5943    /// It only works for CUSTOM view.
5944    pub aspect_types: std::vec::Vec<std::string::String>,
5945
5946    /// Optional. Limits the aspects returned to those associated with the provided
5947    /// paths within the Entry. It only works for CUSTOM view.
5948    pub paths: std::vec::Vec<std::string::String>,
5949
5950    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5951}
5952
5953impl GetEntryRequest {
5954    pub fn new() -> Self {
5955        std::default::Default::default()
5956    }
5957
5958    /// Sets the value of [name][crate::model::GetEntryRequest::name].
5959    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5960        self.name = v.into();
5961        self
5962    }
5963
5964    /// Sets the value of [view][crate::model::GetEntryRequest::view].
5965    pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
5966        self.view = v.into();
5967        self
5968    }
5969
5970    /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
5971    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
5972    where
5973        T: std::iter::IntoIterator<Item = V>,
5974        V: std::convert::Into<std::string::String>,
5975    {
5976        use std::iter::Iterator;
5977        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
5978        self
5979    }
5980
5981    /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
5982    pub fn set_paths<T, V>(mut self, v: T) -> Self
5983    where
5984        T: std::iter::IntoIterator<Item = V>,
5985        V: std::convert::Into<std::string::String>,
5986    {
5987        use std::iter::Iterator;
5988        self.paths = v.into_iter().map(|i| i.into()).collect();
5989        self
5990    }
5991}
5992
5993impl wkt::message::Message for GetEntryRequest {
5994    fn typename() -> &'static str {
5995        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryRequest"
5996    }
5997}
5998
5999/// Lookup Entry request using permissions in the source system.
6000#[derive(Clone, Default, PartialEq)]
6001#[non_exhaustive]
6002pub struct LookupEntryRequest {
6003    /// Required. The project to which the request should be attributed in the
6004    /// following form: `projects/{project}/locations/{location}`.
6005    pub name: std::string::String,
6006
6007    /// Optional. View to control which parts of an entry the service should
6008    /// return.
6009    pub view: crate::model::EntryView,
6010
6011    /// Optional. Limits the aspects returned to the provided aspect types.
6012    /// It only works for CUSTOM view.
6013    pub aspect_types: std::vec::Vec<std::string::String>,
6014
6015    /// Optional. Limits the aspects returned to those associated with the provided
6016    /// paths within the Entry. It only works for CUSTOM view.
6017    pub paths: std::vec::Vec<std::string::String>,
6018
6019    /// Required. The resource name of the Entry:
6020    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
6021    pub entry: std::string::String,
6022
6023    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6024}
6025
6026impl LookupEntryRequest {
6027    pub fn new() -> Self {
6028        std::default::Default::default()
6029    }
6030
6031    /// Sets the value of [name][crate::model::LookupEntryRequest::name].
6032    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6033        self.name = v.into();
6034        self
6035    }
6036
6037    /// Sets the value of [view][crate::model::LookupEntryRequest::view].
6038    pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
6039        self.view = v.into();
6040        self
6041    }
6042
6043    /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
6044    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
6045    where
6046        T: std::iter::IntoIterator<Item = V>,
6047        V: std::convert::Into<std::string::String>,
6048    {
6049        use std::iter::Iterator;
6050        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
6051        self
6052    }
6053
6054    /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
6055    pub fn set_paths<T, V>(mut self, v: T) -> Self
6056    where
6057        T: std::iter::IntoIterator<Item = V>,
6058        V: std::convert::Into<std::string::String>,
6059    {
6060        use std::iter::Iterator;
6061        self.paths = v.into_iter().map(|i| i.into()).collect();
6062        self
6063    }
6064
6065    /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
6066    pub fn set_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6067        self.entry = v.into();
6068        self
6069    }
6070}
6071
6072impl wkt::message::Message for LookupEntryRequest {
6073    fn typename() -> &'static str {
6074        "type.googleapis.com/google.cloud.dataplex.v1.LookupEntryRequest"
6075    }
6076}
6077
6078#[derive(Clone, Default, PartialEq)]
6079#[non_exhaustive]
6080pub struct SearchEntriesRequest {
6081    /// Required. The project to which the request should be attributed in the
6082    /// following form: `projects/{project}/locations/global`.
6083    pub name: std::string::String,
6084
6085    /// Required. The query against which entries in scope should be matched.
6086    /// The query syntax is defined in [Search syntax for Dataplex Universal
6087    /// Catalog](https://cloud.google.com/dataplex/docs/search-syntax).
6088    pub query: std::string::String,
6089
6090    /// Optional. Number of results in the search page. If <=0, then defaults
6091    /// to 10. Max limit for page_size is 1000. Throws an invalid argument for
6092    /// page_size > 1000.
6093    pub page_size: i32,
6094
6095    /// Optional. Page token received from a previous `SearchEntries` call. Provide
6096    /// this to retrieve the subsequent page.
6097    pub page_token: std::string::String,
6098
6099    /// Optional. Specifies the ordering of results.
6100    /// Supported values are:
6101    ///
6102    /// * `relevance`
6103    /// * `last_modified_timestamp`
6104    /// * `last_modified_timestamp asc`
6105    pub order_by: std::string::String,
6106
6107    /// Optional. The scope under which the search should be operating. It must
6108    /// either be `organizations/<org_id>` or `projects/<project_ref>`. If it is
6109    /// unspecified, it defaults to the organization where the project provided in
6110    /// `name` is located.
6111    pub scope: std::string::String,
6112
6113    /// Optional. Specifies whether the search should understand the meaning and
6114    /// intent behind the query, rather than just matching keywords.
6115    pub semantic_search: bool,
6116
6117    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6118}
6119
6120impl SearchEntriesRequest {
6121    pub fn new() -> Self {
6122        std::default::Default::default()
6123    }
6124
6125    /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
6126    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6127        self.name = v.into();
6128        self
6129    }
6130
6131    /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
6132    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6133        self.query = v.into();
6134        self
6135    }
6136
6137    /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
6138    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6139        self.page_size = v.into();
6140        self
6141    }
6142
6143    /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
6144    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6145        self.page_token = v.into();
6146        self
6147    }
6148
6149    /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
6150    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6151        self.order_by = v.into();
6152        self
6153    }
6154
6155    /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
6156    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6157        self.scope = v.into();
6158        self
6159    }
6160
6161    /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
6162    pub fn set_semantic_search<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6163        self.semantic_search = v.into();
6164        self
6165    }
6166}
6167
6168impl wkt::message::Message for SearchEntriesRequest {
6169    fn typename() -> &'static str {
6170        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesRequest"
6171    }
6172}
6173
6174/// A single result of a SearchEntries request.
6175#[derive(Clone, Default, PartialEq)]
6176#[non_exhaustive]
6177pub struct SearchEntriesResult {
6178    /// Linked resource name.
6179    #[deprecated]
6180    pub linked_resource: std::string::String,
6181
6182    pub dataplex_entry: std::option::Option<crate::model::Entry>,
6183
6184    /// Snippets.
6185    #[deprecated]
6186    pub snippets: std::option::Option<crate::model::search_entries_result::Snippets>,
6187
6188    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6189}
6190
6191impl SearchEntriesResult {
6192    pub fn new() -> Self {
6193        std::default::Default::default()
6194    }
6195
6196    /// Sets the value of [linked_resource][crate::model::SearchEntriesResult::linked_resource].
6197    #[deprecated]
6198    pub fn set_linked_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6199        self.linked_resource = v.into();
6200        self
6201    }
6202
6203    /// Sets the value of [dataplex_entry][crate::model::SearchEntriesResult::dataplex_entry].
6204    pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
6205    where
6206        T: std::convert::Into<crate::model::Entry>,
6207    {
6208        self.dataplex_entry = std::option::Option::Some(v.into());
6209        self
6210    }
6211
6212    /// Sets or clears the value of [dataplex_entry][crate::model::SearchEntriesResult::dataplex_entry].
6213    pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
6214    where
6215        T: std::convert::Into<crate::model::Entry>,
6216    {
6217        self.dataplex_entry = v.map(|x| x.into());
6218        self
6219    }
6220
6221    /// Sets the value of [snippets][crate::model::SearchEntriesResult::snippets].
6222    #[deprecated]
6223    pub fn set_snippets<T>(mut self, v: T) -> Self
6224    where
6225        T: std::convert::Into<crate::model::search_entries_result::Snippets>,
6226    {
6227        self.snippets = std::option::Option::Some(v.into());
6228        self
6229    }
6230
6231    /// Sets or clears the value of [snippets][crate::model::SearchEntriesResult::snippets].
6232    #[deprecated]
6233    pub fn set_or_clear_snippets<T>(mut self, v: std::option::Option<T>) -> Self
6234    where
6235        T: std::convert::Into<crate::model::search_entries_result::Snippets>,
6236    {
6237        self.snippets = v.map(|x| x.into());
6238        self
6239    }
6240}
6241
6242impl wkt::message::Message for SearchEntriesResult {
6243    fn typename() -> &'static str {
6244        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult"
6245    }
6246}
6247
6248/// Defines additional types related to [SearchEntriesResult].
6249pub mod search_entries_result {
6250    #[allow(unused_imports)]
6251    use super::*;
6252
6253    /// Snippets for the entry, contains HTML-style highlighting for
6254    /// matched tokens, will be used in UI.
6255    #[derive(Clone, Default, PartialEq)]
6256    #[non_exhaustive]
6257    #[deprecated]
6258    pub struct Snippets {
6259        /// Entry
6260        #[deprecated]
6261        pub dataplex_entry: std::option::Option<crate::model::Entry>,
6262
6263        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6264    }
6265
6266    impl Snippets {
6267        pub fn new() -> Self {
6268            std::default::Default::default()
6269        }
6270
6271        /// Sets the value of [dataplex_entry][crate::model::search_entries_result::Snippets::dataplex_entry].
6272        #[deprecated]
6273        pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
6274        where
6275            T: std::convert::Into<crate::model::Entry>,
6276        {
6277            self.dataplex_entry = std::option::Option::Some(v.into());
6278            self
6279        }
6280
6281        /// Sets or clears the value of [dataplex_entry][crate::model::search_entries_result::Snippets::dataplex_entry].
6282        #[deprecated]
6283        pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
6284        where
6285            T: std::convert::Into<crate::model::Entry>,
6286        {
6287            self.dataplex_entry = v.map(|x| x.into());
6288            self
6289        }
6290    }
6291
6292    impl wkt::message::Message for Snippets {
6293        fn typename() -> &'static str {
6294            "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult.Snippets"
6295        }
6296    }
6297}
6298
6299#[derive(Clone, Default, PartialEq)]
6300#[non_exhaustive]
6301pub struct SearchEntriesResponse {
6302    /// The results matching the search query.
6303    pub results: std::vec::Vec<crate::model::SearchEntriesResult>,
6304
6305    /// The estimated total number of matching entries. This number isn't
6306    /// guaranteed to be accurate.
6307    pub total_size: i32,
6308
6309    /// Token to retrieve the next page of results, or empty if there are no more
6310    /// results in the list.
6311    pub next_page_token: std::string::String,
6312
6313    /// Locations that the service couldn't reach. Search results don't include
6314    /// data from these locations.
6315    pub unreachable: std::vec::Vec<std::string::String>,
6316
6317    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6318}
6319
6320impl SearchEntriesResponse {
6321    pub fn new() -> Self {
6322        std::default::Default::default()
6323    }
6324
6325    /// Sets the value of [results][crate::model::SearchEntriesResponse::results].
6326    pub fn set_results<T, V>(mut self, v: T) -> Self
6327    where
6328        T: std::iter::IntoIterator<Item = V>,
6329        V: std::convert::Into<crate::model::SearchEntriesResult>,
6330    {
6331        use std::iter::Iterator;
6332        self.results = v.into_iter().map(|i| i.into()).collect();
6333        self
6334    }
6335
6336    /// Sets the value of [total_size][crate::model::SearchEntriesResponse::total_size].
6337    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6338        self.total_size = v.into();
6339        self
6340    }
6341
6342    /// Sets the value of [next_page_token][crate::model::SearchEntriesResponse::next_page_token].
6343    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6344        self.next_page_token = v.into();
6345        self
6346    }
6347
6348    /// Sets the value of [unreachable][crate::model::SearchEntriesResponse::unreachable].
6349    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6350    where
6351        T: std::iter::IntoIterator<Item = V>,
6352        V: std::convert::Into<std::string::String>,
6353    {
6354        use std::iter::Iterator;
6355        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6356        self
6357    }
6358}
6359
6360impl wkt::message::Message for SearchEntriesResponse {
6361    fn typename() -> &'static str {
6362        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResponse"
6363    }
6364}
6365
6366#[doc(hidden)]
6367impl gax::paginator::internal::PageableResponse for SearchEntriesResponse {
6368    type PageItem = crate::model::SearchEntriesResult;
6369
6370    fn items(self) -> std::vec::Vec<Self::PageItem> {
6371        self.results
6372    }
6373
6374    fn next_page_token(&self) -> std::string::String {
6375        use std::clone::Clone;
6376        self.next_page_token.clone()
6377    }
6378}
6379
6380/// An object that describes the values that you want to set for an entry and its
6381/// attached aspects when you import metadata. Used when you run a metadata
6382/// import job. See
6383/// [CreateMetadataJob][google.cloud.dataplex.v1.CatalogService.CreateMetadataJob].
6384///
6385/// You provide a collection of import items in a metadata import file. For more
6386/// information about how to create a metadata import file, see [Metadata import
6387/// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).
6388///
6389/// [google.cloud.dataplex.v1.CatalogService.CreateMetadataJob]: crate::client::CatalogService::create_metadata_job
6390#[derive(Clone, Default, PartialEq)]
6391#[non_exhaustive]
6392pub struct ImportItem {
6393    /// Information about an entry and its attached aspects.
6394    pub entry: std::option::Option<crate::model::Entry>,
6395
6396    /// Information about the entry link. User should provide either one of the
6397    /// entry or entry_link. While providing entry_link, user should not
6398    /// provide update_mask and aspect_keys.
6399    pub entry_link: std::option::Option<crate::model::EntryLink>,
6400
6401    /// The fields to update, in paths that are relative to the `Entry` resource.
6402    /// Separate each field with a comma.
6403    ///
6404    /// In `FULL` entry sync mode, Dataplex Universal Catalog includes the paths of
6405    /// all of the fields for an entry that can be modified, including aspects.
6406    /// This means that Dataplex Universal Catalog replaces the existing entry with
6407    /// the entry in the metadata import file. All modifiable fields are updated,
6408    /// regardless of the fields that are listed in the update mask, and regardless
6409    /// of whether a field is present in the `entry` object.
6410    ///
6411    /// The `update_mask` field is ignored when an entry is created or re-created.
6412    ///
6413    /// In an aspect-only metadata job (when entry sync mode is `NONE`), set this
6414    /// value to `aspects`.
6415    ///
6416    /// Dataplex Universal Catalog also determines which entries and aspects to
6417    /// modify by comparing the values and timestamps that you provide in the
6418    /// metadata import file with the values and timestamps that exist in your
6419    /// project. For more information, see [Comparison
6420    /// logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic).
6421    pub update_mask: std::option::Option<wkt::FieldMask>,
6422
6423    /// The aspects to modify. Supports the following syntaxes:
6424    ///
6425    /// * `{aspect_type_reference}`: matches aspects that belong to the specified
6426    ///   aspect type and are attached directly to the entry.
6427    /// * `{aspect_type_reference}@{path}`: matches aspects that belong to the
6428    ///   specified aspect type and path.
6429    /// * `{aspect_type_reference}@*` : matches aspects of the given type for all
6430    ///   paths.
6431    /// * `*@path` : matches aspects of all types on the given path.
6432    ///
6433    /// Replace `{aspect_type_reference}` with a reference to the aspect type, in
6434    /// the format
6435    /// `{project_id_or_number}.{location_id}.{aspect_type_id}`.
6436    ///
6437    /// In `FULL` entry sync mode, if you leave this field empty, it is treated as
6438    /// specifying exactly those aspects that are present within the specified
6439    /// entry. Dataplex Universal Catalog implicitly adds the keys for all of the
6440    /// required aspects of an entry.
6441    pub aspect_keys: std::vec::Vec<std::string::String>,
6442
6443    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6444}
6445
6446impl ImportItem {
6447    pub fn new() -> Self {
6448        std::default::Default::default()
6449    }
6450
6451    /// Sets the value of [entry][crate::model::ImportItem::entry].
6452    pub fn set_entry<T>(mut self, v: T) -> Self
6453    where
6454        T: std::convert::Into<crate::model::Entry>,
6455    {
6456        self.entry = std::option::Option::Some(v.into());
6457        self
6458    }
6459
6460    /// Sets or clears the value of [entry][crate::model::ImportItem::entry].
6461    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
6462    where
6463        T: std::convert::Into<crate::model::Entry>,
6464    {
6465        self.entry = v.map(|x| x.into());
6466        self
6467    }
6468
6469    /// Sets the value of [entry_link][crate::model::ImportItem::entry_link].
6470    pub fn set_entry_link<T>(mut self, v: T) -> Self
6471    where
6472        T: std::convert::Into<crate::model::EntryLink>,
6473    {
6474        self.entry_link = std::option::Option::Some(v.into());
6475        self
6476    }
6477
6478    /// Sets or clears the value of [entry_link][crate::model::ImportItem::entry_link].
6479    pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
6480    where
6481        T: std::convert::Into<crate::model::EntryLink>,
6482    {
6483        self.entry_link = v.map(|x| x.into());
6484        self
6485    }
6486
6487    /// Sets the value of [update_mask][crate::model::ImportItem::update_mask].
6488    pub fn set_update_mask<T>(mut self, v: T) -> Self
6489    where
6490        T: std::convert::Into<wkt::FieldMask>,
6491    {
6492        self.update_mask = std::option::Option::Some(v.into());
6493        self
6494    }
6495
6496    /// Sets or clears the value of [update_mask][crate::model::ImportItem::update_mask].
6497    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6498    where
6499        T: std::convert::Into<wkt::FieldMask>,
6500    {
6501        self.update_mask = v.map(|x| x.into());
6502        self
6503    }
6504
6505    /// Sets the value of [aspect_keys][crate::model::ImportItem::aspect_keys].
6506    pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
6507    where
6508        T: std::iter::IntoIterator<Item = V>,
6509        V: std::convert::Into<std::string::String>,
6510    {
6511        use std::iter::Iterator;
6512        self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
6513        self
6514    }
6515}
6516
6517impl wkt::message::Message for ImportItem {
6518    fn typename() -> &'static str {
6519        "type.googleapis.com/google.cloud.dataplex.v1.ImportItem"
6520    }
6521}
6522
6523/// Create metadata job request.
6524#[derive(Clone, Default, PartialEq)]
6525#[non_exhaustive]
6526pub struct CreateMetadataJobRequest {
6527    /// Required. The resource name of the parent location, in the format
6528    /// `projects/{project_id_or_number}/locations/{location_id}`
6529    pub parent: std::string::String,
6530
6531    /// Required. The metadata job resource.
6532    pub metadata_job: std::option::Option<crate::model::MetadataJob>,
6533
6534    /// Optional. The metadata job ID. If not provided, a unique ID is generated
6535    /// with the prefix `metadata-job-`.
6536    pub metadata_job_id: std::string::String,
6537
6538    /// Optional. The service validates the request without performing any
6539    /// mutations. The default is false.
6540    pub validate_only: bool,
6541
6542    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6543}
6544
6545impl CreateMetadataJobRequest {
6546    pub fn new() -> Self {
6547        std::default::Default::default()
6548    }
6549
6550    /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
6551    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6552        self.parent = v.into();
6553        self
6554    }
6555
6556    /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
6557    pub fn set_metadata_job<T>(mut self, v: T) -> Self
6558    where
6559        T: std::convert::Into<crate::model::MetadataJob>,
6560    {
6561        self.metadata_job = std::option::Option::Some(v.into());
6562        self
6563    }
6564
6565    /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
6566    pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
6567    where
6568        T: std::convert::Into<crate::model::MetadataJob>,
6569    {
6570        self.metadata_job = v.map(|x| x.into());
6571        self
6572    }
6573
6574    /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
6575    pub fn set_metadata_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6576        self.metadata_job_id = v.into();
6577        self
6578    }
6579
6580    /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
6581    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6582        self.validate_only = v.into();
6583        self
6584    }
6585}
6586
6587impl wkt::message::Message for CreateMetadataJobRequest {
6588    fn typename() -> &'static str {
6589        "type.googleapis.com/google.cloud.dataplex.v1.CreateMetadataJobRequest"
6590    }
6591}
6592
6593/// Get metadata job request.
6594#[derive(Clone, Default, PartialEq)]
6595#[non_exhaustive]
6596pub struct GetMetadataJobRequest {
6597    /// Required. The resource name of the metadata job, in the format
6598    /// `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`.
6599    pub name: std::string::String,
6600
6601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6602}
6603
6604impl GetMetadataJobRequest {
6605    pub fn new() -> Self {
6606        std::default::Default::default()
6607    }
6608
6609    /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
6610    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6611        self.name = v.into();
6612        self
6613    }
6614}
6615
6616impl wkt::message::Message for GetMetadataJobRequest {
6617    fn typename() -> &'static str {
6618        "type.googleapis.com/google.cloud.dataplex.v1.GetMetadataJobRequest"
6619    }
6620}
6621
6622/// List metadata jobs request.
6623#[derive(Clone, Default, PartialEq)]
6624#[non_exhaustive]
6625pub struct ListMetadataJobsRequest {
6626    /// Required. The resource name of the parent location, in the format
6627    /// `projects/{project_id_or_number}/locations/{location_id}`
6628    pub parent: std::string::String,
6629
6630    /// Optional. The maximum number of metadata jobs to return. The service might
6631    /// return fewer jobs than this value. If unspecified, at most 10 jobs are
6632    /// returned. The maximum value is 1,000.
6633    pub page_size: i32,
6634
6635    /// Optional. The page token received from a previous `ListMetadataJobs` call.
6636    /// Provide this token to retrieve the subsequent page of results. When
6637    /// paginating, all other parameters that are provided to the
6638    /// `ListMetadataJobs` request must match the call that provided the page
6639    /// token.
6640    pub page_token: std::string::String,
6641
6642    /// Optional. Filter request. Filters are case-sensitive.
6643    /// The service supports the following formats:
6644    ///
6645    /// * `labels.key1 = "value1"`
6646    /// * `labels:key1`
6647    /// * `name = "value"`
6648    ///
6649    /// You can combine filters with `AND`, `OR`, and `NOT` operators.
6650    pub filter: std::string::String,
6651
6652    /// Optional. The field to sort the results by, either `name` or `create_time`.
6653    /// If not specified, the ordering is undefined.
6654    pub order_by: std::string::String,
6655
6656    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6657}
6658
6659impl ListMetadataJobsRequest {
6660    pub fn new() -> Self {
6661        std::default::Default::default()
6662    }
6663
6664    /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
6665    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6666        self.parent = v.into();
6667        self
6668    }
6669
6670    /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
6671    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6672        self.page_size = v.into();
6673        self
6674    }
6675
6676    /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
6677    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6678        self.page_token = v.into();
6679        self
6680    }
6681
6682    /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
6683    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6684        self.filter = v.into();
6685        self
6686    }
6687
6688    /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
6689    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6690        self.order_by = v.into();
6691        self
6692    }
6693}
6694
6695impl wkt::message::Message for ListMetadataJobsRequest {
6696    fn typename() -> &'static str {
6697        "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsRequest"
6698    }
6699}
6700
6701/// List metadata jobs response.
6702#[derive(Clone, Default, PartialEq)]
6703#[non_exhaustive]
6704pub struct ListMetadataJobsResponse {
6705    /// Metadata jobs under the specified parent location.
6706    pub metadata_jobs: std::vec::Vec<crate::model::MetadataJob>,
6707
6708    /// A token to retrieve the next page of results. If there are no more results
6709    /// in the list, the value is empty.
6710    pub next_page_token: std::string::String,
6711
6712    /// Locations that the service couldn't reach.
6713    pub unreachable_locations: std::vec::Vec<std::string::String>,
6714
6715    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6716}
6717
6718impl ListMetadataJobsResponse {
6719    pub fn new() -> Self {
6720        std::default::Default::default()
6721    }
6722
6723    /// Sets the value of [metadata_jobs][crate::model::ListMetadataJobsResponse::metadata_jobs].
6724    pub fn set_metadata_jobs<T, V>(mut self, v: T) -> Self
6725    where
6726        T: std::iter::IntoIterator<Item = V>,
6727        V: std::convert::Into<crate::model::MetadataJob>,
6728    {
6729        use std::iter::Iterator;
6730        self.metadata_jobs = v.into_iter().map(|i| i.into()).collect();
6731        self
6732    }
6733
6734    /// Sets the value of [next_page_token][crate::model::ListMetadataJobsResponse::next_page_token].
6735    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6736        self.next_page_token = v.into();
6737        self
6738    }
6739
6740    /// Sets the value of [unreachable_locations][crate::model::ListMetadataJobsResponse::unreachable_locations].
6741    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
6742    where
6743        T: std::iter::IntoIterator<Item = V>,
6744        V: std::convert::Into<std::string::String>,
6745    {
6746        use std::iter::Iterator;
6747        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
6748        self
6749    }
6750}
6751
6752impl wkt::message::Message for ListMetadataJobsResponse {
6753    fn typename() -> &'static str {
6754        "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsResponse"
6755    }
6756}
6757
6758#[doc(hidden)]
6759impl gax::paginator::internal::PageableResponse for ListMetadataJobsResponse {
6760    type PageItem = crate::model::MetadataJob;
6761
6762    fn items(self) -> std::vec::Vec<Self::PageItem> {
6763        self.metadata_jobs
6764    }
6765
6766    fn next_page_token(&self) -> std::string::String {
6767        use std::clone::Clone;
6768        self.next_page_token.clone()
6769    }
6770}
6771
6772/// Cancel metadata job request.
6773#[derive(Clone, Default, PartialEq)]
6774#[non_exhaustive]
6775pub struct CancelMetadataJobRequest {
6776    /// Required. The resource name of the job, in the format
6777    /// `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`
6778    pub name: std::string::String,
6779
6780    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6781}
6782
6783impl CancelMetadataJobRequest {
6784    pub fn new() -> Self {
6785        std::default::Default::default()
6786    }
6787
6788    /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
6789    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6790        self.name = v.into();
6791        self
6792    }
6793}
6794
6795impl wkt::message::Message for CancelMetadataJobRequest {
6796    fn typename() -> &'static str {
6797        "type.googleapis.com/google.cloud.dataplex.v1.CancelMetadataJobRequest"
6798    }
6799}
6800
6801/// A metadata job resource.
6802#[derive(Clone, Default, PartialEq)]
6803#[non_exhaustive]
6804pub struct MetadataJob {
6805    /// Output only. Identifier. The name of the resource that the configuration is
6806    /// applied to, in the format
6807    /// `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`.
6808    pub name: std::string::String,
6809
6810    /// Output only. A system-generated, globally unique ID for the metadata job.
6811    /// If the metadata job is deleted and then re-created with the same name, this
6812    /// ID is different.
6813    pub uid: std::string::String,
6814
6815    /// Output only. The time when the metadata job was created.
6816    pub create_time: std::option::Option<wkt::Timestamp>,
6817
6818    /// Output only. The time when the metadata job was updated.
6819    pub update_time: std::option::Option<wkt::Timestamp>,
6820
6821    /// Optional. User-defined labels.
6822    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6823
6824    /// Required. Metadata job type.
6825    pub r#type: crate::model::metadata_job::Type,
6826
6827    /// Output only. Metadata job status.
6828    pub status: std::option::Option<crate::model::metadata_job::Status>,
6829
6830    pub spec: std::option::Option<crate::model::metadata_job::Spec>,
6831
6832    pub result: std::option::Option<crate::model::metadata_job::Result>,
6833
6834    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6835}
6836
6837impl MetadataJob {
6838    pub fn new() -> Self {
6839        std::default::Default::default()
6840    }
6841
6842    /// Sets the value of [name][crate::model::MetadataJob::name].
6843    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6844        self.name = v.into();
6845        self
6846    }
6847
6848    /// Sets the value of [uid][crate::model::MetadataJob::uid].
6849    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6850        self.uid = v.into();
6851        self
6852    }
6853
6854    /// Sets the value of [create_time][crate::model::MetadataJob::create_time].
6855    pub fn set_create_time<T>(mut self, v: T) -> Self
6856    where
6857        T: std::convert::Into<wkt::Timestamp>,
6858    {
6859        self.create_time = std::option::Option::Some(v.into());
6860        self
6861    }
6862
6863    /// Sets or clears the value of [create_time][crate::model::MetadataJob::create_time].
6864    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6865    where
6866        T: std::convert::Into<wkt::Timestamp>,
6867    {
6868        self.create_time = v.map(|x| x.into());
6869        self
6870    }
6871
6872    /// Sets the value of [update_time][crate::model::MetadataJob::update_time].
6873    pub fn set_update_time<T>(mut self, v: T) -> Self
6874    where
6875        T: std::convert::Into<wkt::Timestamp>,
6876    {
6877        self.update_time = std::option::Option::Some(v.into());
6878        self
6879    }
6880
6881    /// Sets or clears the value of [update_time][crate::model::MetadataJob::update_time].
6882    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6883    where
6884        T: std::convert::Into<wkt::Timestamp>,
6885    {
6886        self.update_time = v.map(|x| x.into());
6887        self
6888    }
6889
6890    /// Sets the value of [labels][crate::model::MetadataJob::labels].
6891    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6892    where
6893        T: std::iter::IntoIterator<Item = (K, V)>,
6894        K: std::convert::Into<std::string::String>,
6895        V: std::convert::Into<std::string::String>,
6896    {
6897        use std::iter::Iterator;
6898        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6899        self
6900    }
6901
6902    /// Sets the value of [r#type][crate::model::MetadataJob::type].
6903    pub fn set_type<T: std::convert::Into<crate::model::metadata_job::Type>>(
6904        mut self,
6905        v: T,
6906    ) -> Self {
6907        self.r#type = v.into();
6908        self
6909    }
6910
6911    /// Sets the value of [status][crate::model::MetadataJob::status].
6912    pub fn set_status<T>(mut self, v: T) -> Self
6913    where
6914        T: std::convert::Into<crate::model::metadata_job::Status>,
6915    {
6916        self.status = std::option::Option::Some(v.into());
6917        self
6918    }
6919
6920    /// Sets or clears the value of [status][crate::model::MetadataJob::status].
6921    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
6922    where
6923        T: std::convert::Into<crate::model::metadata_job::Status>,
6924    {
6925        self.status = v.map(|x| x.into());
6926        self
6927    }
6928
6929    /// Sets the value of [spec][crate::model::MetadataJob::spec].
6930    ///
6931    /// Note that all the setters affecting `spec` are mutually
6932    /// exclusive.
6933    pub fn set_spec<
6934        T: std::convert::Into<std::option::Option<crate::model::metadata_job::Spec>>,
6935    >(
6936        mut self,
6937        v: T,
6938    ) -> Self {
6939        self.spec = v.into();
6940        self
6941    }
6942
6943    /// The value of [spec][crate::model::MetadataJob::spec]
6944    /// if it holds a `ImportSpec`, `None` if the field is not set or
6945    /// holds a different branch.
6946    pub fn import_spec(
6947        &self,
6948    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobSpec>> {
6949        #[allow(unreachable_patterns)]
6950        self.spec.as_ref().and_then(|v| match v {
6951            crate::model::metadata_job::Spec::ImportSpec(v) => std::option::Option::Some(v),
6952            _ => std::option::Option::None,
6953        })
6954    }
6955
6956    /// Sets the value of [spec][crate::model::MetadataJob::spec]
6957    /// to hold a `ImportSpec`.
6958    ///
6959    /// Note that all the setters affecting `spec` are
6960    /// mutually exclusive.
6961    pub fn set_import_spec<
6962        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobSpec>>,
6963    >(
6964        mut self,
6965        v: T,
6966    ) -> Self {
6967        self.spec =
6968            std::option::Option::Some(crate::model::metadata_job::Spec::ImportSpec(v.into()));
6969        self
6970    }
6971
6972    /// The value of [spec][crate::model::MetadataJob::spec]
6973    /// if it holds a `ExportSpec`, `None` if the field is not set or
6974    /// holds a different branch.
6975    pub fn export_spec(
6976        &self,
6977    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobSpec>> {
6978        #[allow(unreachable_patterns)]
6979        self.spec.as_ref().and_then(|v| match v {
6980            crate::model::metadata_job::Spec::ExportSpec(v) => std::option::Option::Some(v),
6981            _ => std::option::Option::None,
6982        })
6983    }
6984
6985    /// Sets the value of [spec][crate::model::MetadataJob::spec]
6986    /// to hold a `ExportSpec`.
6987    ///
6988    /// Note that all the setters affecting `spec` are
6989    /// mutually exclusive.
6990    pub fn set_export_spec<
6991        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobSpec>>,
6992    >(
6993        mut self,
6994        v: T,
6995    ) -> Self {
6996        self.spec =
6997            std::option::Option::Some(crate::model::metadata_job::Spec::ExportSpec(v.into()));
6998        self
6999    }
7000
7001    /// Sets the value of [result][crate::model::MetadataJob::result].
7002    ///
7003    /// Note that all the setters affecting `result` are mutually
7004    /// exclusive.
7005    pub fn set_result<
7006        T: std::convert::Into<std::option::Option<crate::model::metadata_job::Result>>,
7007    >(
7008        mut self,
7009        v: T,
7010    ) -> Self {
7011        self.result = v.into();
7012        self
7013    }
7014
7015    /// The value of [result][crate::model::MetadataJob::result]
7016    /// if it holds a `ImportResult`, `None` if the field is not set or
7017    /// holds a different branch.
7018    pub fn import_result(
7019        &self,
7020    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobResult>> {
7021        #[allow(unreachable_patterns)]
7022        self.result.as_ref().and_then(|v| match v {
7023            crate::model::metadata_job::Result::ImportResult(v) => std::option::Option::Some(v),
7024            _ => std::option::Option::None,
7025        })
7026    }
7027
7028    /// Sets the value of [result][crate::model::MetadataJob::result]
7029    /// to hold a `ImportResult`.
7030    ///
7031    /// Note that all the setters affecting `result` are
7032    /// mutually exclusive.
7033    pub fn set_import_result<
7034        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobResult>>,
7035    >(
7036        mut self,
7037        v: T,
7038    ) -> Self {
7039        self.result =
7040            std::option::Option::Some(crate::model::metadata_job::Result::ImportResult(v.into()));
7041        self
7042    }
7043
7044    /// The value of [result][crate::model::MetadataJob::result]
7045    /// if it holds a `ExportResult`, `None` if the field is not set or
7046    /// holds a different branch.
7047    pub fn export_result(
7048        &self,
7049    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobResult>> {
7050        #[allow(unreachable_patterns)]
7051        self.result.as_ref().and_then(|v| match v {
7052            crate::model::metadata_job::Result::ExportResult(v) => std::option::Option::Some(v),
7053            _ => std::option::Option::None,
7054        })
7055    }
7056
7057    /// Sets the value of [result][crate::model::MetadataJob::result]
7058    /// to hold a `ExportResult`.
7059    ///
7060    /// Note that all the setters affecting `result` are
7061    /// mutually exclusive.
7062    pub fn set_export_result<
7063        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobResult>>,
7064    >(
7065        mut self,
7066        v: T,
7067    ) -> Self {
7068        self.result =
7069            std::option::Option::Some(crate::model::metadata_job::Result::ExportResult(v.into()));
7070        self
7071    }
7072}
7073
7074impl wkt::message::Message for MetadataJob {
7075    fn typename() -> &'static str {
7076        "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob"
7077    }
7078}
7079
7080/// Defines additional types related to [MetadataJob].
7081pub mod metadata_job {
7082    #[allow(unused_imports)]
7083    use super::*;
7084
7085    /// Results from a metadata import job.
7086    #[derive(Clone, Default, PartialEq)]
7087    #[non_exhaustive]
7088    pub struct ImportJobResult {
7089        /// Output only. The total number of entries that were deleted.
7090        pub deleted_entries: i64,
7091
7092        /// Output only. The total number of entries that were updated.
7093        pub updated_entries: i64,
7094
7095        /// Output only. The total number of entries that were created.
7096        pub created_entries: i64,
7097
7098        /// Output only. The total number of entries that were unchanged.
7099        pub unchanged_entries: i64,
7100
7101        /// Output only. The total number of entries that were recreated.
7102        pub recreated_entries: i64,
7103
7104        /// Output only. The time when the status was updated.
7105        pub update_time: std::option::Option<wkt::Timestamp>,
7106
7107        /// Output only. The total number of entry links that were successfully
7108        /// deleted.
7109        pub deleted_entry_links: i64,
7110
7111        /// Output only. The total number of entry links that were successfully
7112        /// created.
7113        pub created_entry_links: i64,
7114
7115        /// Output only. The total number of entry links that were left unchanged.
7116        pub unchanged_entry_links: i64,
7117
7118        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7119    }
7120
7121    impl ImportJobResult {
7122        pub fn new() -> Self {
7123            std::default::Default::default()
7124        }
7125
7126        /// Sets the value of [deleted_entries][crate::model::metadata_job::ImportJobResult::deleted_entries].
7127        pub fn set_deleted_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7128            self.deleted_entries = v.into();
7129            self
7130        }
7131
7132        /// Sets the value of [updated_entries][crate::model::metadata_job::ImportJobResult::updated_entries].
7133        pub fn set_updated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7134            self.updated_entries = v.into();
7135            self
7136        }
7137
7138        /// Sets the value of [created_entries][crate::model::metadata_job::ImportJobResult::created_entries].
7139        pub fn set_created_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7140            self.created_entries = v.into();
7141            self
7142        }
7143
7144        /// Sets the value of [unchanged_entries][crate::model::metadata_job::ImportJobResult::unchanged_entries].
7145        pub fn set_unchanged_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7146            self.unchanged_entries = v.into();
7147            self
7148        }
7149
7150        /// Sets the value of [recreated_entries][crate::model::metadata_job::ImportJobResult::recreated_entries].
7151        pub fn set_recreated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7152            self.recreated_entries = v.into();
7153            self
7154        }
7155
7156        /// Sets the value of [update_time][crate::model::metadata_job::ImportJobResult::update_time].
7157        pub fn set_update_time<T>(mut self, v: T) -> Self
7158        where
7159            T: std::convert::Into<wkt::Timestamp>,
7160        {
7161            self.update_time = std::option::Option::Some(v.into());
7162            self
7163        }
7164
7165        /// Sets or clears the value of [update_time][crate::model::metadata_job::ImportJobResult::update_time].
7166        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7167        where
7168            T: std::convert::Into<wkt::Timestamp>,
7169        {
7170            self.update_time = v.map(|x| x.into());
7171            self
7172        }
7173
7174        /// Sets the value of [deleted_entry_links][crate::model::metadata_job::ImportJobResult::deleted_entry_links].
7175        pub fn set_deleted_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7176            self.deleted_entry_links = v.into();
7177            self
7178        }
7179
7180        /// Sets the value of [created_entry_links][crate::model::metadata_job::ImportJobResult::created_entry_links].
7181        pub fn set_created_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7182            self.created_entry_links = v.into();
7183            self
7184        }
7185
7186        /// Sets the value of [unchanged_entry_links][crate::model::metadata_job::ImportJobResult::unchanged_entry_links].
7187        pub fn set_unchanged_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7188            self.unchanged_entry_links = v.into();
7189            self
7190        }
7191    }
7192
7193    impl wkt::message::Message for ImportJobResult {
7194        fn typename() -> &'static str {
7195            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobResult"
7196        }
7197    }
7198
7199    /// Summary results from a metadata export job. The results are a snapshot of
7200    /// the metadata at the time when the job was created. The exported entries are
7201    /// saved to a Cloud Storage bucket.
7202    #[derive(Clone, Default, PartialEq)]
7203    #[non_exhaustive]
7204    pub struct ExportJobResult {
7205        /// Output only. The number of entries that were exported.
7206        pub exported_entries: i64,
7207
7208        /// Output only. The error message if the metadata export job failed.
7209        pub error_message: std::string::String,
7210
7211        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7212    }
7213
7214    impl ExportJobResult {
7215        pub fn new() -> Self {
7216            std::default::Default::default()
7217        }
7218
7219        /// Sets the value of [exported_entries][crate::model::metadata_job::ExportJobResult::exported_entries].
7220        pub fn set_exported_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7221            self.exported_entries = v.into();
7222            self
7223        }
7224
7225        /// Sets the value of [error_message][crate::model::metadata_job::ExportJobResult::error_message].
7226        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
7227            mut self,
7228            v: T,
7229        ) -> Self {
7230            self.error_message = v.into();
7231            self
7232        }
7233    }
7234
7235    impl wkt::message::Message for ExportJobResult {
7236        fn typename() -> &'static str {
7237            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobResult"
7238        }
7239    }
7240
7241    /// Job specification for a metadata import job.
7242    ///
7243    /// You can run the following kinds of metadata import jobs:
7244    ///
7245    /// * Full sync of entries with incremental import of their aspects.
7246    ///   Supported for custom entries.
7247    /// * Incremental import of aspects only. Supported for aspects that belong
7248    ///   to custom entries and system entries. For custom entries, you can modify
7249    ///   both optional aspects and required aspects. For system entries, you can
7250    ///   modify optional aspects.
7251    #[derive(Clone, Default, PartialEq)]
7252    #[non_exhaustive]
7253    pub struct ImportJobSpec {
7254        /// Optional. The URI of a Cloud Storage bucket or folder (beginning with
7255        /// `gs://` and ending with `/`) that contains the metadata import files for
7256        /// this job.
7257        ///
7258        /// A metadata import file defines the values to set for each of the entries
7259        /// and aspects in a metadata import job. For more information about how to
7260        /// create a metadata import file and the file requirements, see [Metadata
7261        /// import
7262        /// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).
7263        ///
7264        /// You can provide multiple metadata import files in the same metadata job.
7265        /// The bucket or folder must contain at least one metadata import file, in
7266        /// JSON Lines format (either `.json` or `.jsonl` file extension).
7267        ///
7268        /// In `FULL` entry sync mode, don't save the metadata import file in a
7269        /// folder named `SOURCE_STORAGE_URI/deletions/`.
7270        ///
7271        /// **Caution**: If the metadata import file contains no data, all entries
7272        /// and aspects that belong to the job's scope are deleted.
7273        pub source_storage_uri: std::string::String,
7274
7275        /// Optional. The time when the process that created the metadata import
7276        /// files began.
7277        pub source_create_time: std::option::Option<wkt::Timestamp>,
7278
7279        /// Required. A boundary on the scope of impact that the metadata import job
7280        /// can have.
7281        pub scope: std::option::Option<crate::model::metadata_job::import_job_spec::ImportJobScope>,
7282
7283        /// Required. The sync mode for entries.
7284        pub entry_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
7285
7286        /// Required. The sync mode for aspects.
7287        pub aspect_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
7288
7289        /// Optional. The level of logs to write to Cloud Logging for this job.
7290        ///
7291        /// Debug-level logs provide highly-detailed information for
7292        /// troubleshooting, but their increased verbosity could incur [additional
7293        /// costs](https://cloud.google.com/stackdriver/pricing) that might not be
7294        /// merited for all jobs.
7295        ///
7296        /// If unspecified, defaults to `INFO`.
7297        pub log_level: crate::model::metadata_job::import_job_spec::LogLevel,
7298
7299        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7300    }
7301
7302    impl ImportJobSpec {
7303        pub fn new() -> Self {
7304            std::default::Default::default()
7305        }
7306
7307        /// Sets the value of [source_storage_uri][crate::model::metadata_job::ImportJobSpec::source_storage_uri].
7308        pub fn set_source_storage_uri<T: std::convert::Into<std::string::String>>(
7309            mut self,
7310            v: T,
7311        ) -> Self {
7312            self.source_storage_uri = v.into();
7313            self
7314        }
7315
7316        /// Sets the value of [source_create_time][crate::model::metadata_job::ImportJobSpec::source_create_time].
7317        pub fn set_source_create_time<T>(mut self, v: T) -> Self
7318        where
7319            T: std::convert::Into<wkt::Timestamp>,
7320        {
7321            self.source_create_time = std::option::Option::Some(v.into());
7322            self
7323        }
7324
7325        /// Sets or clears the value of [source_create_time][crate::model::metadata_job::ImportJobSpec::source_create_time].
7326        pub fn set_or_clear_source_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7327        where
7328            T: std::convert::Into<wkt::Timestamp>,
7329        {
7330            self.source_create_time = v.map(|x| x.into());
7331            self
7332        }
7333
7334        /// Sets the value of [scope][crate::model::metadata_job::ImportJobSpec::scope].
7335        pub fn set_scope<T>(mut self, v: T) -> Self
7336        where
7337            T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
7338        {
7339            self.scope = std::option::Option::Some(v.into());
7340            self
7341        }
7342
7343        /// Sets or clears the value of [scope][crate::model::metadata_job::ImportJobSpec::scope].
7344        pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
7345        where
7346            T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
7347        {
7348            self.scope = v.map(|x| x.into());
7349            self
7350        }
7351
7352        /// Sets the value of [entry_sync_mode][crate::model::metadata_job::ImportJobSpec::entry_sync_mode].
7353        pub fn set_entry_sync_mode<
7354            T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
7355        >(
7356            mut self,
7357            v: T,
7358        ) -> Self {
7359            self.entry_sync_mode = v.into();
7360            self
7361        }
7362
7363        /// Sets the value of [aspect_sync_mode][crate::model::metadata_job::ImportJobSpec::aspect_sync_mode].
7364        pub fn set_aspect_sync_mode<
7365            T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
7366        >(
7367            mut self,
7368            v: T,
7369        ) -> Self {
7370            self.aspect_sync_mode = v.into();
7371            self
7372        }
7373
7374        /// Sets the value of [log_level][crate::model::metadata_job::ImportJobSpec::log_level].
7375        pub fn set_log_level<
7376            T: std::convert::Into<crate::model::metadata_job::import_job_spec::LogLevel>,
7377        >(
7378            mut self,
7379            v: T,
7380        ) -> Self {
7381            self.log_level = v.into();
7382            self
7383        }
7384    }
7385
7386    impl wkt::message::Message for ImportJobSpec {
7387        fn typename() -> &'static str {
7388            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec"
7389        }
7390    }
7391
7392    /// Defines additional types related to [ImportJobSpec].
7393    pub mod import_job_spec {
7394        #[allow(unused_imports)]
7395        use super::*;
7396
7397        /// A boundary on the scope of impact that the metadata import job can have.
7398        #[derive(Clone, Default, PartialEq)]
7399        #[non_exhaustive]
7400        pub struct ImportJobScope {
7401            /// Required. The entry groups that are in scope for the import job,
7402            /// specified as relative resource names in the format
7403            /// `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`.
7404            /// Only entries and aspects that belong to the specified entry groups are
7405            /// affected by the job.
7406            ///
7407            /// The entry groups and the job must be in the same location.
7408            pub entry_groups: std::vec::Vec<std::string::String>,
7409
7410            /// Required. The entry types that are in scope for the import job,
7411            /// specified as relative resource names in the format
7412            /// `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`.
7413            /// The job modifies only the entries and aspects that belong to these
7414            /// entry types.
7415            ///
7416            /// If the metadata import file attempts to modify an entry whose type
7417            /// isn't included in this list, the import job is halted before modifying
7418            /// any entries or aspects.
7419            ///
7420            /// The location of an entry type must either match the location of the
7421            /// job, or the entry type must be global.
7422            pub entry_types: std::vec::Vec<std::string::String>,
7423
7424            /// Optional. The aspect types that are in scope for the import job,
7425            /// specified as relative resource names in the format
7426            /// `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
7427            /// The job modifies only the aspects that belong to these aspect types.
7428            ///
7429            /// This field is required when creating an aspect-only import job.
7430            ///
7431            /// If the metadata import file attempts to modify an aspect whose type
7432            /// isn't included in this list, the import job is halted before modifying
7433            /// any entries or aspects.
7434            ///
7435            /// The location of an aspect type must either match the location of the
7436            /// job, or the aspect type must be global.
7437            pub aspect_types: std::vec::Vec<std::string::String>,
7438
7439            /// Optional. The glossaries that are in scope for the import job,
7440            /// specified as relative resource names in the format
7441            /// `projects/{project_number_or_id}/locations/{location_id}/glossaries/{glossary_id}`.
7442            ///
7443            /// While importing Business Glossary entries, the user must
7444            /// provide glossaries. While importing entries, the user does not have to
7445            /// provide glossaries. If the metadata import file attempts to modify
7446            /// Business Glossary entries whose glossary isn't included in this list,
7447            /// the import job will skip those entries.
7448            ///
7449            /// The location of a glossary must either match the location of the
7450            /// job, or the glossary must be global.
7451            pub glossaries: std::vec::Vec<std::string::String>,
7452
7453            /// Optional. The entry link types that are in scope for the import job,
7454            /// specified as relative resource names in the format
7455            /// `projects/{project_number_or_id}/locations/{location_id}/entryLinkTypes/{entry_link_type_id}`.
7456            /// The job modifies only the entryLinks that belong to these entry link
7457            /// types.
7458            ///
7459            /// If the metadata import file attempts to create or delete an entry link
7460            /// whose entry link type isn't included in this list, the import job will
7461            /// skip those entry links.
7462            pub entry_link_types: std::vec::Vec<std::string::String>,
7463
7464            /// Optional. Defines the scope of entries that can be referenced in the
7465            /// entry links.
7466            ///
7467            /// Currently, projects are supported as valid scopes.
7468            /// Format: `projects/{project_number_or_id}`
7469            ///
7470            /// If the metadata import file attempts to create an entry link
7471            /// which references an entry that is not in the scope, the import job will
7472            /// skip that entry link.
7473            pub referenced_entry_scopes: std::vec::Vec<std::string::String>,
7474
7475            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7476        }
7477
7478        impl ImportJobScope {
7479            pub fn new() -> Self {
7480                std::default::Default::default()
7481            }
7482
7483            /// Sets the value of [entry_groups][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_groups].
7484            pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
7485            where
7486                T: std::iter::IntoIterator<Item = V>,
7487                V: std::convert::Into<std::string::String>,
7488            {
7489                use std::iter::Iterator;
7490                self.entry_groups = v.into_iter().map(|i| i.into()).collect();
7491                self
7492            }
7493
7494            /// Sets the value of [entry_types][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_types].
7495            pub fn set_entry_types<T, V>(mut self, v: T) -> Self
7496            where
7497                T: std::iter::IntoIterator<Item = V>,
7498                V: std::convert::Into<std::string::String>,
7499            {
7500                use std::iter::Iterator;
7501                self.entry_types = v.into_iter().map(|i| i.into()).collect();
7502                self
7503            }
7504
7505            /// Sets the value of [aspect_types][crate::model::metadata_job::import_job_spec::ImportJobScope::aspect_types].
7506            pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
7507            where
7508                T: std::iter::IntoIterator<Item = V>,
7509                V: std::convert::Into<std::string::String>,
7510            {
7511                use std::iter::Iterator;
7512                self.aspect_types = v.into_iter().map(|i| i.into()).collect();
7513                self
7514            }
7515
7516            /// Sets the value of [glossaries][crate::model::metadata_job::import_job_spec::ImportJobScope::glossaries].
7517            pub fn set_glossaries<T, V>(mut self, v: T) -> Self
7518            where
7519                T: std::iter::IntoIterator<Item = V>,
7520                V: std::convert::Into<std::string::String>,
7521            {
7522                use std::iter::Iterator;
7523                self.glossaries = v.into_iter().map(|i| i.into()).collect();
7524                self
7525            }
7526
7527            /// Sets the value of [entry_link_types][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_link_types].
7528            pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
7529            where
7530                T: std::iter::IntoIterator<Item = V>,
7531                V: std::convert::Into<std::string::String>,
7532            {
7533                use std::iter::Iterator;
7534                self.entry_link_types = v.into_iter().map(|i| i.into()).collect();
7535                self
7536            }
7537
7538            /// Sets the value of [referenced_entry_scopes][crate::model::metadata_job::import_job_spec::ImportJobScope::referenced_entry_scopes].
7539            pub fn set_referenced_entry_scopes<T, V>(mut self, v: T) -> Self
7540            where
7541                T: std::iter::IntoIterator<Item = V>,
7542                V: std::convert::Into<std::string::String>,
7543            {
7544                use std::iter::Iterator;
7545                self.referenced_entry_scopes = v.into_iter().map(|i| i.into()).collect();
7546                self
7547            }
7548        }
7549
7550        impl wkt::message::Message for ImportJobScope {
7551            fn typename() -> &'static str {
7552                "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope"
7553            }
7554        }
7555
7556        /// Specifies how the entries and aspects in a metadata import job are
7557        /// updated. For more information, see [Sync
7558        /// mode](https://cloud.google.com/dataplex/docs/import-metadata#sync-mode).
7559        ///
7560        /// # Working with unknown values
7561        ///
7562        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7563        /// additional enum variants at any time. Adding new variants is not considered
7564        /// a breaking change. Applications should write their code in anticipation of:
7565        ///
7566        /// - New values appearing in future releases of the client library, **and**
7567        /// - New values received dynamically, without application changes.
7568        ///
7569        /// Please consult the [Working with enums] section in the user guide for some
7570        /// guidelines.
7571        ///
7572        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7573        #[derive(Clone, Debug, PartialEq)]
7574        #[non_exhaustive]
7575        pub enum SyncMode {
7576            /// Sync mode unspecified.
7577            Unspecified,
7578            /// All resources in the job's scope are modified. If a resource exists in
7579            /// Dataplex Universal Catalog but isn't included in the metadata import
7580            /// file, the resource is deleted when you run the metadata job. Use this
7581            /// mode to perform a full sync of the set of entries in the job scope.
7582            ///
7583            /// This sync mode is supported for entries.
7584            Full,
7585            /// Only the resources that are explicitly included in the
7586            /// metadata import file are modified. Use this mode to modify a subset of
7587            /// resources while leaving unreferenced resources unchanged.
7588            ///
7589            /// This sync mode is supported for aspects.
7590            Incremental,
7591            /// If entry sync mode is `NONE`, then aspects are modified according
7592            /// to the aspect sync mode. Other metadata that belongs to entries in the
7593            /// job's scope isn't modified.
7594            ///
7595            /// This sync mode is supported for entries.
7596            None,
7597            /// If set, the enum was initialized with an unknown value.
7598            ///
7599            /// Applications can examine the value using [SyncMode::value] or
7600            /// [SyncMode::name].
7601            UnknownValue(sync_mode::UnknownValue),
7602        }
7603
7604        #[doc(hidden)]
7605        pub mod sync_mode {
7606            #[allow(unused_imports)]
7607            use super::*;
7608            #[derive(Clone, Debug, PartialEq)]
7609            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7610        }
7611
7612        impl SyncMode {
7613            /// Gets the enum value.
7614            ///
7615            /// Returns `None` if the enum contains an unknown value deserialized from
7616            /// the string representation of enums.
7617            pub fn value(&self) -> std::option::Option<i32> {
7618                match self {
7619                    Self::Unspecified => std::option::Option::Some(0),
7620                    Self::Full => std::option::Option::Some(1),
7621                    Self::Incremental => std::option::Option::Some(2),
7622                    Self::None => std::option::Option::Some(3),
7623                    Self::UnknownValue(u) => u.0.value(),
7624                }
7625            }
7626
7627            /// Gets the enum value as a string.
7628            ///
7629            /// Returns `None` if the enum contains an unknown value deserialized from
7630            /// the integer representation of enums.
7631            pub fn name(&self) -> std::option::Option<&str> {
7632                match self {
7633                    Self::Unspecified => std::option::Option::Some("SYNC_MODE_UNSPECIFIED"),
7634                    Self::Full => std::option::Option::Some("FULL"),
7635                    Self::Incremental => std::option::Option::Some("INCREMENTAL"),
7636                    Self::None => std::option::Option::Some("NONE"),
7637                    Self::UnknownValue(u) => u.0.name(),
7638                }
7639            }
7640        }
7641
7642        impl std::default::Default for SyncMode {
7643            fn default() -> Self {
7644                use std::convert::From;
7645                Self::from(0)
7646            }
7647        }
7648
7649        impl std::fmt::Display for SyncMode {
7650            fn fmt(
7651                &self,
7652                f: &mut std::fmt::Formatter<'_>,
7653            ) -> std::result::Result<(), std::fmt::Error> {
7654                wkt::internal::display_enum(f, self.name(), self.value())
7655            }
7656        }
7657
7658        impl std::convert::From<i32> for SyncMode {
7659            fn from(value: i32) -> Self {
7660                match value {
7661                    0 => Self::Unspecified,
7662                    1 => Self::Full,
7663                    2 => Self::Incremental,
7664                    3 => Self::None,
7665                    _ => Self::UnknownValue(sync_mode::UnknownValue(
7666                        wkt::internal::UnknownEnumValue::Integer(value),
7667                    )),
7668                }
7669            }
7670        }
7671
7672        impl std::convert::From<&str> for SyncMode {
7673            fn from(value: &str) -> Self {
7674                use std::string::ToString;
7675                match value {
7676                    "SYNC_MODE_UNSPECIFIED" => Self::Unspecified,
7677                    "FULL" => Self::Full,
7678                    "INCREMENTAL" => Self::Incremental,
7679                    "NONE" => Self::None,
7680                    _ => Self::UnknownValue(sync_mode::UnknownValue(
7681                        wkt::internal::UnknownEnumValue::String(value.to_string()),
7682                    )),
7683                }
7684            }
7685        }
7686
7687        impl serde::ser::Serialize for SyncMode {
7688            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7689            where
7690                S: serde::Serializer,
7691            {
7692                match self {
7693                    Self::Unspecified => serializer.serialize_i32(0),
7694                    Self::Full => serializer.serialize_i32(1),
7695                    Self::Incremental => serializer.serialize_i32(2),
7696                    Self::None => serializer.serialize_i32(3),
7697                    Self::UnknownValue(u) => u.0.serialize(serializer),
7698                }
7699            }
7700        }
7701
7702        impl<'de> serde::de::Deserialize<'de> for SyncMode {
7703            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7704            where
7705                D: serde::Deserializer<'de>,
7706            {
7707                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SyncMode>::new(
7708                    ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode",
7709                ))
7710            }
7711        }
7712
7713        /// The level of logs to write to Cloud Logging for this job.
7714        ///
7715        /// # Working with unknown values
7716        ///
7717        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7718        /// additional enum variants at any time. Adding new variants is not considered
7719        /// a breaking change. Applications should write their code in anticipation of:
7720        ///
7721        /// - New values appearing in future releases of the client library, **and**
7722        /// - New values received dynamically, without application changes.
7723        ///
7724        /// Please consult the [Working with enums] section in the user guide for some
7725        /// guidelines.
7726        ///
7727        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7728        #[derive(Clone, Debug, PartialEq)]
7729        #[non_exhaustive]
7730        pub enum LogLevel {
7731            /// Log level unspecified.
7732            Unspecified,
7733            /// Debug-level logging. Captures detailed logs for each import item. Use
7734            /// debug-level logging to troubleshoot issues with specific import items.
7735            /// For example, use debug-level logging to identify resources that are
7736            /// missing from the job scope, entries or aspects that don't conform to
7737            /// the associated entry type or aspect type, or other misconfigurations
7738            /// with the metadata import file.
7739            ///
7740            /// Depending on the size of your metadata job and the number of logs that
7741            /// are generated, debug-level logging might incur
7742            /// [additional costs](https://cloud.google.com/stackdriver/pricing).
7743            Debug,
7744            /// Info-level logging. Captures logs at the overall job level. Includes
7745            /// aggregate logs about import items, but doesn't specify which import
7746            /// item has an error.
7747            Info,
7748            /// If set, the enum was initialized with an unknown value.
7749            ///
7750            /// Applications can examine the value using [LogLevel::value] or
7751            /// [LogLevel::name].
7752            UnknownValue(log_level::UnknownValue),
7753        }
7754
7755        #[doc(hidden)]
7756        pub mod log_level {
7757            #[allow(unused_imports)]
7758            use super::*;
7759            #[derive(Clone, Debug, PartialEq)]
7760            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7761        }
7762
7763        impl LogLevel {
7764            /// Gets the enum value.
7765            ///
7766            /// Returns `None` if the enum contains an unknown value deserialized from
7767            /// the string representation of enums.
7768            pub fn value(&self) -> std::option::Option<i32> {
7769                match self {
7770                    Self::Unspecified => std::option::Option::Some(0),
7771                    Self::Debug => std::option::Option::Some(1),
7772                    Self::Info => std::option::Option::Some(2),
7773                    Self::UnknownValue(u) => u.0.value(),
7774                }
7775            }
7776
7777            /// Gets the enum value as a string.
7778            ///
7779            /// Returns `None` if the enum contains an unknown value deserialized from
7780            /// the integer representation of enums.
7781            pub fn name(&self) -> std::option::Option<&str> {
7782                match self {
7783                    Self::Unspecified => std::option::Option::Some("LOG_LEVEL_UNSPECIFIED"),
7784                    Self::Debug => std::option::Option::Some("DEBUG"),
7785                    Self::Info => std::option::Option::Some("INFO"),
7786                    Self::UnknownValue(u) => u.0.name(),
7787                }
7788            }
7789        }
7790
7791        impl std::default::Default for LogLevel {
7792            fn default() -> Self {
7793                use std::convert::From;
7794                Self::from(0)
7795            }
7796        }
7797
7798        impl std::fmt::Display for LogLevel {
7799            fn fmt(
7800                &self,
7801                f: &mut std::fmt::Formatter<'_>,
7802            ) -> std::result::Result<(), std::fmt::Error> {
7803                wkt::internal::display_enum(f, self.name(), self.value())
7804            }
7805        }
7806
7807        impl std::convert::From<i32> for LogLevel {
7808            fn from(value: i32) -> Self {
7809                match value {
7810                    0 => Self::Unspecified,
7811                    1 => Self::Debug,
7812                    2 => Self::Info,
7813                    _ => Self::UnknownValue(log_level::UnknownValue(
7814                        wkt::internal::UnknownEnumValue::Integer(value),
7815                    )),
7816                }
7817            }
7818        }
7819
7820        impl std::convert::From<&str> for LogLevel {
7821            fn from(value: &str) -> Self {
7822                use std::string::ToString;
7823                match value {
7824                    "LOG_LEVEL_UNSPECIFIED" => Self::Unspecified,
7825                    "DEBUG" => Self::Debug,
7826                    "INFO" => Self::Info,
7827                    _ => Self::UnknownValue(log_level::UnknownValue(
7828                        wkt::internal::UnknownEnumValue::String(value.to_string()),
7829                    )),
7830                }
7831            }
7832        }
7833
7834        impl serde::ser::Serialize for LogLevel {
7835            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7836            where
7837                S: serde::Serializer,
7838            {
7839                match self {
7840                    Self::Unspecified => serializer.serialize_i32(0),
7841                    Self::Debug => serializer.serialize_i32(1),
7842                    Self::Info => serializer.serialize_i32(2),
7843                    Self::UnknownValue(u) => u.0.serialize(serializer),
7844                }
7845            }
7846        }
7847
7848        impl<'de> serde::de::Deserialize<'de> for LogLevel {
7849            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7850            where
7851                D: serde::Deserializer<'de>,
7852            {
7853                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LogLevel>::new(
7854                    ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel",
7855                ))
7856            }
7857        }
7858    }
7859
7860    /// Job specification for a metadata export job.
7861    #[derive(Clone, Default, PartialEq)]
7862    #[non_exhaustive]
7863    pub struct ExportJobSpec {
7864        /// Required. The scope of the export job.
7865        pub scope: std::option::Option<crate::model::metadata_job::export_job_spec::ExportJobScope>,
7866
7867        /// Required. The root path of the Cloud Storage bucket to export the
7868        /// metadata to, in the format `gs://{bucket}/`. You can optionally specify a
7869        /// custom prefix after the bucket name, in the format
7870        /// `gs://{bucket}/{prefix}/`. The maximum length of the custom prefix is 128
7871        /// characters. Dataplex Universal Catalog constructs the object path for the
7872        /// exported files by using the bucket name and prefix that you provide,
7873        /// followed by a system-generated path.
7874        ///
7875        /// The bucket must be in the same VPC Service Controls perimeter as the job.
7876        pub output_path: std::string::String,
7877
7878        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7879    }
7880
7881    impl ExportJobSpec {
7882        pub fn new() -> Self {
7883            std::default::Default::default()
7884        }
7885
7886        /// Sets the value of [scope][crate::model::metadata_job::ExportJobSpec::scope].
7887        pub fn set_scope<T>(mut self, v: T) -> Self
7888        where
7889            T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
7890        {
7891            self.scope = std::option::Option::Some(v.into());
7892            self
7893        }
7894
7895        /// Sets or clears the value of [scope][crate::model::metadata_job::ExportJobSpec::scope].
7896        pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
7897        where
7898            T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
7899        {
7900            self.scope = v.map(|x| x.into());
7901            self
7902        }
7903
7904        /// Sets the value of [output_path][crate::model::metadata_job::ExportJobSpec::output_path].
7905        pub fn set_output_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7906            self.output_path = v.into();
7907            self
7908        }
7909    }
7910
7911    impl wkt::message::Message for ExportJobSpec {
7912        fn typename() -> &'static str {
7913            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec"
7914        }
7915    }
7916
7917    /// Defines additional types related to [ExportJobSpec].
7918    pub mod export_job_spec {
7919        #[allow(unused_imports)]
7920        use super::*;
7921
7922        /// The scope of the export job.
7923        #[derive(Clone, Default, PartialEq)]
7924        #[non_exhaustive]
7925        pub struct ExportJobScope {
7926            /// Whether the metadata export job is an organization-level export job.
7927            ///
7928            /// - If `true`, the job exports the entries from the same organization and
7929            ///   VPC Service Controls perimeter as the job. The project that the job
7930            ///   belongs to determines the VPC Service Controls perimeter. If you set
7931            ///   the job scope to be at the organization level, then don't provide a
7932            ///   list of projects or entry groups.
7933            /// - If `false`, you must specify a list of projects or a list of entry
7934            ///   groups whose entries you want to export.
7935            ///
7936            /// The default is `false`.
7937            pub organization_level: bool,
7938
7939            /// The projects whose metadata you want to export, in the format
7940            /// `projects/{project_id_or_number}`. Only the entries from
7941            /// the specified projects are exported.
7942            ///
7943            /// The projects must be in the same organization and VPC Service Controls
7944            /// perimeter as the job.
7945            ///
7946            /// If you set the job scope to be a list of projects, then set the
7947            /// organization-level export flag to false and don't provide a list of
7948            /// entry groups.
7949            pub projects: std::vec::Vec<std::string::String>,
7950
7951            /// The entry groups whose metadata you want to export, in the format
7952            /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
7953            /// Only the entries in the specified entry groups are exported.
7954            ///
7955            /// The entry groups must be in the same location and the same VPC Service
7956            /// Controls perimeter as the job.
7957            ///
7958            /// If you set the job scope to be a list of entry groups, then set the
7959            /// organization-level export flag to false and don't provide a list of
7960            /// projects.
7961            pub entry_groups: std::vec::Vec<std::string::String>,
7962
7963            /// The entry types that are in scope for the export job, specified as
7964            /// relative resource names in the format
7965            /// `projects/{project_id_or_number}/locations/{location}/entryTypes/{entry_type_id}`.
7966            /// Only entries that belong to the specified entry types are affected by
7967            /// the job.
7968            pub entry_types: std::vec::Vec<std::string::String>,
7969
7970            /// The aspect types that are in scope for the export job, specified as
7971            /// relative resource names in the format
7972            /// `projects/{project_id_or_number}/locations/{location}/aspectTypes/{aspect_type_id}`.
7973            /// Only aspects that belong to the specified aspect types are affected by
7974            /// the job.
7975            pub aspect_types: std::vec::Vec<std::string::String>,
7976
7977            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7978        }
7979
7980        impl ExportJobScope {
7981            pub fn new() -> Self {
7982                std::default::Default::default()
7983            }
7984
7985            /// Sets the value of [organization_level][crate::model::metadata_job::export_job_spec::ExportJobScope::organization_level].
7986            pub fn set_organization_level<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7987                self.organization_level = v.into();
7988                self
7989            }
7990
7991            /// Sets the value of [projects][crate::model::metadata_job::export_job_spec::ExportJobScope::projects].
7992            pub fn set_projects<T, V>(mut self, v: T) -> Self
7993            where
7994                T: std::iter::IntoIterator<Item = V>,
7995                V: std::convert::Into<std::string::String>,
7996            {
7997                use std::iter::Iterator;
7998                self.projects = v.into_iter().map(|i| i.into()).collect();
7999                self
8000            }
8001
8002            /// Sets the value of [entry_groups][crate::model::metadata_job::export_job_spec::ExportJobScope::entry_groups].
8003            pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
8004            where
8005                T: std::iter::IntoIterator<Item = V>,
8006                V: std::convert::Into<std::string::String>,
8007            {
8008                use std::iter::Iterator;
8009                self.entry_groups = v.into_iter().map(|i| i.into()).collect();
8010                self
8011            }
8012
8013            /// Sets the value of [entry_types][crate::model::metadata_job::export_job_spec::ExportJobScope::entry_types].
8014            pub fn set_entry_types<T, V>(mut self, v: T) -> Self
8015            where
8016                T: std::iter::IntoIterator<Item = V>,
8017                V: std::convert::Into<std::string::String>,
8018            {
8019                use std::iter::Iterator;
8020                self.entry_types = v.into_iter().map(|i| i.into()).collect();
8021                self
8022            }
8023
8024            /// Sets the value of [aspect_types][crate::model::metadata_job::export_job_spec::ExportJobScope::aspect_types].
8025            pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
8026            where
8027                T: std::iter::IntoIterator<Item = V>,
8028                V: std::convert::Into<std::string::String>,
8029            {
8030                use std::iter::Iterator;
8031                self.aspect_types = v.into_iter().map(|i| i.into()).collect();
8032                self
8033            }
8034        }
8035
8036        impl wkt::message::Message for ExportJobScope {
8037            fn typename() -> &'static str {
8038                "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScope"
8039            }
8040        }
8041    }
8042
8043    /// Metadata job status.
8044    #[derive(Clone, Default, PartialEq)]
8045    #[non_exhaustive]
8046    pub struct Status {
8047        /// Output only. State of the metadata job.
8048        pub state: crate::model::metadata_job::status::State,
8049
8050        /// Output only. Message relating to the progression of a metadata job.
8051        pub message: std::string::String,
8052
8053        /// Output only. Progress tracking.
8054        pub completion_percent: i32,
8055
8056        /// Output only. The time when the status was updated.
8057        pub update_time: std::option::Option<wkt::Timestamp>,
8058
8059        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8060    }
8061
8062    impl Status {
8063        pub fn new() -> Self {
8064            std::default::Default::default()
8065        }
8066
8067        /// Sets the value of [state][crate::model::metadata_job::Status::state].
8068        pub fn set_state<T: std::convert::Into<crate::model::metadata_job::status::State>>(
8069            mut self,
8070            v: T,
8071        ) -> Self {
8072            self.state = v.into();
8073            self
8074        }
8075
8076        /// Sets the value of [message][crate::model::metadata_job::Status::message].
8077        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8078            self.message = v.into();
8079            self
8080        }
8081
8082        /// Sets the value of [completion_percent][crate::model::metadata_job::Status::completion_percent].
8083        pub fn set_completion_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8084            self.completion_percent = v.into();
8085            self
8086        }
8087
8088        /// Sets the value of [update_time][crate::model::metadata_job::Status::update_time].
8089        pub fn set_update_time<T>(mut self, v: T) -> Self
8090        where
8091            T: std::convert::Into<wkt::Timestamp>,
8092        {
8093            self.update_time = std::option::Option::Some(v.into());
8094            self
8095        }
8096
8097        /// Sets or clears the value of [update_time][crate::model::metadata_job::Status::update_time].
8098        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8099        where
8100            T: std::convert::Into<wkt::Timestamp>,
8101        {
8102            self.update_time = v.map(|x| x.into());
8103            self
8104        }
8105    }
8106
8107    impl wkt::message::Message for Status {
8108        fn typename() -> &'static str {
8109            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.Status"
8110        }
8111    }
8112
8113    /// Defines additional types related to [Status].
8114    pub mod status {
8115        #[allow(unused_imports)]
8116        use super::*;
8117
8118        /// State of a metadata job.
8119        ///
8120        /// # Working with unknown values
8121        ///
8122        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8123        /// additional enum variants at any time. Adding new variants is not considered
8124        /// a breaking change. Applications should write their code in anticipation of:
8125        ///
8126        /// - New values appearing in future releases of the client library, **and**
8127        /// - New values received dynamically, without application changes.
8128        ///
8129        /// Please consult the [Working with enums] section in the user guide for some
8130        /// guidelines.
8131        ///
8132        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8133        #[derive(Clone, Debug, PartialEq)]
8134        #[non_exhaustive]
8135        pub enum State {
8136            /// State unspecified.
8137            Unspecified,
8138            /// The job is queued.
8139            Queued,
8140            /// The job is running.
8141            Running,
8142            /// The job is being canceled.
8143            Canceling,
8144            /// The job is canceled.
8145            Canceled,
8146            /// The job succeeded.
8147            Succeeded,
8148            /// The job failed.
8149            Failed,
8150            /// The job completed with some errors.
8151            SucceededWithErrors,
8152            /// If set, the enum was initialized with an unknown value.
8153            ///
8154            /// Applications can examine the value using [State::value] or
8155            /// [State::name].
8156            UnknownValue(state::UnknownValue),
8157        }
8158
8159        #[doc(hidden)]
8160        pub mod state {
8161            #[allow(unused_imports)]
8162            use super::*;
8163            #[derive(Clone, Debug, PartialEq)]
8164            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8165        }
8166
8167        impl State {
8168            /// Gets the enum value.
8169            ///
8170            /// Returns `None` if the enum contains an unknown value deserialized from
8171            /// the string representation of enums.
8172            pub fn value(&self) -> std::option::Option<i32> {
8173                match self {
8174                    Self::Unspecified => std::option::Option::Some(0),
8175                    Self::Queued => std::option::Option::Some(1),
8176                    Self::Running => std::option::Option::Some(2),
8177                    Self::Canceling => std::option::Option::Some(3),
8178                    Self::Canceled => std::option::Option::Some(4),
8179                    Self::Succeeded => std::option::Option::Some(5),
8180                    Self::Failed => std::option::Option::Some(6),
8181                    Self::SucceededWithErrors => std::option::Option::Some(7),
8182                    Self::UnknownValue(u) => u.0.value(),
8183                }
8184            }
8185
8186            /// Gets the enum value as a string.
8187            ///
8188            /// Returns `None` if the enum contains an unknown value deserialized from
8189            /// the integer representation of enums.
8190            pub fn name(&self) -> std::option::Option<&str> {
8191                match self {
8192                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8193                    Self::Queued => std::option::Option::Some("QUEUED"),
8194                    Self::Running => std::option::Option::Some("RUNNING"),
8195                    Self::Canceling => std::option::Option::Some("CANCELING"),
8196                    Self::Canceled => std::option::Option::Some("CANCELED"),
8197                    Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
8198                    Self::Failed => std::option::Option::Some("FAILED"),
8199                    Self::SucceededWithErrors => std::option::Option::Some("SUCCEEDED_WITH_ERRORS"),
8200                    Self::UnknownValue(u) => u.0.name(),
8201                }
8202            }
8203        }
8204
8205        impl std::default::Default for State {
8206            fn default() -> Self {
8207                use std::convert::From;
8208                Self::from(0)
8209            }
8210        }
8211
8212        impl std::fmt::Display for State {
8213            fn fmt(
8214                &self,
8215                f: &mut std::fmt::Formatter<'_>,
8216            ) -> std::result::Result<(), std::fmt::Error> {
8217                wkt::internal::display_enum(f, self.name(), self.value())
8218            }
8219        }
8220
8221        impl std::convert::From<i32> for State {
8222            fn from(value: i32) -> Self {
8223                match value {
8224                    0 => Self::Unspecified,
8225                    1 => Self::Queued,
8226                    2 => Self::Running,
8227                    3 => Self::Canceling,
8228                    4 => Self::Canceled,
8229                    5 => Self::Succeeded,
8230                    6 => Self::Failed,
8231                    7 => Self::SucceededWithErrors,
8232                    _ => Self::UnknownValue(state::UnknownValue(
8233                        wkt::internal::UnknownEnumValue::Integer(value),
8234                    )),
8235                }
8236            }
8237        }
8238
8239        impl std::convert::From<&str> for State {
8240            fn from(value: &str) -> Self {
8241                use std::string::ToString;
8242                match value {
8243                    "STATE_UNSPECIFIED" => Self::Unspecified,
8244                    "QUEUED" => Self::Queued,
8245                    "RUNNING" => Self::Running,
8246                    "CANCELING" => Self::Canceling,
8247                    "CANCELED" => Self::Canceled,
8248                    "SUCCEEDED" => Self::Succeeded,
8249                    "FAILED" => Self::Failed,
8250                    "SUCCEEDED_WITH_ERRORS" => Self::SucceededWithErrors,
8251                    _ => Self::UnknownValue(state::UnknownValue(
8252                        wkt::internal::UnknownEnumValue::String(value.to_string()),
8253                    )),
8254                }
8255            }
8256        }
8257
8258        impl serde::ser::Serialize for State {
8259            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8260            where
8261                S: serde::Serializer,
8262            {
8263                match self {
8264                    Self::Unspecified => serializer.serialize_i32(0),
8265                    Self::Queued => serializer.serialize_i32(1),
8266                    Self::Running => serializer.serialize_i32(2),
8267                    Self::Canceling => serializer.serialize_i32(3),
8268                    Self::Canceled => serializer.serialize_i32(4),
8269                    Self::Succeeded => serializer.serialize_i32(5),
8270                    Self::Failed => serializer.serialize_i32(6),
8271                    Self::SucceededWithErrors => serializer.serialize_i32(7),
8272                    Self::UnknownValue(u) => u.0.serialize(serializer),
8273                }
8274            }
8275        }
8276
8277        impl<'de> serde::de::Deserialize<'de> for State {
8278            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8279            where
8280                D: serde::Deserializer<'de>,
8281            {
8282                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8283                    ".google.cloud.dataplex.v1.MetadataJob.Status.State",
8284                ))
8285            }
8286        }
8287    }
8288
8289    /// Metadata job type.
8290    ///
8291    /// # Working with unknown values
8292    ///
8293    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8294    /// additional enum variants at any time. Adding new variants is not considered
8295    /// a breaking change. Applications should write their code in anticipation of:
8296    ///
8297    /// - New values appearing in future releases of the client library, **and**
8298    /// - New values received dynamically, without application changes.
8299    ///
8300    /// Please consult the [Working with enums] section in the user guide for some
8301    /// guidelines.
8302    ///
8303    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8304    #[derive(Clone, Debug, PartialEq)]
8305    #[non_exhaustive]
8306    pub enum Type {
8307        /// Unspecified.
8308        Unspecified,
8309        /// Import job.
8310        Import,
8311        /// Export job.
8312        Export,
8313        /// If set, the enum was initialized with an unknown value.
8314        ///
8315        /// Applications can examine the value using [Type::value] or
8316        /// [Type::name].
8317        UnknownValue(r#type::UnknownValue),
8318    }
8319
8320    #[doc(hidden)]
8321    pub mod r#type {
8322        #[allow(unused_imports)]
8323        use super::*;
8324        #[derive(Clone, Debug, PartialEq)]
8325        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8326    }
8327
8328    impl Type {
8329        /// Gets the enum value.
8330        ///
8331        /// Returns `None` if the enum contains an unknown value deserialized from
8332        /// the string representation of enums.
8333        pub fn value(&self) -> std::option::Option<i32> {
8334            match self {
8335                Self::Unspecified => std::option::Option::Some(0),
8336                Self::Import => std::option::Option::Some(1),
8337                Self::Export => std::option::Option::Some(2),
8338                Self::UnknownValue(u) => u.0.value(),
8339            }
8340        }
8341
8342        /// Gets the enum value as a string.
8343        ///
8344        /// Returns `None` if the enum contains an unknown value deserialized from
8345        /// the integer representation of enums.
8346        pub fn name(&self) -> std::option::Option<&str> {
8347            match self {
8348                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
8349                Self::Import => std::option::Option::Some("IMPORT"),
8350                Self::Export => std::option::Option::Some("EXPORT"),
8351                Self::UnknownValue(u) => u.0.name(),
8352            }
8353        }
8354    }
8355
8356    impl std::default::Default for Type {
8357        fn default() -> Self {
8358            use std::convert::From;
8359            Self::from(0)
8360        }
8361    }
8362
8363    impl std::fmt::Display for Type {
8364        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8365            wkt::internal::display_enum(f, self.name(), self.value())
8366        }
8367    }
8368
8369    impl std::convert::From<i32> for Type {
8370        fn from(value: i32) -> Self {
8371            match value {
8372                0 => Self::Unspecified,
8373                1 => Self::Import,
8374                2 => Self::Export,
8375                _ => Self::UnknownValue(r#type::UnknownValue(
8376                    wkt::internal::UnknownEnumValue::Integer(value),
8377                )),
8378            }
8379        }
8380    }
8381
8382    impl std::convert::From<&str> for Type {
8383        fn from(value: &str) -> Self {
8384            use std::string::ToString;
8385            match value {
8386                "TYPE_UNSPECIFIED" => Self::Unspecified,
8387                "IMPORT" => Self::Import,
8388                "EXPORT" => Self::Export,
8389                _ => Self::UnknownValue(r#type::UnknownValue(
8390                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8391                )),
8392            }
8393        }
8394    }
8395
8396    impl serde::ser::Serialize for Type {
8397        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8398        where
8399            S: serde::Serializer,
8400        {
8401            match self {
8402                Self::Unspecified => serializer.serialize_i32(0),
8403                Self::Import => serializer.serialize_i32(1),
8404                Self::Export => serializer.serialize_i32(2),
8405                Self::UnknownValue(u) => u.0.serialize(serializer),
8406            }
8407        }
8408    }
8409
8410    impl<'de> serde::de::Deserialize<'de> for Type {
8411        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8412        where
8413            D: serde::Deserializer<'de>,
8414        {
8415            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
8416                ".google.cloud.dataplex.v1.MetadataJob.Type",
8417            ))
8418        }
8419    }
8420
8421    #[derive(Clone, Debug, PartialEq)]
8422    #[non_exhaustive]
8423    pub enum Spec {
8424        /// Import job specification.
8425        ImportSpec(std::boxed::Box<crate::model::metadata_job::ImportJobSpec>),
8426        /// Export job specification.
8427        ExportSpec(std::boxed::Box<crate::model::metadata_job::ExportJobSpec>),
8428    }
8429
8430    #[derive(Clone, Debug, PartialEq)]
8431    #[non_exhaustive]
8432    pub enum Result {
8433        /// Output only. Import job result.
8434        ImportResult(std::boxed::Box<crate::model::metadata_job::ImportJobResult>),
8435        /// Output only. Export job result.
8436        ExportResult(std::boxed::Box<crate::model::metadata_job::ExportJobResult>),
8437    }
8438}
8439
8440/// EntryLink represents a link between two Entries.
8441#[derive(Clone, Default, PartialEq)]
8442#[non_exhaustive]
8443pub struct EntryLink {
8444    /// Output only. Immutable. Identifier. The relative resource name of the Entry
8445    /// Link, of the form:
8446    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`
8447    pub name: std::string::String,
8448
8449    /// Required. Immutable. Relative resource name of the Entry Link Type used to
8450    /// create this Entry Link. For example:
8451    ///
8452    /// - Entry link between synonym terms in a glossary:
8453    ///   `projects/dataplex-types/locations/global/entryLinkTypes/synonym`
8454    /// - Entry link between related terms in a glossary:
8455    ///   `projects/dataplex-types/locations/global/entryLinkTypes/related`
8456    /// - Entry link between glossary terms and data assets:
8457    ///   `projects/dataplex-types/locations/global/entryLinkTypes/definition`
8458    pub entry_link_type: std::string::String,
8459
8460    /// Output only. The time when the Entry Link was created.
8461    pub create_time: std::option::Option<wkt::Timestamp>,
8462
8463    /// Output only. The time when the Entry Link was last updated.
8464    pub update_time: std::option::Option<wkt::Timestamp>,
8465
8466    /// Required. Specifies the Entries referenced in the Entry Link. There should
8467    /// be exactly two entry references.
8468    pub entry_references: std::vec::Vec<crate::model::entry_link::EntryReference>,
8469
8470    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8471}
8472
8473impl EntryLink {
8474    pub fn new() -> Self {
8475        std::default::Default::default()
8476    }
8477
8478    /// Sets the value of [name][crate::model::EntryLink::name].
8479    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8480        self.name = v.into();
8481        self
8482    }
8483
8484    /// Sets the value of [entry_link_type][crate::model::EntryLink::entry_link_type].
8485    pub fn set_entry_link_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8486        self.entry_link_type = v.into();
8487        self
8488    }
8489
8490    /// Sets the value of [create_time][crate::model::EntryLink::create_time].
8491    pub fn set_create_time<T>(mut self, v: T) -> Self
8492    where
8493        T: std::convert::Into<wkt::Timestamp>,
8494    {
8495        self.create_time = std::option::Option::Some(v.into());
8496        self
8497    }
8498
8499    /// Sets or clears the value of [create_time][crate::model::EntryLink::create_time].
8500    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8501    where
8502        T: std::convert::Into<wkt::Timestamp>,
8503    {
8504        self.create_time = v.map(|x| x.into());
8505        self
8506    }
8507
8508    /// Sets the value of [update_time][crate::model::EntryLink::update_time].
8509    pub fn set_update_time<T>(mut self, v: T) -> Self
8510    where
8511        T: std::convert::Into<wkt::Timestamp>,
8512    {
8513        self.update_time = std::option::Option::Some(v.into());
8514        self
8515    }
8516
8517    /// Sets or clears the value of [update_time][crate::model::EntryLink::update_time].
8518    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8519    where
8520        T: std::convert::Into<wkt::Timestamp>,
8521    {
8522        self.update_time = v.map(|x| x.into());
8523        self
8524    }
8525
8526    /// Sets the value of [entry_references][crate::model::EntryLink::entry_references].
8527    pub fn set_entry_references<T, V>(mut self, v: T) -> Self
8528    where
8529        T: std::iter::IntoIterator<Item = V>,
8530        V: std::convert::Into<crate::model::entry_link::EntryReference>,
8531    {
8532        use std::iter::Iterator;
8533        self.entry_references = v.into_iter().map(|i| i.into()).collect();
8534        self
8535    }
8536}
8537
8538impl wkt::message::Message for EntryLink {
8539    fn typename() -> &'static str {
8540        "type.googleapis.com/google.cloud.dataplex.v1.EntryLink"
8541    }
8542}
8543
8544/// Defines additional types related to [EntryLink].
8545pub mod entry_link {
8546    #[allow(unused_imports)]
8547    use super::*;
8548
8549    /// Reference to the Entry that is linked through the Entry Link.
8550    #[derive(Clone, Default, PartialEq)]
8551    #[non_exhaustive]
8552    pub struct EntryReference {
8553        /// Required. Immutable. The relative resource name of the referenced Entry,
8554        /// of the form:
8555        /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
8556        pub name: std::string::String,
8557
8558        /// Immutable. The path in the Entry that is referenced in the Entry Link.
8559        /// Empty path denotes that the Entry itself is referenced in the Entry
8560        /// Link.
8561        pub path: std::string::String,
8562
8563        /// Required. Immutable. The reference type of the Entry.
8564        pub r#type: crate::model::entry_link::entry_reference::Type,
8565
8566        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8567    }
8568
8569    impl EntryReference {
8570        pub fn new() -> Self {
8571            std::default::Default::default()
8572        }
8573
8574        /// Sets the value of [name][crate::model::entry_link::EntryReference::name].
8575        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8576            self.name = v.into();
8577            self
8578        }
8579
8580        /// Sets the value of [path][crate::model::entry_link::EntryReference::path].
8581        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8582            self.path = v.into();
8583            self
8584        }
8585
8586        /// Sets the value of [r#type][crate::model::entry_link::EntryReference::type].
8587        pub fn set_type<T: std::convert::Into<crate::model::entry_link::entry_reference::Type>>(
8588            mut self,
8589            v: T,
8590        ) -> Self {
8591            self.r#type = v.into();
8592            self
8593        }
8594    }
8595
8596    impl wkt::message::Message for EntryReference {
8597        fn typename() -> &'static str {
8598            "type.googleapis.com/google.cloud.dataplex.v1.EntryLink.EntryReference"
8599        }
8600    }
8601
8602    /// Defines additional types related to [EntryReference].
8603    pub mod entry_reference {
8604        #[allow(unused_imports)]
8605        use super::*;
8606
8607        /// Reference type of the Entry.
8608        ///
8609        /// # Working with unknown values
8610        ///
8611        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8612        /// additional enum variants at any time. Adding new variants is not considered
8613        /// a breaking change. Applications should write their code in anticipation of:
8614        ///
8615        /// - New values appearing in future releases of the client library, **and**
8616        /// - New values received dynamically, without application changes.
8617        ///
8618        /// Please consult the [Working with enums] section in the user guide for some
8619        /// guidelines.
8620        ///
8621        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8622        #[derive(Clone, Debug, PartialEq)]
8623        #[non_exhaustive]
8624        pub enum Type {
8625            /// Unspecified reference type. Implies that the Entry is referenced
8626            /// in a non-directional Entry Link.
8627            Unspecified,
8628            /// The Entry is referenced as the source of the directional Entry Link.
8629            Source,
8630            /// The Entry is referenced as the target of the directional Entry Link.
8631            Target,
8632            /// If set, the enum was initialized with an unknown value.
8633            ///
8634            /// Applications can examine the value using [Type::value] or
8635            /// [Type::name].
8636            UnknownValue(r#type::UnknownValue),
8637        }
8638
8639        #[doc(hidden)]
8640        pub mod r#type {
8641            #[allow(unused_imports)]
8642            use super::*;
8643            #[derive(Clone, Debug, PartialEq)]
8644            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8645        }
8646
8647        impl Type {
8648            /// Gets the enum value.
8649            ///
8650            /// Returns `None` if the enum contains an unknown value deserialized from
8651            /// the string representation of enums.
8652            pub fn value(&self) -> std::option::Option<i32> {
8653                match self {
8654                    Self::Unspecified => std::option::Option::Some(0),
8655                    Self::Source => std::option::Option::Some(2),
8656                    Self::Target => std::option::Option::Some(3),
8657                    Self::UnknownValue(u) => u.0.value(),
8658                }
8659            }
8660
8661            /// Gets the enum value as a string.
8662            ///
8663            /// Returns `None` if the enum contains an unknown value deserialized from
8664            /// the integer representation of enums.
8665            pub fn name(&self) -> std::option::Option<&str> {
8666                match self {
8667                    Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
8668                    Self::Source => std::option::Option::Some("SOURCE"),
8669                    Self::Target => std::option::Option::Some("TARGET"),
8670                    Self::UnknownValue(u) => u.0.name(),
8671                }
8672            }
8673        }
8674
8675        impl std::default::Default for Type {
8676            fn default() -> Self {
8677                use std::convert::From;
8678                Self::from(0)
8679            }
8680        }
8681
8682        impl std::fmt::Display for Type {
8683            fn fmt(
8684                &self,
8685                f: &mut std::fmt::Formatter<'_>,
8686            ) -> std::result::Result<(), std::fmt::Error> {
8687                wkt::internal::display_enum(f, self.name(), self.value())
8688            }
8689        }
8690
8691        impl std::convert::From<i32> for Type {
8692            fn from(value: i32) -> Self {
8693                match value {
8694                    0 => Self::Unspecified,
8695                    2 => Self::Source,
8696                    3 => Self::Target,
8697                    _ => Self::UnknownValue(r#type::UnknownValue(
8698                        wkt::internal::UnknownEnumValue::Integer(value),
8699                    )),
8700                }
8701            }
8702        }
8703
8704        impl std::convert::From<&str> for Type {
8705            fn from(value: &str) -> Self {
8706                use std::string::ToString;
8707                match value {
8708                    "UNSPECIFIED" => Self::Unspecified,
8709                    "SOURCE" => Self::Source,
8710                    "TARGET" => Self::Target,
8711                    _ => Self::UnknownValue(r#type::UnknownValue(
8712                        wkt::internal::UnknownEnumValue::String(value.to_string()),
8713                    )),
8714                }
8715            }
8716        }
8717
8718        impl serde::ser::Serialize for Type {
8719            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8720            where
8721                S: serde::Serializer,
8722            {
8723                match self {
8724                    Self::Unspecified => serializer.serialize_i32(0),
8725                    Self::Source => serializer.serialize_i32(2),
8726                    Self::Target => serializer.serialize_i32(3),
8727                    Self::UnknownValue(u) => u.0.serialize(serializer),
8728                }
8729            }
8730        }
8731
8732        impl<'de> serde::de::Deserialize<'de> for Type {
8733            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8734            where
8735                D: serde::Deserializer<'de>,
8736            {
8737                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
8738                    ".google.cloud.dataplex.v1.EntryLink.EntryReference.Type",
8739                ))
8740            }
8741        }
8742    }
8743}
8744
8745/// Request message for CreateEntryLink.
8746#[derive(Clone, Default, PartialEq)]
8747#[non_exhaustive]
8748pub struct CreateEntryLinkRequest {
8749    /// Required. The resource name of the parent Entry Group:
8750    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
8751    pub parent: std::string::String,
8752
8753    /// Required. Entry Link identifier
8754    ///
8755    /// * Must contain only lowercase letters, numbers and hyphens.
8756    /// * Must start with a letter.
8757    /// * Must be between 1-63 characters.
8758    /// * Must end with a number or a letter.
8759    /// * Must be unique within the EntryGroup.
8760    pub entry_link_id: std::string::String,
8761
8762    /// Required. Entry Link resource.
8763    pub entry_link: std::option::Option<crate::model::EntryLink>,
8764
8765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8766}
8767
8768impl CreateEntryLinkRequest {
8769    pub fn new() -> Self {
8770        std::default::Default::default()
8771    }
8772
8773    /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
8774    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8775        self.parent = v.into();
8776        self
8777    }
8778
8779    /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
8780    pub fn set_entry_link_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8781        self.entry_link_id = v.into();
8782        self
8783    }
8784
8785    /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
8786    pub fn set_entry_link<T>(mut self, v: T) -> Self
8787    where
8788        T: std::convert::Into<crate::model::EntryLink>,
8789    {
8790        self.entry_link = std::option::Option::Some(v.into());
8791        self
8792    }
8793
8794    /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
8795    pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
8796    where
8797        T: std::convert::Into<crate::model::EntryLink>,
8798    {
8799        self.entry_link = v.map(|x| x.into());
8800        self
8801    }
8802}
8803
8804impl wkt::message::Message for CreateEntryLinkRequest {
8805    fn typename() -> &'static str {
8806        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryLinkRequest"
8807    }
8808}
8809
8810/// Request message for DeleteEntryLink.
8811#[derive(Clone, Default, PartialEq)]
8812#[non_exhaustive]
8813pub struct DeleteEntryLinkRequest {
8814    /// Required. The resource name of the Entry Link:
8815    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
8816    pub name: std::string::String,
8817
8818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8819}
8820
8821impl DeleteEntryLinkRequest {
8822    pub fn new() -> Self {
8823        std::default::Default::default()
8824    }
8825
8826    /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
8827    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8828        self.name = v.into();
8829        self
8830    }
8831}
8832
8833impl wkt::message::Message for DeleteEntryLinkRequest {
8834    fn typename() -> &'static str {
8835        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryLinkRequest"
8836    }
8837}
8838
8839/// Request message for GetEntryLink.
8840#[derive(Clone, Default, PartialEq)]
8841#[non_exhaustive]
8842pub struct GetEntryLinkRequest {
8843    /// Required. The resource name of the Entry Link:
8844    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
8845    pub name: std::string::String,
8846
8847    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8848}
8849
8850impl GetEntryLinkRequest {
8851    pub fn new() -> Self {
8852        std::default::Default::default()
8853    }
8854
8855    /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
8856    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8857        self.name = v.into();
8858        self
8859    }
8860}
8861
8862impl wkt::message::Message for GetEntryLinkRequest {
8863    fn typename() -> &'static str {
8864        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryLinkRequest"
8865    }
8866}
8867
8868/// A Resource designed to manage encryption configurations for customers to
8869/// support Customer Managed Encryption Keys (CMEK).
8870#[derive(Clone, Default, PartialEq)]
8871#[non_exhaustive]
8872pub struct EncryptionConfig {
8873    /// Identifier. The resource name of the EncryptionConfig.
8874    /// Format:
8875    /// organizations/{organization}/locations/{location}/encryptionConfigs/{encryption_config}
8876    /// Global location is not supported.
8877    pub name: std::string::String,
8878
8879    /// Optional. If a key is chosen, it means that the customer is using CMEK.
8880    /// If a key is not chosen, it means that the customer is using Google managed
8881    /// encryption.
8882    pub key: std::string::String,
8883
8884    /// Output only. The time when the Encryption configuration was created.
8885    pub create_time: std::option::Option<wkt::Timestamp>,
8886
8887    /// Output only. The time when the Encryption configuration was last updated.
8888    pub update_time: std::option::Option<wkt::Timestamp>,
8889
8890    /// Output only. The state of encryption of the databases.
8891    pub encryption_state: crate::model::encryption_config::EncryptionState,
8892
8893    /// Etag of the EncryptionConfig. This is a strong etag.
8894    pub etag: std::string::String,
8895
8896    /// Output only. Details of the failure if anything related to Cmek db fails.
8897    pub failure_details: std::option::Option<crate::model::encryption_config::FailureDetails>,
8898
8899    /// Optional. Represent the state of CMEK opt-in for metastore.
8900    pub enable_metastore_encryption: bool,
8901
8902    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8903}
8904
8905impl EncryptionConfig {
8906    pub fn new() -> Self {
8907        std::default::Default::default()
8908    }
8909
8910    /// Sets the value of [name][crate::model::EncryptionConfig::name].
8911    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8912        self.name = v.into();
8913        self
8914    }
8915
8916    /// Sets the value of [key][crate::model::EncryptionConfig::key].
8917    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8918        self.key = v.into();
8919        self
8920    }
8921
8922    /// Sets the value of [create_time][crate::model::EncryptionConfig::create_time].
8923    pub fn set_create_time<T>(mut self, v: T) -> Self
8924    where
8925        T: std::convert::Into<wkt::Timestamp>,
8926    {
8927        self.create_time = std::option::Option::Some(v.into());
8928        self
8929    }
8930
8931    /// Sets or clears the value of [create_time][crate::model::EncryptionConfig::create_time].
8932    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8933    where
8934        T: std::convert::Into<wkt::Timestamp>,
8935    {
8936        self.create_time = v.map(|x| x.into());
8937        self
8938    }
8939
8940    /// Sets the value of [update_time][crate::model::EncryptionConfig::update_time].
8941    pub fn set_update_time<T>(mut self, v: T) -> Self
8942    where
8943        T: std::convert::Into<wkt::Timestamp>,
8944    {
8945        self.update_time = std::option::Option::Some(v.into());
8946        self
8947    }
8948
8949    /// Sets or clears the value of [update_time][crate::model::EncryptionConfig::update_time].
8950    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8951    where
8952        T: std::convert::Into<wkt::Timestamp>,
8953    {
8954        self.update_time = v.map(|x| x.into());
8955        self
8956    }
8957
8958    /// Sets the value of [encryption_state][crate::model::EncryptionConfig::encryption_state].
8959    pub fn set_encryption_state<
8960        T: std::convert::Into<crate::model::encryption_config::EncryptionState>,
8961    >(
8962        mut self,
8963        v: T,
8964    ) -> Self {
8965        self.encryption_state = v.into();
8966        self
8967    }
8968
8969    /// Sets the value of [etag][crate::model::EncryptionConfig::etag].
8970    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8971        self.etag = v.into();
8972        self
8973    }
8974
8975    /// Sets the value of [failure_details][crate::model::EncryptionConfig::failure_details].
8976    pub fn set_failure_details<T>(mut self, v: T) -> Self
8977    where
8978        T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
8979    {
8980        self.failure_details = std::option::Option::Some(v.into());
8981        self
8982    }
8983
8984    /// Sets or clears the value of [failure_details][crate::model::EncryptionConfig::failure_details].
8985    pub fn set_or_clear_failure_details<T>(mut self, v: std::option::Option<T>) -> Self
8986    where
8987        T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
8988    {
8989        self.failure_details = v.map(|x| x.into());
8990        self
8991    }
8992
8993    /// Sets the value of [enable_metastore_encryption][crate::model::EncryptionConfig::enable_metastore_encryption].
8994    pub fn set_enable_metastore_encryption<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8995        self.enable_metastore_encryption = v.into();
8996        self
8997    }
8998}
8999
9000impl wkt::message::Message for EncryptionConfig {
9001    fn typename() -> &'static str {
9002        "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig"
9003    }
9004}
9005
9006/// Defines additional types related to [EncryptionConfig].
9007pub mod encryption_config {
9008    #[allow(unused_imports)]
9009    use super::*;
9010
9011    /// Details of the failure if anything related to Cmek db fails.
9012    #[derive(Clone, Default, PartialEq)]
9013    #[non_exhaustive]
9014    pub struct FailureDetails {
9015        /// Output only. The error code for the failure.
9016        pub error_code: crate::model::encryption_config::failure_details::ErrorCode,
9017
9018        /// Output only. The error message will be shown to the user. Set only if the
9019        /// error code is REQUIRE_USER_ACTION.
9020        pub error_message: std::string::String,
9021
9022        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9023    }
9024
9025    impl FailureDetails {
9026        pub fn new() -> Self {
9027            std::default::Default::default()
9028        }
9029
9030        /// Sets the value of [error_code][crate::model::encryption_config::FailureDetails::error_code].
9031        pub fn set_error_code<
9032            T: std::convert::Into<crate::model::encryption_config::failure_details::ErrorCode>,
9033        >(
9034            mut self,
9035            v: T,
9036        ) -> Self {
9037            self.error_code = v.into();
9038            self
9039        }
9040
9041        /// Sets the value of [error_message][crate::model::encryption_config::FailureDetails::error_message].
9042        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
9043            mut self,
9044            v: T,
9045        ) -> Self {
9046            self.error_message = v.into();
9047            self
9048        }
9049    }
9050
9051    impl wkt::message::Message for FailureDetails {
9052        fn typename() -> &'static str {
9053            "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig.FailureDetails"
9054        }
9055    }
9056
9057    /// Defines additional types related to [FailureDetails].
9058    pub mod failure_details {
9059        #[allow(unused_imports)]
9060        use super::*;
9061
9062        /// Error code for the failure if anything related to Cmek db fails.
9063        ///
9064        /// # Working with unknown values
9065        ///
9066        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9067        /// additional enum variants at any time. Adding new variants is not considered
9068        /// a breaking change. Applications should write their code in anticipation of:
9069        ///
9070        /// - New values appearing in future releases of the client library, **and**
9071        /// - New values received dynamically, without application changes.
9072        ///
9073        /// Please consult the [Working with enums] section in the user guide for some
9074        /// guidelines.
9075        ///
9076        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9077        #[derive(Clone, Debug, PartialEq)]
9078        #[non_exhaustive]
9079        pub enum ErrorCode {
9080            /// The error code is not specified
9081            Unknown,
9082            /// Error because of internal server error, will be retried automatically.
9083            InternalError,
9084            /// User action is required to resolve the error.
9085            RequireUserAction,
9086            /// If set, the enum was initialized with an unknown value.
9087            ///
9088            /// Applications can examine the value using [ErrorCode::value] or
9089            /// [ErrorCode::name].
9090            UnknownValue(error_code::UnknownValue),
9091        }
9092
9093        #[doc(hidden)]
9094        pub mod error_code {
9095            #[allow(unused_imports)]
9096            use super::*;
9097            #[derive(Clone, Debug, PartialEq)]
9098            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9099        }
9100
9101        impl ErrorCode {
9102            /// Gets the enum value.
9103            ///
9104            /// Returns `None` if the enum contains an unknown value deserialized from
9105            /// the string representation of enums.
9106            pub fn value(&self) -> std::option::Option<i32> {
9107                match self {
9108                    Self::Unknown => std::option::Option::Some(0),
9109                    Self::InternalError => std::option::Option::Some(1),
9110                    Self::RequireUserAction => std::option::Option::Some(2),
9111                    Self::UnknownValue(u) => u.0.value(),
9112                }
9113            }
9114
9115            /// Gets the enum value as a string.
9116            ///
9117            /// Returns `None` if the enum contains an unknown value deserialized from
9118            /// the integer representation of enums.
9119            pub fn name(&self) -> std::option::Option<&str> {
9120                match self {
9121                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
9122                    Self::InternalError => std::option::Option::Some("INTERNAL_ERROR"),
9123                    Self::RequireUserAction => std::option::Option::Some("REQUIRE_USER_ACTION"),
9124                    Self::UnknownValue(u) => u.0.name(),
9125                }
9126            }
9127        }
9128
9129        impl std::default::Default for ErrorCode {
9130            fn default() -> Self {
9131                use std::convert::From;
9132                Self::from(0)
9133            }
9134        }
9135
9136        impl std::fmt::Display for ErrorCode {
9137            fn fmt(
9138                &self,
9139                f: &mut std::fmt::Formatter<'_>,
9140            ) -> std::result::Result<(), std::fmt::Error> {
9141                wkt::internal::display_enum(f, self.name(), self.value())
9142            }
9143        }
9144
9145        impl std::convert::From<i32> for ErrorCode {
9146            fn from(value: i32) -> Self {
9147                match value {
9148                    0 => Self::Unknown,
9149                    1 => Self::InternalError,
9150                    2 => Self::RequireUserAction,
9151                    _ => Self::UnknownValue(error_code::UnknownValue(
9152                        wkt::internal::UnknownEnumValue::Integer(value),
9153                    )),
9154                }
9155            }
9156        }
9157
9158        impl std::convert::From<&str> for ErrorCode {
9159            fn from(value: &str) -> Self {
9160                use std::string::ToString;
9161                match value {
9162                    "UNKNOWN" => Self::Unknown,
9163                    "INTERNAL_ERROR" => Self::InternalError,
9164                    "REQUIRE_USER_ACTION" => Self::RequireUserAction,
9165                    _ => Self::UnknownValue(error_code::UnknownValue(
9166                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9167                    )),
9168                }
9169            }
9170        }
9171
9172        impl serde::ser::Serialize for ErrorCode {
9173            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9174            where
9175                S: serde::Serializer,
9176            {
9177                match self {
9178                    Self::Unknown => serializer.serialize_i32(0),
9179                    Self::InternalError => serializer.serialize_i32(1),
9180                    Self::RequireUserAction => serializer.serialize_i32(2),
9181                    Self::UnknownValue(u) => u.0.serialize(serializer),
9182                }
9183            }
9184        }
9185
9186        impl<'de> serde::de::Deserialize<'de> for ErrorCode {
9187            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9188            where
9189                D: serde::Deserializer<'de>,
9190            {
9191                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
9192                    ".google.cloud.dataplex.v1.EncryptionConfig.FailureDetails.ErrorCode",
9193                ))
9194            }
9195        }
9196    }
9197
9198    /// State of encryption of the databases when EncryptionConfig is created or
9199    /// updated.
9200    ///
9201    /// # Working with unknown values
9202    ///
9203    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9204    /// additional enum variants at any time. Adding new variants is not considered
9205    /// a breaking change. Applications should write their code in anticipation of:
9206    ///
9207    /// - New values appearing in future releases of the client library, **and**
9208    /// - New values received dynamically, without application changes.
9209    ///
9210    /// Please consult the [Working with enums] section in the user guide for some
9211    /// guidelines.
9212    ///
9213    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9214    #[derive(Clone, Debug, PartialEq)]
9215    #[non_exhaustive]
9216    pub enum EncryptionState {
9217        /// State is not specified.
9218        Unspecified,
9219        /// The encryption state of the database when the EncryptionConfig is created
9220        /// or updated. If the encryption fails, it is retried indefinitely and the
9221        /// state is shown as ENCRYPTING.
9222        Encrypting,
9223        /// The encryption of data has completed successfully.
9224        Completed,
9225        /// The encryption of data has failed.
9226        /// The state is set to FAILED when the encryption fails due to reasons like
9227        /// permission issues, invalid key etc.
9228        Failed,
9229        /// If set, the enum was initialized with an unknown value.
9230        ///
9231        /// Applications can examine the value using [EncryptionState::value] or
9232        /// [EncryptionState::name].
9233        UnknownValue(encryption_state::UnknownValue),
9234    }
9235
9236    #[doc(hidden)]
9237    pub mod encryption_state {
9238        #[allow(unused_imports)]
9239        use super::*;
9240        #[derive(Clone, Debug, PartialEq)]
9241        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9242    }
9243
9244    impl EncryptionState {
9245        /// Gets the enum value.
9246        ///
9247        /// Returns `None` if the enum contains an unknown value deserialized from
9248        /// the string representation of enums.
9249        pub fn value(&self) -> std::option::Option<i32> {
9250            match self {
9251                Self::Unspecified => std::option::Option::Some(0),
9252                Self::Encrypting => std::option::Option::Some(1),
9253                Self::Completed => std::option::Option::Some(2),
9254                Self::Failed => std::option::Option::Some(3),
9255                Self::UnknownValue(u) => u.0.value(),
9256            }
9257        }
9258
9259        /// Gets the enum value as a string.
9260        ///
9261        /// Returns `None` if the enum contains an unknown value deserialized from
9262        /// the integer representation of enums.
9263        pub fn name(&self) -> std::option::Option<&str> {
9264            match self {
9265                Self::Unspecified => std::option::Option::Some("ENCRYPTION_STATE_UNSPECIFIED"),
9266                Self::Encrypting => std::option::Option::Some("ENCRYPTING"),
9267                Self::Completed => std::option::Option::Some("COMPLETED"),
9268                Self::Failed => std::option::Option::Some("FAILED"),
9269                Self::UnknownValue(u) => u.0.name(),
9270            }
9271        }
9272    }
9273
9274    impl std::default::Default for EncryptionState {
9275        fn default() -> Self {
9276            use std::convert::From;
9277            Self::from(0)
9278        }
9279    }
9280
9281    impl std::fmt::Display for EncryptionState {
9282        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9283            wkt::internal::display_enum(f, self.name(), self.value())
9284        }
9285    }
9286
9287    impl std::convert::From<i32> for EncryptionState {
9288        fn from(value: i32) -> Self {
9289            match value {
9290                0 => Self::Unspecified,
9291                1 => Self::Encrypting,
9292                2 => Self::Completed,
9293                3 => Self::Failed,
9294                _ => Self::UnknownValue(encryption_state::UnknownValue(
9295                    wkt::internal::UnknownEnumValue::Integer(value),
9296                )),
9297            }
9298        }
9299    }
9300
9301    impl std::convert::From<&str> for EncryptionState {
9302        fn from(value: &str) -> Self {
9303            use std::string::ToString;
9304            match value {
9305                "ENCRYPTION_STATE_UNSPECIFIED" => Self::Unspecified,
9306                "ENCRYPTING" => Self::Encrypting,
9307                "COMPLETED" => Self::Completed,
9308                "FAILED" => Self::Failed,
9309                _ => Self::UnknownValue(encryption_state::UnknownValue(
9310                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9311                )),
9312            }
9313        }
9314    }
9315
9316    impl serde::ser::Serialize for EncryptionState {
9317        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9318        where
9319            S: serde::Serializer,
9320        {
9321            match self {
9322                Self::Unspecified => serializer.serialize_i32(0),
9323                Self::Encrypting => serializer.serialize_i32(1),
9324                Self::Completed => serializer.serialize_i32(2),
9325                Self::Failed => serializer.serialize_i32(3),
9326                Self::UnknownValue(u) => u.0.serialize(serializer),
9327            }
9328        }
9329    }
9330
9331    impl<'de> serde::de::Deserialize<'de> for EncryptionState {
9332        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9333        where
9334            D: serde::Deserializer<'de>,
9335        {
9336            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionState>::new(
9337                ".google.cloud.dataplex.v1.EncryptionConfig.EncryptionState",
9338            ))
9339        }
9340    }
9341}
9342
9343/// Create EncryptionConfig Request
9344#[derive(Clone, Default, PartialEq)]
9345#[non_exhaustive]
9346pub struct CreateEncryptionConfigRequest {
9347    /// Required. The location at which the EncryptionConfig is to be created.
9348    pub parent: std::string::String,
9349
9350    /// Required. The ID of the
9351    /// [EncryptionConfig][google.cloud.dataplex.v1.EncryptionConfig] to create.
9352    /// Currently, only a value of "default" is supported.
9353    ///
9354    /// [google.cloud.dataplex.v1.EncryptionConfig]: crate::model::EncryptionConfig
9355    pub encryption_config_id: std::string::String,
9356
9357    /// Required. The EncryptionConfig to create.
9358    pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
9359
9360    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9361}
9362
9363impl CreateEncryptionConfigRequest {
9364    pub fn new() -> Self {
9365        std::default::Default::default()
9366    }
9367
9368    /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
9369    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9370        self.parent = v.into();
9371        self
9372    }
9373
9374    /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
9375    pub fn set_encryption_config_id<T: std::convert::Into<std::string::String>>(
9376        mut self,
9377        v: T,
9378    ) -> Self {
9379        self.encryption_config_id = v.into();
9380        self
9381    }
9382
9383    /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
9384    pub fn set_encryption_config<T>(mut self, v: T) -> Self
9385    where
9386        T: std::convert::Into<crate::model::EncryptionConfig>,
9387    {
9388        self.encryption_config = std::option::Option::Some(v.into());
9389        self
9390    }
9391
9392    /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
9393    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
9394    where
9395        T: std::convert::Into<crate::model::EncryptionConfig>,
9396    {
9397        self.encryption_config = v.map(|x| x.into());
9398        self
9399    }
9400}
9401
9402impl wkt::message::Message for CreateEncryptionConfigRequest {
9403    fn typename() -> &'static str {
9404        "type.googleapis.com/google.cloud.dataplex.v1.CreateEncryptionConfigRequest"
9405    }
9406}
9407
9408/// Get EncryptionConfig Request
9409#[derive(Clone, Default, PartialEq)]
9410#[non_exhaustive]
9411pub struct GetEncryptionConfigRequest {
9412    /// Required. The name of the EncryptionConfig to fetch.
9413    pub name: std::string::String,
9414
9415    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9416}
9417
9418impl GetEncryptionConfigRequest {
9419    pub fn new() -> Self {
9420        std::default::Default::default()
9421    }
9422
9423    /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
9424    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9425        self.name = v.into();
9426        self
9427    }
9428}
9429
9430impl wkt::message::Message for GetEncryptionConfigRequest {
9431    fn typename() -> &'static str {
9432        "type.googleapis.com/google.cloud.dataplex.v1.GetEncryptionConfigRequest"
9433    }
9434}
9435
9436/// Update EncryptionConfig Request
9437#[derive(Clone, Default, PartialEq)]
9438#[non_exhaustive]
9439pub struct UpdateEncryptionConfigRequest {
9440    /// Required. The EncryptionConfig to update.
9441    pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
9442
9443    /// Optional. Mask of fields to update.
9444    /// The service treats an omitted field mask as an implied field mask
9445    /// equivalent to all fields that are populated (have a non-empty value).
9446    pub update_mask: std::option::Option<wkt::FieldMask>,
9447
9448    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9449}
9450
9451impl UpdateEncryptionConfigRequest {
9452    pub fn new() -> Self {
9453        std::default::Default::default()
9454    }
9455
9456    /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
9457    pub fn set_encryption_config<T>(mut self, v: T) -> Self
9458    where
9459        T: std::convert::Into<crate::model::EncryptionConfig>,
9460    {
9461        self.encryption_config = std::option::Option::Some(v.into());
9462        self
9463    }
9464
9465    /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
9466    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
9467    where
9468        T: std::convert::Into<crate::model::EncryptionConfig>,
9469    {
9470        self.encryption_config = v.map(|x| x.into());
9471        self
9472    }
9473
9474    /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
9475    pub fn set_update_mask<T>(mut self, v: T) -> Self
9476    where
9477        T: std::convert::Into<wkt::FieldMask>,
9478    {
9479        self.update_mask = std::option::Option::Some(v.into());
9480        self
9481    }
9482
9483    /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
9484    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9485    where
9486        T: std::convert::Into<wkt::FieldMask>,
9487    {
9488        self.update_mask = v.map(|x| x.into());
9489        self
9490    }
9491}
9492
9493impl wkt::message::Message for UpdateEncryptionConfigRequest {
9494    fn typename() -> &'static str {
9495        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEncryptionConfigRequest"
9496    }
9497}
9498
9499/// Delete EncryptionConfig Request
9500#[derive(Clone, Default, PartialEq)]
9501#[non_exhaustive]
9502pub struct DeleteEncryptionConfigRequest {
9503    /// Required. The name of the EncryptionConfig to delete.
9504    pub name: std::string::String,
9505
9506    /// Optional. Etag of the EncryptionConfig. This is a strong etag.
9507    pub etag: std::string::String,
9508
9509    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9510}
9511
9512impl DeleteEncryptionConfigRequest {
9513    pub fn new() -> Self {
9514        std::default::Default::default()
9515    }
9516
9517    /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
9518    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9519        self.name = v.into();
9520        self
9521    }
9522
9523    /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
9524    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9525        self.etag = v.into();
9526        self
9527    }
9528}
9529
9530impl wkt::message::Message for DeleteEncryptionConfigRequest {
9531    fn typename() -> &'static str {
9532        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEncryptionConfigRequest"
9533    }
9534}
9535
9536/// List EncryptionConfigs Request
9537#[derive(Clone, Default, PartialEq)]
9538#[non_exhaustive]
9539pub struct ListEncryptionConfigsRequest {
9540    /// Required. The location for which the EncryptionConfig is to be listed.
9541    pub parent: std::string::String,
9542
9543    /// Optional. Maximum number of EncryptionConfigs to return. The service may
9544    /// return fewer than this value. If unspecified, at most 10 EncryptionConfigs
9545    /// will be returned. The maximum value is 1000; values above 1000 will be
9546    /// coerced to 1000.
9547    pub page_size: i32,
9548
9549    /// Optional. Page token received from a previous `ListEncryptionConfigs` call.
9550    /// Provide this to retrieve the subsequent page. When paginating, the
9551    /// parameters - filter and order_by provided to `ListEncryptionConfigs` must
9552    /// match the call that provided the page token.
9553    pub page_token: std::string::String,
9554
9555    /// Optional. Filter the EncryptionConfigs to be returned.
9556    /// Using bare literals: (These values will be matched anywhere it may appear
9557    /// in the object's field values)
9558    ///
9559    /// * filter=some_value
9560    ///   Using fields: (These values will be matched only in the specified field)
9561    /// * filter=some_field=some_value
9562    ///   Supported fields:
9563    /// * name, key, create_time, update_time, encryption_state
9564    ///   Example:
9565    /// * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config
9566    ///   conjunctions: (AND, OR, NOT)
9567    /// * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config
9568    ///   AND mode=CMEK
9569    ///   logical operators: (>, <, >=, <=, !=, =, :),
9570    /// * filter=create_time>2024-05-01T00:00:00.000Z
9571    pub filter: std::string::String,
9572
9573    /// Optional. Order by fields for the result.
9574    pub order_by: std::string::String,
9575
9576    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9577}
9578
9579impl ListEncryptionConfigsRequest {
9580    pub fn new() -> Self {
9581        std::default::Default::default()
9582    }
9583
9584    /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
9585    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9586        self.parent = v.into();
9587        self
9588    }
9589
9590    /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
9591    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9592        self.page_size = v.into();
9593        self
9594    }
9595
9596    /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
9597    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9598        self.page_token = v.into();
9599        self
9600    }
9601
9602    /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
9603    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9604        self.filter = v.into();
9605        self
9606    }
9607
9608    /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
9609    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9610        self.order_by = v.into();
9611        self
9612    }
9613}
9614
9615impl wkt::message::Message for ListEncryptionConfigsRequest {
9616    fn typename() -> &'static str {
9617        "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsRequest"
9618    }
9619}
9620
9621/// List EncryptionConfigs Response
9622#[derive(Clone, Default, PartialEq)]
9623#[non_exhaustive]
9624pub struct ListEncryptionConfigsResponse {
9625    /// The list of EncryptionConfigs under the given parent location.
9626    pub encryption_configs: std::vec::Vec<crate::model::EncryptionConfig>,
9627
9628    /// Token to retrieve the next page of results, or empty if there are no more
9629    /// results in the list.
9630    pub next_page_token: std::string::String,
9631
9632    /// Locations that could not be reached.
9633    pub unreachable_locations: std::vec::Vec<std::string::String>,
9634
9635    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9636}
9637
9638impl ListEncryptionConfigsResponse {
9639    pub fn new() -> Self {
9640        std::default::Default::default()
9641    }
9642
9643    /// Sets the value of [encryption_configs][crate::model::ListEncryptionConfigsResponse::encryption_configs].
9644    pub fn set_encryption_configs<T, V>(mut self, v: T) -> Self
9645    where
9646        T: std::iter::IntoIterator<Item = V>,
9647        V: std::convert::Into<crate::model::EncryptionConfig>,
9648    {
9649        use std::iter::Iterator;
9650        self.encryption_configs = v.into_iter().map(|i| i.into()).collect();
9651        self
9652    }
9653
9654    /// Sets the value of [next_page_token][crate::model::ListEncryptionConfigsResponse::next_page_token].
9655    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9656        self.next_page_token = v.into();
9657        self
9658    }
9659
9660    /// Sets the value of [unreachable_locations][crate::model::ListEncryptionConfigsResponse::unreachable_locations].
9661    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
9662    where
9663        T: std::iter::IntoIterator<Item = V>,
9664        V: std::convert::Into<std::string::String>,
9665    {
9666        use std::iter::Iterator;
9667        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
9668        self
9669    }
9670}
9671
9672impl wkt::message::Message for ListEncryptionConfigsResponse {
9673    fn typename() -> &'static str {
9674        "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsResponse"
9675    }
9676}
9677
9678#[doc(hidden)]
9679impl gax::paginator::internal::PageableResponse for ListEncryptionConfigsResponse {
9680    type PageItem = crate::model::EncryptionConfig;
9681
9682    fn items(self) -> std::vec::Vec<Self::PageItem> {
9683        self.encryption_configs
9684    }
9685
9686    fn next_page_token(&self) -> std::string::String {
9687        use std::clone::Clone;
9688        self.next_page_token.clone()
9689    }
9690}
9691
9692/// Create content request.
9693#[derive(Clone, Default, PartialEq)]
9694#[non_exhaustive]
9695pub struct CreateContentRequest {
9696    /// Required. The resource name of the parent lake:
9697    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
9698    pub parent: std::string::String,
9699
9700    /// Required. Content resource.
9701    pub content: std::option::Option<crate::model::Content>,
9702
9703    /// Optional. Only validate the request, but do not perform mutations.
9704    /// The default is false.
9705    pub validate_only: bool,
9706
9707    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9708}
9709
9710impl CreateContentRequest {
9711    pub fn new() -> Self {
9712        std::default::Default::default()
9713    }
9714
9715    /// Sets the value of [parent][crate::model::CreateContentRequest::parent].
9716    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9717        self.parent = v.into();
9718        self
9719    }
9720
9721    /// Sets the value of [content][crate::model::CreateContentRequest::content].
9722    pub fn set_content<T>(mut self, v: T) -> Self
9723    where
9724        T: std::convert::Into<crate::model::Content>,
9725    {
9726        self.content = std::option::Option::Some(v.into());
9727        self
9728    }
9729
9730    /// Sets or clears the value of [content][crate::model::CreateContentRequest::content].
9731    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
9732    where
9733        T: std::convert::Into<crate::model::Content>,
9734    {
9735        self.content = v.map(|x| x.into());
9736        self
9737    }
9738
9739    /// Sets the value of [validate_only][crate::model::CreateContentRequest::validate_only].
9740    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9741        self.validate_only = v.into();
9742        self
9743    }
9744}
9745
9746impl wkt::message::Message for CreateContentRequest {
9747    fn typename() -> &'static str {
9748        "type.googleapis.com/google.cloud.dataplex.v1.CreateContentRequest"
9749    }
9750}
9751
9752/// Update content request.
9753#[derive(Clone, Default, PartialEq)]
9754#[non_exhaustive]
9755pub struct UpdateContentRequest {
9756    /// Required. Mask of fields to update.
9757    pub update_mask: std::option::Option<wkt::FieldMask>,
9758
9759    /// Required. Update description.
9760    /// Only fields specified in `update_mask` are updated.
9761    pub content: std::option::Option<crate::model::Content>,
9762
9763    /// Optional. Only validate the request, but do not perform mutations.
9764    /// The default is false.
9765    pub validate_only: bool,
9766
9767    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9768}
9769
9770impl UpdateContentRequest {
9771    pub fn new() -> Self {
9772        std::default::Default::default()
9773    }
9774
9775    /// Sets the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
9776    pub fn set_update_mask<T>(mut self, v: T) -> Self
9777    where
9778        T: std::convert::Into<wkt::FieldMask>,
9779    {
9780        self.update_mask = std::option::Option::Some(v.into());
9781        self
9782    }
9783
9784    /// Sets or clears the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
9785    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9786    where
9787        T: std::convert::Into<wkt::FieldMask>,
9788    {
9789        self.update_mask = v.map(|x| x.into());
9790        self
9791    }
9792
9793    /// Sets the value of [content][crate::model::UpdateContentRequest::content].
9794    pub fn set_content<T>(mut self, v: T) -> Self
9795    where
9796        T: std::convert::Into<crate::model::Content>,
9797    {
9798        self.content = std::option::Option::Some(v.into());
9799        self
9800    }
9801
9802    /// Sets or clears the value of [content][crate::model::UpdateContentRequest::content].
9803    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
9804    where
9805        T: std::convert::Into<crate::model::Content>,
9806    {
9807        self.content = v.map(|x| x.into());
9808        self
9809    }
9810
9811    /// Sets the value of [validate_only][crate::model::UpdateContentRequest::validate_only].
9812    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9813        self.validate_only = v.into();
9814        self
9815    }
9816}
9817
9818impl wkt::message::Message for UpdateContentRequest {
9819    fn typename() -> &'static str {
9820        "type.googleapis.com/google.cloud.dataplex.v1.UpdateContentRequest"
9821    }
9822}
9823
9824/// Delete content request.
9825#[derive(Clone, Default, PartialEq)]
9826#[non_exhaustive]
9827pub struct DeleteContentRequest {
9828    /// Required. The resource name of the content:
9829    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
9830    pub name: std::string::String,
9831
9832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9833}
9834
9835impl DeleteContentRequest {
9836    pub fn new() -> Self {
9837        std::default::Default::default()
9838    }
9839
9840    /// Sets the value of [name][crate::model::DeleteContentRequest::name].
9841    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9842        self.name = v.into();
9843        self
9844    }
9845}
9846
9847impl wkt::message::Message for DeleteContentRequest {
9848    fn typename() -> &'static str {
9849        "type.googleapis.com/google.cloud.dataplex.v1.DeleteContentRequest"
9850    }
9851}
9852
9853/// List content request. Returns the BASIC Content view.
9854#[derive(Clone, Default, PartialEq)]
9855#[non_exhaustive]
9856pub struct ListContentRequest {
9857    /// Required. The resource name of the parent lake:
9858    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
9859    pub parent: std::string::String,
9860
9861    /// Optional. Maximum number of content to return. The service may return fewer
9862    /// than this value. If unspecified, at most 10 content will be returned. The
9863    /// maximum value is 1000; values above 1000 will be coerced to 1000.
9864    pub page_size: i32,
9865
9866    /// Optional. Page token received from a previous `ListContent` call. Provide
9867    /// this to retrieve the subsequent page. When paginating, all other parameters
9868    /// provided to `ListContent` must match the call that provided the page
9869    /// token.
9870    pub page_token: std::string::String,
9871
9872    /// Optional. Filter request. Filters are case-sensitive.
9873    /// The following formats are supported:
9874    ///
9875    /// labels.key1 = "value1"
9876    /// labels:key1
9877    /// type = "NOTEBOOK"
9878    /// type = "SQL_SCRIPT"
9879    ///
9880    /// These restrictions can be coinjoined with AND, OR and NOT conjunctions.
9881    pub filter: std::string::String,
9882
9883    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9884}
9885
9886impl ListContentRequest {
9887    pub fn new() -> Self {
9888        std::default::Default::default()
9889    }
9890
9891    /// Sets the value of [parent][crate::model::ListContentRequest::parent].
9892    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9893        self.parent = v.into();
9894        self
9895    }
9896
9897    /// Sets the value of [page_size][crate::model::ListContentRequest::page_size].
9898    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9899        self.page_size = v.into();
9900        self
9901    }
9902
9903    /// Sets the value of [page_token][crate::model::ListContentRequest::page_token].
9904    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9905        self.page_token = v.into();
9906        self
9907    }
9908
9909    /// Sets the value of [filter][crate::model::ListContentRequest::filter].
9910    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9911        self.filter = v.into();
9912        self
9913    }
9914}
9915
9916impl wkt::message::Message for ListContentRequest {
9917    fn typename() -> &'static str {
9918        "type.googleapis.com/google.cloud.dataplex.v1.ListContentRequest"
9919    }
9920}
9921
9922/// List content response.
9923#[derive(Clone, Default, PartialEq)]
9924#[non_exhaustive]
9925pub struct ListContentResponse {
9926    /// Content under the given parent lake.
9927    pub content: std::vec::Vec<crate::model::Content>,
9928
9929    /// Token to retrieve the next page of results, or empty if there are no more
9930    /// results in the list.
9931    pub next_page_token: std::string::String,
9932
9933    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9934}
9935
9936impl ListContentResponse {
9937    pub fn new() -> Self {
9938        std::default::Default::default()
9939    }
9940
9941    /// Sets the value of [content][crate::model::ListContentResponse::content].
9942    pub fn set_content<T, V>(mut self, v: T) -> Self
9943    where
9944        T: std::iter::IntoIterator<Item = V>,
9945        V: std::convert::Into<crate::model::Content>,
9946    {
9947        use std::iter::Iterator;
9948        self.content = v.into_iter().map(|i| i.into()).collect();
9949        self
9950    }
9951
9952    /// Sets the value of [next_page_token][crate::model::ListContentResponse::next_page_token].
9953    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9954        self.next_page_token = v.into();
9955        self
9956    }
9957}
9958
9959impl wkt::message::Message for ListContentResponse {
9960    fn typename() -> &'static str {
9961        "type.googleapis.com/google.cloud.dataplex.v1.ListContentResponse"
9962    }
9963}
9964
9965#[doc(hidden)]
9966impl gax::paginator::internal::PageableResponse for ListContentResponse {
9967    type PageItem = crate::model::Content;
9968
9969    fn items(self) -> std::vec::Vec<Self::PageItem> {
9970        self.content
9971    }
9972
9973    fn next_page_token(&self) -> std::string::String {
9974        use std::clone::Clone;
9975        self.next_page_token.clone()
9976    }
9977}
9978
9979/// Get content request.
9980#[derive(Clone, Default, PartialEq)]
9981#[non_exhaustive]
9982pub struct GetContentRequest {
9983    /// Required. The resource name of the content:
9984    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
9985    pub name: std::string::String,
9986
9987    /// Optional. Specify content view to make a partial request.
9988    pub view: crate::model::get_content_request::ContentView,
9989
9990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9991}
9992
9993impl GetContentRequest {
9994    pub fn new() -> Self {
9995        std::default::Default::default()
9996    }
9997
9998    /// Sets the value of [name][crate::model::GetContentRequest::name].
9999    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10000        self.name = v.into();
10001        self
10002    }
10003
10004    /// Sets the value of [view][crate::model::GetContentRequest::view].
10005    pub fn set_view<T: std::convert::Into<crate::model::get_content_request::ContentView>>(
10006        mut self,
10007        v: T,
10008    ) -> Self {
10009        self.view = v.into();
10010        self
10011    }
10012}
10013
10014impl wkt::message::Message for GetContentRequest {
10015    fn typename() -> &'static str {
10016        "type.googleapis.com/google.cloud.dataplex.v1.GetContentRequest"
10017    }
10018}
10019
10020/// Defines additional types related to [GetContentRequest].
10021pub mod get_content_request {
10022    #[allow(unused_imports)]
10023    use super::*;
10024
10025    /// Specifies whether the request should return the full or the partial
10026    /// representation.
10027    ///
10028    /// # Working with unknown values
10029    ///
10030    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10031    /// additional enum variants at any time. Adding new variants is not considered
10032    /// a breaking change. Applications should write their code in anticipation of:
10033    ///
10034    /// - New values appearing in future releases of the client library, **and**
10035    /// - New values received dynamically, without application changes.
10036    ///
10037    /// Please consult the [Working with enums] section in the user guide for some
10038    /// guidelines.
10039    ///
10040    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10041    #[derive(Clone, Debug, PartialEq)]
10042    #[non_exhaustive]
10043    pub enum ContentView {
10044        /// Content view not specified. Defaults to BASIC.
10045        /// The API will default to the BASIC view.
10046        Unspecified,
10047        /// Will not return the `data_text` field.
10048        Basic,
10049        /// Returns the complete proto.
10050        Full,
10051        /// If set, the enum was initialized with an unknown value.
10052        ///
10053        /// Applications can examine the value using [ContentView::value] or
10054        /// [ContentView::name].
10055        UnknownValue(content_view::UnknownValue),
10056    }
10057
10058    #[doc(hidden)]
10059    pub mod content_view {
10060        #[allow(unused_imports)]
10061        use super::*;
10062        #[derive(Clone, Debug, PartialEq)]
10063        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10064    }
10065
10066    impl ContentView {
10067        /// Gets the enum value.
10068        ///
10069        /// Returns `None` if the enum contains an unknown value deserialized from
10070        /// the string representation of enums.
10071        pub fn value(&self) -> std::option::Option<i32> {
10072            match self {
10073                Self::Unspecified => std::option::Option::Some(0),
10074                Self::Basic => std::option::Option::Some(1),
10075                Self::Full => std::option::Option::Some(2),
10076                Self::UnknownValue(u) => u.0.value(),
10077            }
10078        }
10079
10080        /// Gets the enum value as a string.
10081        ///
10082        /// Returns `None` if the enum contains an unknown value deserialized from
10083        /// the integer representation of enums.
10084        pub fn name(&self) -> std::option::Option<&str> {
10085            match self {
10086                Self::Unspecified => std::option::Option::Some("CONTENT_VIEW_UNSPECIFIED"),
10087                Self::Basic => std::option::Option::Some("BASIC"),
10088                Self::Full => std::option::Option::Some("FULL"),
10089                Self::UnknownValue(u) => u.0.name(),
10090            }
10091        }
10092    }
10093
10094    impl std::default::Default for ContentView {
10095        fn default() -> Self {
10096            use std::convert::From;
10097            Self::from(0)
10098        }
10099    }
10100
10101    impl std::fmt::Display for ContentView {
10102        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10103            wkt::internal::display_enum(f, self.name(), self.value())
10104        }
10105    }
10106
10107    impl std::convert::From<i32> for ContentView {
10108        fn from(value: i32) -> Self {
10109            match value {
10110                0 => Self::Unspecified,
10111                1 => Self::Basic,
10112                2 => Self::Full,
10113                _ => Self::UnknownValue(content_view::UnknownValue(
10114                    wkt::internal::UnknownEnumValue::Integer(value),
10115                )),
10116            }
10117        }
10118    }
10119
10120    impl std::convert::From<&str> for ContentView {
10121        fn from(value: &str) -> Self {
10122            use std::string::ToString;
10123            match value {
10124                "CONTENT_VIEW_UNSPECIFIED" => Self::Unspecified,
10125                "BASIC" => Self::Basic,
10126                "FULL" => Self::Full,
10127                _ => Self::UnknownValue(content_view::UnknownValue(
10128                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10129                )),
10130            }
10131        }
10132    }
10133
10134    impl serde::ser::Serialize for ContentView {
10135        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10136        where
10137            S: serde::Serializer,
10138        {
10139            match self {
10140                Self::Unspecified => serializer.serialize_i32(0),
10141                Self::Basic => serializer.serialize_i32(1),
10142                Self::Full => serializer.serialize_i32(2),
10143                Self::UnknownValue(u) => u.0.serialize(serializer),
10144            }
10145        }
10146    }
10147
10148    impl<'de> serde::de::Deserialize<'de> for ContentView {
10149        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10150        where
10151            D: serde::Deserializer<'de>,
10152        {
10153            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ContentView>::new(
10154                ".google.cloud.dataplex.v1.GetContentRequest.ContentView",
10155            ))
10156        }
10157    }
10158}
10159
10160/// Spec for a data discovery scan.
10161#[derive(Clone, Default, PartialEq)]
10162#[non_exhaustive]
10163pub struct DataDiscoverySpec {
10164    /// Optional. Configuration for metadata publishing.
10165    pub bigquery_publishing_config:
10166        std::option::Option<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
10167
10168    /// The configurations of the data discovery scan resource.
10169    pub resource_config: std::option::Option<crate::model::data_discovery_spec::ResourceConfig>,
10170
10171    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10172}
10173
10174impl DataDiscoverySpec {
10175    pub fn new() -> Self {
10176        std::default::Default::default()
10177    }
10178
10179    /// Sets the value of [bigquery_publishing_config][crate::model::DataDiscoverySpec::bigquery_publishing_config].
10180    pub fn set_bigquery_publishing_config<T>(mut self, v: T) -> Self
10181    where
10182        T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
10183    {
10184        self.bigquery_publishing_config = std::option::Option::Some(v.into());
10185        self
10186    }
10187
10188    /// Sets or clears the value of [bigquery_publishing_config][crate::model::DataDiscoverySpec::bigquery_publishing_config].
10189    pub fn set_or_clear_bigquery_publishing_config<T>(mut self, v: std::option::Option<T>) -> Self
10190    where
10191        T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
10192    {
10193        self.bigquery_publishing_config = v.map(|x| x.into());
10194        self
10195    }
10196
10197    /// Sets the value of [resource_config][crate::model::DataDiscoverySpec::resource_config].
10198    ///
10199    /// Note that all the setters affecting `resource_config` are mutually
10200    /// exclusive.
10201    pub fn set_resource_config<
10202        T: std::convert::Into<std::option::Option<crate::model::data_discovery_spec::ResourceConfig>>,
10203    >(
10204        mut self,
10205        v: T,
10206    ) -> Self {
10207        self.resource_config = v.into();
10208        self
10209    }
10210
10211    /// The value of [resource_config][crate::model::DataDiscoverySpec::resource_config]
10212    /// if it holds a `StorageConfig`, `None` if the field is not set or
10213    /// holds a different branch.
10214    pub fn storage_config(
10215        &self,
10216    ) -> std::option::Option<&std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>
10217    {
10218        #[allow(unreachable_patterns)]
10219        self.resource_config.as_ref().and_then(|v| match v {
10220            crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v) => {
10221                std::option::Option::Some(v)
10222            }
10223            _ => std::option::Option::None,
10224        })
10225    }
10226
10227    /// Sets the value of [resource_config][crate::model::DataDiscoverySpec::resource_config]
10228    /// to hold a `StorageConfig`.
10229    ///
10230    /// Note that all the setters affecting `resource_config` are
10231    /// mutually exclusive.
10232    pub fn set_storage_config<
10233        T: std::convert::Into<std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>,
10234    >(
10235        mut self,
10236        v: T,
10237    ) -> Self {
10238        self.resource_config = std::option::Option::Some(
10239            crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v.into()),
10240        );
10241        self
10242    }
10243}
10244
10245impl wkt::message::Message for DataDiscoverySpec {
10246    fn typename() -> &'static str {
10247        "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec"
10248    }
10249}
10250
10251/// Defines additional types related to [DataDiscoverySpec].
10252pub mod data_discovery_spec {
10253    #[allow(unused_imports)]
10254    use super::*;
10255
10256    /// Describes BigQuery publishing configurations.
10257    #[derive(Clone, Default, PartialEq)]
10258    #[non_exhaustive]
10259    pub struct BigQueryPublishingConfig {
10260        /// Optional. Determines whether to  publish discovered tables as BigLake
10261        /// external tables or non-BigLake external tables.
10262        pub table_type: crate::model::data_discovery_spec::big_query_publishing_config::TableType,
10263
10264        /// Optional. The BigQuery connection used to create BigLake tables.
10265        /// Must be in the form
10266        /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
10267        pub connection: std::string::String,
10268
10269        /// Optional. The location of the BigQuery dataset to publish BigLake
10270        /// external or non-BigLake external tables to.
10271        ///
10272        /// 1. If the Cloud Storage bucket is located in a multi-region bucket, then
10273        ///    BigQuery dataset can be in the same multi-region bucket or any single
10274        ///    region that is included in the same multi-region bucket. The datascan can
10275        ///    be created in any single region that is included in the same multi-region
10276        ///    bucket
10277        /// 1. If the Cloud Storage bucket is located in a dual-region bucket, then
10278        ///    BigQuery dataset can be located in regions that are included in the
10279        ///    dual-region bucket, or in a multi-region that includes the dual-region.
10280        ///    The datascan can be created in any single region that is included in the
10281        ///    same dual-region bucket.
10282        /// 1. If the Cloud Storage bucket is located in a single region, then
10283        ///    BigQuery dataset can be in the same single region or any multi-region
10284        ///    bucket that includes the same single region. The datascan will be created
10285        ///    in the same single region as the bucket.
10286        /// 1. If the BigQuery dataset is in single region, it must be in the same
10287        ///    single region as the datascan.
10288        ///
10289        /// For supported values, refer to
10290        /// <https://cloud.google.com/bigquery/docs/locations#supported_locations>.
10291        pub location: std::string::String,
10292
10293        /// Optional. The project of the BigQuery dataset to publish BigLake external
10294        /// or non-BigLake external tables to. If not specified, the project of the
10295        /// Cloud Storage bucket will be used. The format is
10296        /// "projects/{project_id_or_number}".
10297        pub project: std::string::String,
10298
10299        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10300    }
10301
10302    impl BigQueryPublishingConfig {
10303        pub fn new() -> Self {
10304            std::default::Default::default()
10305        }
10306
10307        /// Sets the value of [table_type][crate::model::data_discovery_spec::BigQueryPublishingConfig::table_type].
10308        pub fn set_table_type<
10309            T: std::convert::Into<
10310                    crate::model::data_discovery_spec::big_query_publishing_config::TableType,
10311                >,
10312        >(
10313            mut self,
10314            v: T,
10315        ) -> Self {
10316            self.table_type = v.into();
10317            self
10318        }
10319
10320        /// Sets the value of [connection][crate::model::data_discovery_spec::BigQueryPublishingConfig::connection].
10321        pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10322            self.connection = v.into();
10323            self
10324        }
10325
10326        /// Sets the value of [location][crate::model::data_discovery_spec::BigQueryPublishingConfig::location].
10327        pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10328            self.location = v.into();
10329            self
10330        }
10331
10332        /// Sets the value of [project][crate::model::data_discovery_spec::BigQueryPublishingConfig::project].
10333        pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10334            self.project = v.into();
10335            self
10336        }
10337    }
10338
10339    impl wkt::message::Message for BigQueryPublishingConfig {
10340        fn typename() -> &'static str {
10341            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig"
10342        }
10343    }
10344
10345    /// Defines additional types related to [BigQueryPublishingConfig].
10346    pub mod big_query_publishing_config {
10347        #[allow(unused_imports)]
10348        use super::*;
10349
10350        /// Determines how discovered tables are published.
10351        ///
10352        /// # Working with unknown values
10353        ///
10354        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10355        /// additional enum variants at any time. Adding new variants is not considered
10356        /// a breaking change. Applications should write their code in anticipation of:
10357        ///
10358        /// - New values appearing in future releases of the client library, **and**
10359        /// - New values received dynamically, without application changes.
10360        ///
10361        /// Please consult the [Working with enums] section in the user guide for some
10362        /// guidelines.
10363        ///
10364        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10365        #[derive(Clone, Debug, PartialEq)]
10366        #[non_exhaustive]
10367        pub enum TableType {
10368            /// Table type unspecified.
10369            Unspecified,
10370            /// Default. Discovered tables are published as BigQuery external tables
10371            /// whose data is accessed using the credentials of the user querying the
10372            /// table.
10373            External,
10374            /// Discovered tables are published as BigLake external tables whose data
10375            /// is accessed using the credentials of the associated BigQuery
10376            /// connection.
10377            Biglake,
10378            /// If set, the enum was initialized with an unknown value.
10379            ///
10380            /// Applications can examine the value using [TableType::value] or
10381            /// [TableType::name].
10382            UnknownValue(table_type::UnknownValue),
10383        }
10384
10385        #[doc(hidden)]
10386        pub mod table_type {
10387            #[allow(unused_imports)]
10388            use super::*;
10389            #[derive(Clone, Debug, PartialEq)]
10390            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10391        }
10392
10393        impl TableType {
10394            /// Gets the enum value.
10395            ///
10396            /// Returns `None` if the enum contains an unknown value deserialized from
10397            /// the string representation of enums.
10398            pub fn value(&self) -> std::option::Option<i32> {
10399                match self {
10400                    Self::Unspecified => std::option::Option::Some(0),
10401                    Self::External => std::option::Option::Some(1),
10402                    Self::Biglake => std::option::Option::Some(2),
10403                    Self::UnknownValue(u) => u.0.value(),
10404                }
10405            }
10406
10407            /// Gets the enum value as a string.
10408            ///
10409            /// Returns `None` if the enum contains an unknown value deserialized from
10410            /// the integer representation of enums.
10411            pub fn name(&self) -> std::option::Option<&str> {
10412                match self {
10413                    Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
10414                    Self::External => std::option::Option::Some("EXTERNAL"),
10415                    Self::Biglake => std::option::Option::Some("BIGLAKE"),
10416                    Self::UnknownValue(u) => u.0.name(),
10417                }
10418            }
10419        }
10420
10421        impl std::default::Default for TableType {
10422            fn default() -> Self {
10423                use std::convert::From;
10424                Self::from(0)
10425            }
10426        }
10427
10428        impl std::fmt::Display for TableType {
10429            fn fmt(
10430                &self,
10431                f: &mut std::fmt::Formatter<'_>,
10432            ) -> std::result::Result<(), std::fmt::Error> {
10433                wkt::internal::display_enum(f, self.name(), self.value())
10434            }
10435        }
10436
10437        impl std::convert::From<i32> for TableType {
10438            fn from(value: i32) -> Self {
10439                match value {
10440                    0 => Self::Unspecified,
10441                    1 => Self::External,
10442                    2 => Self::Biglake,
10443                    _ => Self::UnknownValue(table_type::UnknownValue(
10444                        wkt::internal::UnknownEnumValue::Integer(value),
10445                    )),
10446                }
10447            }
10448        }
10449
10450        impl std::convert::From<&str> for TableType {
10451            fn from(value: &str) -> Self {
10452                use std::string::ToString;
10453                match value {
10454                    "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
10455                    "EXTERNAL" => Self::External,
10456                    "BIGLAKE" => Self::Biglake,
10457                    _ => Self::UnknownValue(table_type::UnknownValue(
10458                        wkt::internal::UnknownEnumValue::String(value.to_string()),
10459                    )),
10460                }
10461            }
10462        }
10463
10464        impl serde::ser::Serialize for TableType {
10465            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10466            where
10467                S: serde::Serializer,
10468            {
10469                match self {
10470                    Self::Unspecified => serializer.serialize_i32(0),
10471                    Self::External => serializer.serialize_i32(1),
10472                    Self::Biglake => serializer.serialize_i32(2),
10473                    Self::UnknownValue(u) => u.0.serialize(serializer),
10474                }
10475            }
10476        }
10477
10478        impl<'de> serde::de::Deserialize<'de> for TableType {
10479            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10480            where
10481                D: serde::Deserializer<'de>,
10482            {
10483                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
10484                    ".google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType"))
10485            }
10486        }
10487    }
10488
10489    /// Configurations related to Cloud Storage as the data source.
10490    #[derive(Clone, Default, PartialEq)]
10491    #[non_exhaustive]
10492    pub struct StorageConfig {
10493        /// Optional. Defines the data to include during discovery when only a subset
10494        /// of the data should be considered. Provide a list of patterns that
10495        /// identify the data to include. For Cloud Storage bucket assets, these
10496        /// patterns are interpreted as glob patterns used to match object names. For
10497        /// BigQuery dataset assets, these patterns are interpreted as patterns to
10498        /// match table names.
10499        pub include_patterns: std::vec::Vec<std::string::String>,
10500
10501        /// Optional. Defines the data to exclude during discovery. Provide a list of
10502        /// patterns that identify the data to exclude. For Cloud Storage bucket
10503        /// assets, these patterns are interpreted as glob patterns used to match
10504        /// object names. For BigQuery dataset assets, these patterns are interpreted
10505        /// as patterns to match table names.
10506        pub exclude_patterns: std::vec::Vec<std::string::String>,
10507
10508        /// Optional. Configuration for CSV data.
10509        pub csv_options:
10510            std::option::Option<crate::model::data_discovery_spec::storage_config::CsvOptions>,
10511
10512        /// Optional. Configuration for JSON data.
10513        pub json_options:
10514            std::option::Option<crate::model::data_discovery_spec::storage_config::JsonOptions>,
10515
10516        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10517    }
10518
10519    impl StorageConfig {
10520        pub fn new() -> Self {
10521            std::default::Default::default()
10522        }
10523
10524        /// Sets the value of [include_patterns][crate::model::data_discovery_spec::StorageConfig::include_patterns].
10525        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
10526        where
10527            T: std::iter::IntoIterator<Item = V>,
10528            V: std::convert::Into<std::string::String>,
10529        {
10530            use std::iter::Iterator;
10531            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
10532            self
10533        }
10534
10535        /// Sets the value of [exclude_patterns][crate::model::data_discovery_spec::StorageConfig::exclude_patterns].
10536        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
10537        where
10538            T: std::iter::IntoIterator<Item = V>,
10539            V: std::convert::Into<std::string::String>,
10540        {
10541            use std::iter::Iterator;
10542            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
10543            self
10544        }
10545
10546        /// Sets the value of [csv_options][crate::model::data_discovery_spec::StorageConfig::csv_options].
10547        pub fn set_csv_options<T>(mut self, v: T) -> Self
10548        where
10549            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
10550        {
10551            self.csv_options = std::option::Option::Some(v.into());
10552            self
10553        }
10554
10555        /// Sets or clears the value of [csv_options][crate::model::data_discovery_spec::StorageConfig::csv_options].
10556        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
10557        where
10558            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
10559        {
10560            self.csv_options = v.map(|x| x.into());
10561            self
10562        }
10563
10564        /// Sets the value of [json_options][crate::model::data_discovery_spec::StorageConfig::json_options].
10565        pub fn set_json_options<T>(mut self, v: T) -> Self
10566        where
10567            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
10568        {
10569            self.json_options = std::option::Option::Some(v.into());
10570            self
10571        }
10572
10573        /// Sets or clears the value of [json_options][crate::model::data_discovery_spec::StorageConfig::json_options].
10574        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
10575        where
10576            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
10577        {
10578            self.json_options = v.map(|x| x.into());
10579            self
10580        }
10581    }
10582
10583    impl wkt::message::Message for StorageConfig {
10584        fn typename() -> &'static str {
10585            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig"
10586        }
10587    }
10588
10589    /// Defines additional types related to [StorageConfig].
10590    pub mod storage_config {
10591        #[allow(unused_imports)]
10592        use super::*;
10593
10594        /// Describes CSV and similar semi-structured data formats.
10595        #[derive(Clone, Default, PartialEq)]
10596        #[non_exhaustive]
10597        pub struct CsvOptions {
10598            /// Optional. The number of rows to interpret as header rows that should be
10599            /// skipped when reading data rows.
10600            pub header_rows: i32,
10601
10602            /// Optional. The delimiter that is used to separate values. The default is
10603            /// `,` (comma).
10604            pub delimiter: std::string::String,
10605
10606            /// Optional. The character encoding of the data. The default is UTF-8.
10607            pub encoding: std::string::String,
10608
10609            /// Optional. Whether to disable the inference of data types for CSV data.
10610            /// If true, all columns are registered as strings.
10611            pub type_inference_disabled: bool,
10612
10613            /// Optional. The character used to quote column values. Accepts `"`
10614            /// (double quotation mark) or `'` (single quotation mark). If unspecified,
10615            /// defaults to `"` (double quotation mark).
10616            pub quote: std::string::String,
10617
10618            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10619        }
10620
10621        impl CsvOptions {
10622            pub fn new() -> Self {
10623                std::default::Default::default()
10624            }
10625
10626            /// Sets the value of [header_rows][crate::model::data_discovery_spec::storage_config::CsvOptions::header_rows].
10627            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10628                self.header_rows = v.into();
10629                self
10630            }
10631
10632            /// Sets the value of [delimiter][crate::model::data_discovery_spec::storage_config::CsvOptions::delimiter].
10633            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
10634                mut self,
10635                v: T,
10636            ) -> Self {
10637                self.delimiter = v.into();
10638                self
10639            }
10640
10641            /// Sets the value of [encoding][crate::model::data_discovery_spec::storage_config::CsvOptions::encoding].
10642            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
10643                mut self,
10644                v: T,
10645            ) -> Self {
10646                self.encoding = v.into();
10647                self
10648            }
10649
10650            /// Sets the value of [type_inference_disabled][crate::model::data_discovery_spec::storage_config::CsvOptions::type_inference_disabled].
10651            pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
10652                mut self,
10653                v: T,
10654            ) -> Self {
10655                self.type_inference_disabled = v.into();
10656                self
10657            }
10658
10659            /// Sets the value of [quote][crate::model::data_discovery_spec::storage_config::CsvOptions::quote].
10660            pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10661                self.quote = v.into();
10662                self
10663            }
10664        }
10665
10666        impl wkt::message::Message for CsvOptions {
10667            fn typename() -> &'static str {
10668                "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions"
10669            }
10670        }
10671
10672        /// Describes JSON data format.
10673        #[derive(Clone, Default, PartialEq)]
10674        #[non_exhaustive]
10675        pub struct JsonOptions {
10676            /// Optional. The character encoding of the data. The default is UTF-8.
10677            pub encoding: std::string::String,
10678
10679            /// Optional. Whether to disable the inference of data types for JSON data.
10680            /// If true, all columns are registered as their primitive types
10681            /// (strings, number, or boolean).
10682            pub type_inference_disabled: bool,
10683
10684            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10685        }
10686
10687        impl JsonOptions {
10688            pub fn new() -> Self {
10689                std::default::Default::default()
10690            }
10691
10692            /// Sets the value of [encoding][crate::model::data_discovery_spec::storage_config::JsonOptions::encoding].
10693            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
10694                mut self,
10695                v: T,
10696            ) -> Self {
10697                self.encoding = v.into();
10698                self
10699            }
10700
10701            /// Sets the value of [type_inference_disabled][crate::model::data_discovery_spec::storage_config::JsonOptions::type_inference_disabled].
10702            pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
10703                mut self,
10704                v: T,
10705            ) -> Self {
10706                self.type_inference_disabled = v.into();
10707                self
10708            }
10709        }
10710
10711        impl wkt::message::Message for JsonOptions {
10712            fn typename() -> &'static str {
10713                "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions"
10714            }
10715        }
10716    }
10717
10718    /// The configurations of the data discovery scan resource.
10719    #[derive(Clone, Debug, PartialEq)]
10720    #[non_exhaustive]
10721    pub enum ResourceConfig {
10722        /// Cloud Storage related configurations.
10723        StorageConfig(std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>),
10724    }
10725}
10726
10727/// The output of a data discovery scan.
10728#[derive(Clone, Default, PartialEq)]
10729#[non_exhaustive]
10730pub struct DataDiscoveryResult {
10731    /// Output only. Configuration for metadata publishing.
10732    pub bigquery_publishing:
10733        std::option::Option<crate::model::data_discovery_result::BigQueryPublishing>,
10734
10735    /// Output only. Describes result statistics of a data scan discovery job.
10736    pub scan_statistics: std::option::Option<crate::model::data_discovery_result::ScanStatistics>,
10737
10738    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10739}
10740
10741impl DataDiscoveryResult {
10742    pub fn new() -> Self {
10743        std::default::Default::default()
10744    }
10745
10746    /// Sets the value of [bigquery_publishing][crate::model::DataDiscoveryResult::bigquery_publishing].
10747    pub fn set_bigquery_publishing<T>(mut self, v: T) -> Self
10748    where
10749        T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
10750    {
10751        self.bigquery_publishing = std::option::Option::Some(v.into());
10752        self
10753    }
10754
10755    /// Sets or clears the value of [bigquery_publishing][crate::model::DataDiscoveryResult::bigquery_publishing].
10756    pub fn set_or_clear_bigquery_publishing<T>(mut self, v: std::option::Option<T>) -> Self
10757    where
10758        T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
10759    {
10760        self.bigquery_publishing = v.map(|x| x.into());
10761        self
10762    }
10763
10764    /// Sets the value of [scan_statistics][crate::model::DataDiscoveryResult::scan_statistics].
10765    pub fn set_scan_statistics<T>(mut self, v: T) -> Self
10766    where
10767        T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
10768    {
10769        self.scan_statistics = std::option::Option::Some(v.into());
10770        self
10771    }
10772
10773    /// Sets or clears the value of [scan_statistics][crate::model::DataDiscoveryResult::scan_statistics].
10774    pub fn set_or_clear_scan_statistics<T>(mut self, v: std::option::Option<T>) -> Self
10775    where
10776        T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
10777    {
10778        self.scan_statistics = v.map(|x| x.into());
10779        self
10780    }
10781}
10782
10783impl wkt::message::Message for DataDiscoveryResult {
10784    fn typename() -> &'static str {
10785        "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult"
10786    }
10787}
10788
10789/// Defines additional types related to [DataDiscoveryResult].
10790pub mod data_discovery_result {
10791    #[allow(unused_imports)]
10792    use super::*;
10793
10794    /// Describes BigQuery publishing configurations.
10795    #[derive(Clone, Default, PartialEq)]
10796    #[non_exhaustive]
10797    pub struct BigQueryPublishing {
10798        /// Output only. The BigQuery dataset the discovered tables are published to.
10799        pub dataset: std::string::String,
10800
10801        /// Output only. The location of the BigQuery publishing dataset.
10802        pub location: std::string::String,
10803
10804        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10805    }
10806
10807    impl BigQueryPublishing {
10808        pub fn new() -> Self {
10809            std::default::Default::default()
10810        }
10811
10812        /// Sets the value of [dataset][crate::model::data_discovery_result::BigQueryPublishing::dataset].
10813        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10814            self.dataset = v.into();
10815            self
10816        }
10817
10818        /// Sets the value of [location][crate::model::data_discovery_result::BigQueryPublishing::location].
10819        pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10820            self.location = v.into();
10821            self
10822        }
10823    }
10824
10825    impl wkt::message::Message for BigQueryPublishing {
10826        fn typename() -> &'static str {
10827            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing"
10828        }
10829    }
10830
10831    /// Describes result statistics of a data scan discovery job.
10832    #[derive(Clone, Default, PartialEq)]
10833    #[non_exhaustive]
10834    pub struct ScanStatistics {
10835        /// The number of files scanned.
10836        pub scanned_file_count: i32,
10837
10838        /// The data processed in bytes.
10839        pub data_processed_bytes: i64,
10840
10841        /// The number of files excluded.
10842        pub files_excluded: i32,
10843
10844        /// The number of tables created.
10845        pub tables_created: i32,
10846
10847        /// The number of tables deleted.
10848        pub tables_deleted: i32,
10849
10850        /// The number of tables updated.
10851        pub tables_updated: i32,
10852
10853        /// The number of filesets created.
10854        pub filesets_created: i32,
10855
10856        /// The number of filesets deleted.
10857        pub filesets_deleted: i32,
10858
10859        /// The number of filesets updated.
10860        pub filesets_updated: i32,
10861
10862        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10863    }
10864
10865    impl ScanStatistics {
10866        pub fn new() -> Self {
10867            std::default::Default::default()
10868        }
10869
10870        /// Sets the value of [scanned_file_count][crate::model::data_discovery_result::ScanStatistics::scanned_file_count].
10871        pub fn set_scanned_file_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10872            self.scanned_file_count = v.into();
10873            self
10874        }
10875
10876        /// Sets the value of [data_processed_bytes][crate::model::data_discovery_result::ScanStatistics::data_processed_bytes].
10877        pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10878            self.data_processed_bytes = v.into();
10879            self
10880        }
10881
10882        /// Sets the value of [files_excluded][crate::model::data_discovery_result::ScanStatistics::files_excluded].
10883        pub fn set_files_excluded<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10884            self.files_excluded = v.into();
10885            self
10886        }
10887
10888        /// Sets the value of [tables_created][crate::model::data_discovery_result::ScanStatistics::tables_created].
10889        pub fn set_tables_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10890            self.tables_created = v.into();
10891            self
10892        }
10893
10894        /// Sets the value of [tables_deleted][crate::model::data_discovery_result::ScanStatistics::tables_deleted].
10895        pub fn set_tables_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10896            self.tables_deleted = v.into();
10897            self
10898        }
10899
10900        /// Sets the value of [tables_updated][crate::model::data_discovery_result::ScanStatistics::tables_updated].
10901        pub fn set_tables_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10902            self.tables_updated = v.into();
10903            self
10904        }
10905
10906        /// Sets the value of [filesets_created][crate::model::data_discovery_result::ScanStatistics::filesets_created].
10907        pub fn set_filesets_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10908            self.filesets_created = v.into();
10909            self
10910        }
10911
10912        /// Sets the value of [filesets_deleted][crate::model::data_discovery_result::ScanStatistics::filesets_deleted].
10913        pub fn set_filesets_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10914            self.filesets_deleted = v.into();
10915            self
10916        }
10917
10918        /// Sets the value of [filesets_updated][crate::model::data_discovery_result::ScanStatistics::filesets_updated].
10919        pub fn set_filesets_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10920            self.filesets_updated = v.into();
10921            self
10922        }
10923    }
10924
10925    impl wkt::message::Message for ScanStatistics {
10926        fn typename() -> &'static str {
10927            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatistics"
10928        }
10929    }
10930}
10931
10932/// DataDocumentation scan related spec.
10933#[derive(Clone, Default, PartialEq)]
10934#[non_exhaustive]
10935pub struct DataDocumentationSpec {
10936    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10937}
10938
10939impl DataDocumentationSpec {
10940    pub fn new() -> Self {
10941        std::default::Default::default()
10942    }
10943}
10944
10945impl wkt::message::Message for DataDocumentationSpec {
10946    fn typename() -> &'static str {
10947        "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationSpec"
10948    }
10949}
10950
10951/// The output of a DataDocumentation scan.
10952#[derive(Clone, Default, PartialEq)]
10953#[non_exhaustive]
10954pub struct DataDocumentationResult {
10955    /// The result of the data documentation scan.
10956    pub result: std::option::Option<crate::model::data_documentation_result::Result>,
10957
10958    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10959}
10960
10961impl DataDocumentationResult {
10962    pub fn new() -> Self {
10963        std::default::Default::default()
10964    }
10965
10966    /// Sets the value of [result][crate::model::DataDocumentationResult::result].
10967    ///
10968    /// Note that all the setters affecting `result` are mutually
10969    /// exclusive.
10970    pub fn set_result<
10971        T: std::convert::Into<std::option::Option<crate::model::data_documentation_result::Result>>,
10972    >(
10973        mut self,
10974        v: T,
10975    ) -> Self {
10976        self.result = v.into();
10977        self
10978    }
10979
10980    /// The value of [result][crate::model::DataDocumentationResult::result]
10981    /// if it holds a `TableResult`, `None` if the field is not set or
10982    /// holds a different branch.
10983    pub fn table_result(
10984        &self,
10985    ) -> std::option::Option<&std::boxed::Box<crate::model::data_documentation_result::TableResult>>
10986    {
10987        #[allow(unreachable_patterns)]
10988        self.result.as_ref().and_then(|v| match v {
10989            crate::model::data_documentation_result::Result::TableResult(v) => {
10990                std::option::Option::Some(v)
10991            }
10992            _ => std::option::Option::None,
10993        })
10994    }
10995
10996    /// Sets the value of [result][crate::model::DataDocumentationResult::result]
10997    /// to hold a `TableResult`.
10998    ///
10999    /// Note that all the setters affecting `result` are
11000    /// mutually exclusive.
11001    pub fn set_table_result<
11002        T: std::convert::Into<std::boxed::Box<crate::model::data_documentation_result::TableResult>>,
11003    >(
11004        mut self,
11005        v: T,
11006    ) -> Self {
11007        self.result = std::option::Option::Some(
11008            crate::model::data_documentation_result::Result::TableResult(v.into()),
11009        );
11010        self
11011    }
11012}
11013
11014impl wkt::message::Message for DataDocumentationResult {
11015    fn typename() -> &'static str {
11016        "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult"
11017    }
11018}
11019
11020/// Defines additional types related to [DataDocumentationResult].
11021pub mod data_documentation_result {
11022    #[allow(unused_imports)]
11023    use super::*;
11024
11025    /// Generated metadata about the table.
11026    #[derive(Clone, Default, PartialEq)]
11027    #[non_exhaustive]
11028    pub struct TableResult {
11029        /// Output only. The service-qualified full resource name of the cloud
11030        /// resource. Ex:
11031        /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
11032        pub name: std::string::String,
11033
11034        /// Output only. Generated description of the table.
11035        pub overview: std::string::String,
11036
11037        /// Output only. Schema of the table with generated metadata of the columns
11038        /// in the schema.
11039        pub schema: std::option::Option<crate::model::data_documentation_result::Schema>,
11040
11041        /// Output only. Sample SQL queries for the table.
11042        pub queries: std::vec::Vec<crate::model::data_documentation_result::Query>,
11043
11044        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11045    }
11046
11047    impl TableResult {
11048        pub fn new() -> Self {
11049            std::default::Default::default()
11050        }
11051
11052        /// Sets the value of [name][crate::model::data_documentation_result::TableResult::name].
11053        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11054            self.name = v.into();
11055            self
11056        }
11057
11058        /// Sets the value of [overview][crate::model::data_documentation_result::TableResult::overview].
11059        pub fn set_overview<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11060            self.overview = v.into();
11061            self
11062        }
11063
11064        /// Sets the value of [schema][crate::model::data_documentation_result::TableResult::schema].
11065        pub fn set_schema<T>(mut self, v: T) -> Self
11066        where
11067            T: std::convert::Into<crate::model::data_documentation_result::Schema>,
11068        {
11069            self.schema = std::option::Option::Some(v.into());
11070            self
11071        }
11072
11073        /// Sets or clears the value of [schema][crate::model::data_documentation_result::TableResult::schema].
11074        pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
11075        where
11076            T: std::convert::Into<crate::model::data_documentation_result::Schema>,
11077        {
11078            self.schema = v.map(|x| x.into());
11079            self
11080        }
11081
11082        /// Sets the value of [queries][crate::model::data_documentation_result::TableResult::queries].
11083        pub fn set_queries<T, V>(mut self, v: T) -> Self
11084        where
11085            T: std::iter::IntoIterator<Item = V>,
11086            V: std::convert::Into<crate::model::data_documentation_result::Query>,
11087        {
11088            use std::iter::Iterator;
11089            self.queries = v.into_iter().map(|i| i.into()).collect();
11090            self
11091        }
11092    }
11093
11094    impl wkt::message::Message for TableResult {
11095        fn typename() -> &'static str {
11096            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.TableResult"
11097        }
11098    }
11099
11100    /// A sample SQL query in data documentation.
11101    #[derive(Clone, Default, PartialEq)]
11102    #[non_exhaustive]
11103    pub struct Query {
11104        /// Output only. The SQL query string which can be executed.
11105        pub sql: std::string::String,
11106
11107        /// Output only. The description for the query.
11108        pub description: std::string::String,
11109
11110        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11111    }
11112
11113    impl Query {
11114        pub fn new() -> Self {
11115            std::default::Default::default()
11116        }
11117
11118        /// Sets the value of [sql][crate::model::data_documentation_result::Query::sql].
11119        pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11120            self.sql = v.into();
11121            self
11122        }
11123
11124        /// Sets the value of [description][crate::model::data_documentation_result::Query::description].
11125        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11126            self.description = v.into();
11127            self
11128        }
11129    }
11130
11131    impl wkt::message::Message for Query {
11132        fn typename() -> &'static str {
11133            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Query"
11134        }
11135    }
11136
11137    /// Schema of the table with generated metadata of columns.
11138    #[derive(Clone, Default, PartialEq)]
11139    #[non_exhaustive]
11140    pub struct Schema {
11141        /// Output only. The list of columns.
11142        pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
11143
11144        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11145    }
11146
11147    impl Schema {
11148        pub fn new() -> Self {
11149            std::default::Default::default()
11150        }
11151
11152        /// Sets the value of [fields][crate::model::data_documentation_result::Schema::fields].
11153        pub fn set_fields<T, V>(mut self, v: T) -> Self
11154        where
11155            T: std::iter::IntoIterator<Item = V>,
11156            V: std::convert::Into<crate::model::data_documentation_result::Field>,
11157        {
11158            use std::iter::Iterator;
11159            self.fields = v.into_iter().map(|i| i.into()).collect();
11160            self
11161        }
11162    }
11163
11164    impl wkt::message::Message for Schema {
11165        fn typename() -> &'static str {
11166            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Schema"
11167        }
11168    }
11169
11170    /// Column of a table with generated metadata and nested fields.
11171    #[derive(Clone, Default, PartialEq)]
11172    #[non_exhaustive]
11173    pub struct Field {
11174        /// Output only. The name of the column.
11175        pub name: std::string::String,
11176
11177        /// Output only. Generated description for columns and fields.
11178        pub description: std::string::String,
11179
11180        /// Output only. Nested fields.
11181        pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
11182
11183        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11184    }
11185
11186    impl Field {
11187        pub fn new() -> Self {
11188            std::default::Default::default()
11189        }
11190
11191        /// Sets the value of [name][crate::model::data_documentation_result::Field::name].
11192        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11193            self.name = v.into();
11194            self
11195        }
11196
11197        /// Sets the value of [description][crate::model::data_documentation_result::Field::description].
11198        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11199            self.description = v.into();
11200            self
11201        }
11202
11203        /// Sets the value of [fields][crate::model::data_documentation_result::Field::fields].
11204        pub fn set_fields<T, V>(mut self, v: T) -> Self
11205        where
11206            T: std::iter::IntoIterator<Item = V>,
11207            V: std::convert::Into<crate::model::data_documentation_result::Field>,
11208        {
11209            use std::iter::Iterator;
11210            self.fields = v.into_iter().map(|i| i.into()).collect();
11211            self
11212        }
11213    }
11214
11215    impl wkt::message::Message for Field {
11216        fn typename() -> &'static str {
11217            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Field"
11218        }
11219    }
11220
11221    /// The result of the data documentation scan.
11222    #[derive(Clone, Debug, PartialEq)]
11223    #[non_exhaustive]
11224    pub enum Result {
11225        /// Output only. Table result for insights.
11226        TableResult(std::boxed::Box<crate::model::data_documentation_result::TableResult>),
11227    }
11228}
11229
11230/// DataProfileScan related setting.
11231#[derive(Clone, Default, PartialEq)]
11232#[non_exhaustive]
11233pub struct DataProfileSpec {
11234    /// Optional. The percentage of the records to be selected from the dataset for
11235    /// DataScan.
11236    ///
11237    /// * Value can range between 0.0 and 100.0 with up to 3 significant decimal
11238    ///   digits.
11239    /// * Sampling is not applied if `sampling_percent` is not specified, 0 or
11240    ///
11241    pub sampling_percent: f32,
11242
11243    /// Optional. A filter applied to all rows in a single DataScan job.
11244    /// The filter needs to be a valid SQL expression for a WHERE clause in
11245    /// BigQuery standard SQL syntax.
11246    /// Example: col1 >= 0 AND col2 < 10
11247    pub row_filter: std::string::String,
11248
11249    /// Optional. Actions to take upon job completion..
11250    pub post_scan_actions: std::option::Option<crate::model::data_profile_spec::PostScanActions>,
11251
11252    /// Optional. The fields to include in data profile.
11253    ///
11254    /// If not specified, all fields at the time of profile scan job execution are
11255    /// included, except for ones listed in `exclude_fields`.
11256    pub include_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
11257
11258    /// Optional. The fields to exclude from data profile.
11259    ///
11260    /// If specified, the fields will be excluded from data profile, regardless of
11261    /// `include_fields` value.
11262    pub exclude_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
11263
11264    /// Optional. If set, the latest DataScan job result will be published as
11265    /// Dataplex Universal Catalog metadata.
11266    pub catalog_publishing_enabled: bool,
11267
11268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11269}
11270
11271impl DataProfileSpec {
11272    pub fn new() -> Self {
11273        std::default::Default::default()
11274    }
11275
11276    /// Sets the value of [sampling_percent][crate::model::DataProfileSpec::sampling_percent].
11277    pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
11278        self.sampling_percent = v.into();
11279        self
11280    }
11281
11282    /// Sets the value of [row_filter][crate::model::DataProfileSpec::row_filter].
11283    pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11284        self.row_filter = v.into();
11285        self
11286    }
11287
11288    /// Sets the value of [post_scan_actions][crate::model::DataProfileSpec::post_scan_actions].
11289    pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
11290    where
11291        T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
11292    {
11293        self.post_scan_actions = std::option::Option::Some(v.into());
11294        self
11295    }
11296
11297    /// Sets or clears the value of [post_scan_actions][crate::model::DataProfileSpec::post_scan_actions].
11298    pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
11299    where
11300        T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
11301    {
11302        self.post_scan_actions = v.map(|x| x.into());
11303        self
11304    }
11305
11306    /// Sets the value of [include_fields][crate::model::DataProfileSpec::include_fields].
11307    pub fn set_include_fields<T>(mut self, v: T) -> Self
11308    where
11309        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11310    {
11311        self.include_fields = std::option::Option::Some(v.into());
11312        self
11313    }
11314
11315    /// Sets or clears the value of [include_fields][crate::model::DataProfileSpec::include_fields].
11316    pub fn set_or_clear_include_fields<T>(mut self, v: std::option::Option<T>) -> Self
11317    where
11318        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11319    {
11320        self.include_fields = v.map(|x| x.into());
11321        self
11322    }
11323
11324    /// Sets the value of [exclude_fields][crate::model::DataProfileSpec::exclude_fields].
11325    pub fn set_exclude_fields<T>(mut self, v: T) -> Self
11326    where
11327        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11328    {
11329        self.exclude_fields = std::option::Option::Some(v.into());
11330        self
11331    }
11332
11333    /// Sets or clears the value of [exclude_fields][crate::model::DataProfileSpec::exclude_fields].
11334    pub fn set_or_clear_exclude_fields<T>(mut self, v: std::option::Option<T>) -> Self
11335    where
11336        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11337    {
11338        self.exclude_fields = v.map(|x| x.into());
11339        self
11340    }
11341
11342    /// Sets the value of [catalog_publishing_enabled][crate::model::DataProfileSpec::catalog_publishing_enabled].
11343    pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11344        self.catalog_publishing_enabled = v.into();
11345        self
11346    }
11347}
11348
11349impl wkt::message::Message for DataProfileSpec {
11350    fn typename() -> &'static str {
11351        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec"
11352    }
11353}
11354
11355/// Defines additional types related to [DataProfileSpec].
11356pub mod data_profile_spec {
11357    #[allow(unused_imports)]
11358    use super::*;
11359
11360    /// The configuration of post scan actions of DataProfileScan job.
11361    #[derive(Clone, Default, PartialEq)]
11362    #[non_exhaustive]
11363    pub struct PostScanActions {
11364        /// Optional. If set, results will be exported to the provided BigQuery
11365        /// table.
11366        pub bigquery_export:
11367            std::option::Option<crate::model::data_profile_spec::post_scan_actions::BigQueryExport>,
11368
11369        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11370    }
11371
11372    impl PostScanActions {
11373        pub fn new() -> Self {
11374            std::default::Default::default()
11375        }
11376
11377        /// Sets the value of [bigquery_export][crate::model::data_profile_spec::PostScanActions::bigquery_export].
11378        pub fn set_bigquery_export<T>(mut self, v: T) -> Self
11379        where
11380            T: std::convert::Into<
11381                    crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
11382                >,
11383        {
11384            self.bigquery_export = std::option::Option::Some(v.into());
11385            self
11386        }
11387
11388        /// Sets or clears the value of [bigquery_export][crate::model::data_profile_spec::PostScanActions::bigquery_export].
11389        pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
11390        where
11391            T: std::convert::Into<
11392                    crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
11393                >,
11394        {
11395            self.bigquery_export = v.map(|x| x.into());
11396            self
11397        }
11398    }
11399
11400    impl wkt::message::Message for PostScanActions {
11401        fn typename() -> &'static str {
11402            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions"
11403        }
11404    }
11405
11406    /// Defines additional types related to [PostScanActions].
11407    pub mod post_scan_actions {
11408        #[allow(unused_imports)]
11409        use super::*;
11410
11411        /// The configuration of BigQuery export post scan action.
11412        #[derive(Clone, Default, PartialEq)]
11413        #[non_exhaustive]
11414        pub struct BigQueryExport {
11415            /// Optional. The BigQuery table to export DataProfileScan results to.
11416            /// Format:
11417            /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
11418            pub results_table: std::string::String,
11419
11420            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11421        }
11422
11423        impl BigQueryExport {
11424            pub fn new() -> Self {
11425                std::default::Default::default()
11426            }
11427
11428            /// Sets the value of [results_table][crate::model::data_profile_spec::post_scan_actions::BigQueryExport::results_table].
11429            pub fn set_results_table<T: std::convert::Into<std::string::String>>(
11430                mut self,
11431                v: T,
11432            ) -> Self {
11433                self.results_table = v.into();
11434                self
11435            }
11436        }
11437
11438        impl wkt::message::Message for BigQueryExport {
11439            fn typename() -> &'static str {
11440                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport"
11441            }
11442        }
11443    }
11444
11445    /// The specification for fields to include or exclude in data profile scan.
11446    #[derive(Clone, Default, PartialEq)]
11447    #[non_exhaustive]
11448    pub struct SelectedFields {
11449        /// Optional. Expected input is a list of fully qualified names of fields as
11450        /// in the schema.
11451        ///
11452        /// Only top-level field names for nested fields are supported.
11453        /// For instance, if 'x' is of nested field type, listing 'x' is supported
11454        /// but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
11455        /// 'x'.
11456        pub field_names: std::vec::Vec<std::string::String>,
11457
11458        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11459    }
11460
11461    impl SelectedFields {
11462        pub fn new() -> Self {
11463            std::default::Default::default()
11464        }
11465
11466        /// Sets the value of [field_names][crate::model::data_profile_spec::SelectedFields::field_names].
11467        pub fn set_field_names<T, V>(mut self, v: T) -> Self
11468        where
11469            T: std::iter::IntoIterator<Item = V>,
11470            V: std::convert::Into<std::string::String>,
11471        {
11472            use std::iter::Iterator;
11473            self.field_names = v.into_iter().map(|i| i.into()).collect();
11474            self
11475        }
11476    }
11477
11478    impl wkt::message::Message for SelectedFields {
11479        fn typename() -> &'static str {
11480            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.SelectedFields"
11481        }
11482    }
11483}
11484
11485/// DataProfileResult defines the output of DataProfileScan. Each field of the
11486/// table will have field type specific profile result.
11487#[derive(Clone, Default, PartialEq)]
11488#[non_exhaustive]
11489pub struct DataProfileResult {
11490    /// Output only. The count of rows scanned.
11491    pub row_count: i64,
11492
11493    /// Output only. The profile information per field.
11494    pub profile: std::option::Option<crate::model::data_profile_result::Profile>,
11495
11496    /// Output only. The data scanned for this result.
11497    pub scanned_data: std::option::Option<crate::model::ScannedData>,
11498
11499    /// Output only. The result of post scan actions.
11500    pub post_scan_actions_result:
11501        std::option::Option<crate::model::data_profile_result::PostScanActionsResult>,
11502
11503    /// Output only. The status of publishing the data scan as Dataplex Universal
11504    /// Catalog metadata.
11505    pub catalog_publishing_status:
11506        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
11507
11508    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11509}
11510
11511impl DataProfileResult {
11512    pub fn new() -> Self {
11513        std::default::Default::default()
11514    }
11515
11516    /// Sets the value of [row_count][crate::model::DataProfileResult::row_count].
11517    pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11518        self.row_count = v.into();
11519        self
11520    }
11521
11522    /// Sets the value of [profile][crate::model::DataProfileResult::profile].
11523    pub fn set_profile<T>(mut self, v: T) -> Self
11524    where
11525        T: std::convert::Into<crate::model::data_profile_result::Profile>,
11526    {
11527        self.profile = std::option::Option::Some(v.into());
11528        self
11529    }
11530
11531    /// Sets or clears the value of [profile][crate::model::DataProfileResult::profile].
11532    pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
11533    where
11534        T: std::convert::Into<crate::model::data_profile_result::Profile>,
11535    {
11536        self.profile = v.map(|x| x.into());
11537        self
11538    }
11539
11540    /// Sets the value of [scanned_data][crate::model::DataProfileResult::scanned_data].
11541    pub fn set_scanned_data<T>(mut self, v: T) -> Self
11542    where
11543        T: std::convert::Into<crate::model::ScannedData>,
11544    {
11545        self.scanned_data = std::option::Option::Some(v.into());
11546        self
11547    }
11548
11549    /// Sets or clears the value of [scanned_data][crate::model::DataProfileResult::scanned_data].
11550    pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
11551    where
11552        T: std::convert::Into<crate::model::ScannedData>,
11553    {
11554        self.scanned_data = v.map(|x| x.into());
11555        self
11556    }
11557
11558    /// Sets the value of [post_scan_actions_result][crate::model::DataProfileResult::post_scan_actions_result].
11559    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
11560    where
11561        T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
11562    {
11563        self.post_scan_actions_result = std::option::Option::Some(v.into());
11564        self
11565    }
11566
11567    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataProfileResult::post_scan_actions_result].
11568    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
11569    where
11570        T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
11571    {
11572        self.post_scan_actions_result = v.map(|x| x.into());
11573        self
11574    }
11575
11576    /// Sets the value of [catalog_publishing_status][crate::model::DataProfileResult::catalog_publishing_status].
11577    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
11578    where
11579        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
11580    {
11581        self.catalog_publishing_status = std::option::Option::Some(v.into());
11582        self
11583    }
11584
11585    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataProfileResult::catalog_publishing_status].
11586    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
11587    where
11588        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
11589    {
11590        self.catalog_publishing_status = v.map(|x| x.into());
11591        self
11592    }
11593}
11594
11595impl wkt::message::Message for DataProfileResult {
11596    fn typename() -> &'static str {
11597        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult"
11598    }
11599}
11600
11601/// Defines additional types related to [DataProfileResult].
11602pub mod data_profile_result {
11603    #[allow(unused_imports)]
11604    use super::*;
11605
11606    /// Contains name, type, mode and field type specific profile information.
11607    #[derive(Clone, Default, PartialEq)]
11608    #[non_exhaustive]
11609    pub struct Profile {
11610        /// Output only. List of fields with structural and profile information for
11611        /// each field.
11612        pub fields: std::vec::Vec<crate::model::data_profile_result::profile::Field>,
11613
11614        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11615    }
11616
11617    impl Profile {
11618        pub fn new() -> Self {
11619            std::default::Default::default()
11620        }
11621
11622        /// Sets the value of [fields][crate::model::data_profile_result::Profile::fields].
11623        pub fn set_fields<T, V>(mut self, v: T) -> Self
11624        where
11625            T: std::iter::IntoIterator<Item = V>,
11626            V: std::convert::Into<crate::model::data_profile_result::profile::Field>,
11627        {
11628            use std::iter::Iterator;
11629            self.fields = v.into_iter().map(|i| i.into()).collect();
11630            self
11631        }
11632    }
11633
11634    impl wkt::message::Message for Profile {
11635        fn typename() -> &'static str {
11636            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile"
11637        }
11638    }
11639
11640    /// Defines additional types related to [Profile].
11641    pub mod profile {
11642        #[allow(unused_imports)]
11643        use super::*;
11644
11645        /// A field within a table.
11646        #[derive(Clone, Default, PartialEq)]
11647        #[non_exhaustive]
11648        pub struct Field {
11649            /// Output only. The name of the field.
11650            pub name: std::string::String,
11651
11652            /// Output only. The data type retrieved from the schema of the data
11653            /// source. For instance, for a BigQuery native table, it is the [BigQuery
11654            /// Table
11655            /// Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema).
11656            /// For a Dataplex Universal Catalog Entity, it is the [Entity
11657            /// Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3).
11658            pub r#type: std::string::String,
11659
11660            /// Output only. The mode of the field. Possible values include:
11661            ///
11662            /// * REQUIRED, if it is a required field.
11663            /// * NULLABLE, if it is an optional field.
11664            /// * REPEATED, if it is a repeated field.
11665            pub mode: std::string::String,
11666
11667            /// Output only. Profile information for the corresponding field.
11668            pub profile:
11669                std::option::Option<crate::model::data_profile_result::profile::field::ProfileInfo>,
11670
11671            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11672        }
11673
11674        impl Field {
11675            pub fn new() -> Self {
11676                std::default::Default::default()
11677            }
11678
11679            /// Sets the value of [name][crate::model::data_profile_result::profile::Field::name].
11680            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11681                self.name = v.into();
11682                self
11683            }
11684
11685            /// Sets the value of [r#type][crate::model::data_profile_result::profile::Field::type].
11686            pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11687                self.r#type = v.into();
11688                self
11689            }
11690
11691            /// Sets the value of [mode][crate::model::data_profile_result::profile::Field::mode].
11692            pub fn set_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11693                self.mode = v.into();
11694                self
11695            }
11696
11697            /// Sets the value of [profile][crate::model::data_profile_result::profile::Field::profile].
11698            pub fn set_profile<T>(mut self, v: T) -> Self
11699            where
11700                T: std::convert::Into<
11701                        crate::model::data_profile_result::profile::field::ProfileInfo,
11702                    >,
11703            {
11704                self.profile = std::option::Option::Some(v.into());
11705                self
11706            }
11707
11708            /// Sets or clears the value of [profile][crate::model::data_profile_result::profile::Field::profile].
11709            pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
11710            where
11711                T: std::convert::Into<
11712                        crate::model::data_profile_result::profile::field::ProfileInfo,
11713                    >,
11714            {
11715                self.profile = v.map(|x| x.into());
11716                self
11717            }
11718        }
11719
11720        impl wkt::message::Message for Field {
11721            fn typename() -> &'static str {
11722                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field"
11723            }
11724        }
11725
11726        /// Defines additional types related to [Field].
11727        pub mod field {
11728            #[allow(unused_imports)]
11729            use super::*;
11730
11731            /// The profile information for each field type.
11732            #[derive(Clone, Default, PartialEq)]
11733            #[non_exhaustive]
11734            pub struct ProfileInfo {
11735                /// Output only. Ratio of rows with null value against total scanned
11736                /// rows.
11737                pub null_ratio: f64,
11738
11739                /// Output only. Ratio of rows with distinct values against total scanned
11740                /// rows. Not available for complex non-groupable field type, including
11741                /// RECORD, ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE
11742                /// mode.
11743                pub distinct_ratio: f64,
11744
11745                /// Output only. The list of top N non-null values, frequency and ratio
11746                /// with which they occur in the scanned data. N is 10 or equal to the
11747                /// number of distinct values in the field, whichever is smaller. Not
11748                /// available for complex non-groupable field type, including RECORD,
11749                /// ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode.
11750                pub top_n_values: std::vec::Vec<
11751                    crate::model::data_profile_result::profile::field::profile_info::TopNValue,
11752                >,
11753
11754                /// Structural and profile information for specific field type. Not
11755                /// available, if mode is REPEATABLE.
11756                pub field_info: std::option::Option<
11757                    crate::model::data_profile_result::profile::field::profile_info::FieldInfo,
11758                >,
11759
11760                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11761            }
11762
11763            impl ProfileInfo {
11764                pub fn new() -> Self {
11765                    std::default::Default::default()
11766                }
11767
11768                /// Sets the value of [null_ratio][crate::model::data_profile_result::profile::field::ProfileInfo::null_ratio].
11769                pub fn set_null_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11770                    self.null_ratio = v.into();
11771                    self
11772                }
11773
11774                /// Sets the value of [distinct_ratio][crate::model::data_profile_result::profile::field::ProfileInfo::distinct_ratio].
11775                pub fn set_distinct_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11776                    self.distinct_ratio = v.into();
11777                    self
11778                }
11779
11780                /// Sets the value of [top_n_values][crate::model::data_profile_result::profile::field::ProfileInfo::top_n_values].
11781                pub fn set_top_n_values<T, V>(mut self, v: T) -> Self
11782                where
11783                    T: std::iter::IntoIterator<Item = V>,
11784                    V: std::convert::Into<crate::model::data_profile_result::profile::field::profile_info::TopNValue>
11785                {
11786                    use std::iter::Iterator;
11787                    self.top_n_values = v.into_iter().map(|i| i.into()).collect();
11788                    self
11789                }
11790
11791                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info].
11792                ///
11793                /// Note that all the setters affecting `field_info` are mutually
11794                /// exclusive.
11795                pub fn set_field_info<T: std::convert::Into<std::option::Option<crate::model::data_profile_result::profile::field::profile_info::FieldInfo>>>(mut self, v: T) -> Self
11796                {
11797                    self.field_info = v.into();
11798                    self
11799                }
11800
11801                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
11802                /// if it holds a `StringProfile`, `None` if the field is not set or
11803                /// holds a different branch.
11804                pub fn string_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>>{
11805                    #[allow(unreachable_patterns)]
11806                    self.field_info.as_ref().and_then(|v| match v {
11807                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(v) => std::option::Option::Some(v),
11808                        _ => std::option::Option::None,
11809                    })
11810                }
11811
11812                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
11813                /// to hold a `StringProfile`.
11814                ///
11815                /// Note that all the setters affecting `field_info` are
11816                /// mutually exclusive.
11817                pub fn set_string_profile<T: std::convert::Into<std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>>>(mut self, v: T) -> Self{
11818                    self.field_info = std::option::Option::Some(
11819                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(
11820                            v.into()
11821                        )
11822                    );
11823                    self
11824                }
11825
11826                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
11827                /// if it holds a `IntegerProfile`, `None` if the field is not set or
11828                /// holds a different branch.
11829                pub fn integer_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>>{
11830                    #[allow(unreachable_patterns)]
11831                    self.field_info.as_ref().and_then(|v| match v {
11832                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(v) => std::option::Option::Some(v),
11833                        _ => std::option::Option::None,
11834                    })
11835                }
11836
11837                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
11838                /// to hold a `IntegerProfile`.
11839                ///
11840                /// Note that all the setters affecting `field_info` are
11841                /// mutually exclusive.
11842                pub fn set_integer_profile<T: std::convert::Into<std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>>>(mut self, v: T) -> Self{
11843                    self.field_info = std::option::Option::Some(
11844                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(
11845                            v.into()
11846                        )
11847                    );
11848                    self
11849                }
11850
11851                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
11852                /// if it holds a `DoubleProfile`, `None` if the field is not set or
11853                /// holds a different branch.
11854                pub fn double_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>>{
11855                    #[allow(unreachable_patterns)]
11856                    self.field_info.as_ref().and_then(|v| match v {
11857                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(v) => std::option::Option::Some(v),
11858                        _ => std::option::Option::None,
11859                    })
11860                }
11861
11862                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
11863                /// to hold a `DoubleProfile`.
11864                ///
11865                /// Note that all the setters affecting `field_info` are
11866                /// mutually exclusive.
11867                pub fn set_double_profile<T: std::convert::Into<std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>>>(mut self, v: T) -> Self{
11868                    self.field_info = std::option::Option::Some(
11869                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(
11870                            v.into()
11871                        )
11872                    );
11873                    self
11874                }
11875            }
11876
11877            impl wkt::message::Message for ProfileInfo {
11878                fn typename() -> &'static str {
11879                    "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo"
11880                }
11881            }
11882
11883            /// Defines additional types related to [ProfileInfo].
11884            pub mod profile_info {
11885                #[allow(unused_imports)]
11886                use super::*;
11887
11888                /// The profile information for a string type field.
11889                #[derive(Clone, Default, PartialEq)]
11890                #[non_exhaustive]
11891                pub struct StringFieldInfo {
11892                    /// Output only. Minimum length of non-null values in the scanned data.
11893                    pub min_length: i64,
11894
11895                    /// Output only. Maximum length of non-null values in the scanned data.
11896                    pub max_length: i64,
11897
11898                    /// Output only. Average length of non-null values in the scanned data.
11899                    pub average_length: f64,
11900
11901                    pub(crate) _unknown_fields:
11902                        serde_json::Map<std::string::String, serde_json::Value>,
11903                }
11904
11905                impl StringFieldInfo {
11906                    pub fn new() -> Self {
11907                        std::default::Default::default()
11908                    }
11909
11910                    /// Sets the value of [min_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::min_length].
11911                    pub fn set_min_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11912                        self.min_length = v.into();
11913                        self
11914                    }
11915
11916                    /// Sets the value of [max_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::max_length].
11917                    pub fn set_max_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11918                        self.max_length = v.into();
11919                        self
11920                    }
11921
11922                    /// Sets the value of [average_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::average_length].
11923                    pub fn set_average_length<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11924                        self.average_length = v.into();
11925                        self
11926                    }
11927                }
11928
11929                impl wkt::message::Message for StringFieldInfo {
11930                    fn typename() -> &'static str {
11931                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo"
11932                    }
11933                }
11934
11935                /// The profile information for an integer type field.
11936                #[derive(Clone, Default, PartialEq)]
11937                #[non_exhaustive]
11938                pub struct IntegerFieldInfo {
11939                    /// Output only. Average of non-null values in the scanned data. NaN,
11940                    /// if the field has a NaN.
11941                    pub average: f64,
11942
11943                    /// Output only. Standard deviation of non-null values in the scanned
11944                    /// data. NaN, if the field has a NaN.
11945                    pub standard_deviation: f64,
11946
11947                    /// Output only. Minimum of non-null values in the scanned data. NaN,
11948                    /// if the field has a NaN.
11949                    pub min: i64,
11950
11951                    /// Output only. A quartile divides the number of data points into four
11952                    /// parts, or quarters, of more-or-less equal size. Three main
11953                    /// quartiles used are: The first quartile (Q1) splits off the lowest
11954                    /// 25% of data from the highest 75%. It is also known as the lower or
11955                    /// 25th empirical quartile, as 25% of the data is below this point.
11956                    /// The second quartile (Q2) is the median of a data set. So, 50% of
11957                    /// the data lies below this point. The third quartile (Q3) splits off
11958                    /// the highest 25% of data from the lowest 75%. It is known as the
11959                    /// upper or 75th empirical quartile, as 75% of the data lies below
11960                    /// this point. Here, the quartiles is provided as an ordered list of
11961                    /// approximate quartile values for the scanned data, occurring in
11962                    /// order Q1, median, Q3.
11963                    pub quartiles: std::vec::Vec<i64>,
11964
11965                    /// Output only. Maximum of non-null values in the scanned data. NaN,
11966                    /// if the field has a NaN.
11967                    pub max: i64,
11968
11969                    pub(crate) _unknown_fields:
11970                        serde_json::Map<std::string::String, serde_json::Value>,
11971                }
11972
11973                impl IntegerFieldInfo {
11974                    pub fn new() -> Self {
11975                        std::default::Default::default()
11976                    }
11977
11978                    /// Sets the value of [average][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::average].
11979                    pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11980                        self.average = v.into();
11981                        self
11982                    }
11983
11984                    /// Sets the value of [standard_deviation][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::standard_deviation].
11985                    pub fn set_standard_deviation<T: std::convert::Into<f64>>(
11986                        mut self,
11987                        v: T,
11988                    ) -> Self {
11989                        self.standard_deviation = v.into();
11990                        self
11991                    }
11992
11993                    /// Sets the value of [min][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::min].
11994                    pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11995                        self.min = v.into();
11996                        self
11997                    }
11998
11999                    /// Sets the value of [quartiles][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::quartiles].
12000                    pub fn set_quartiles<T, V>(mut self, v: T) -> Self
12001                    where
12002                        T: std::iter::IntoIterator<Item = V>,
12003                        V: std::convert::Into<i64>,
12004                    {
12005                        use std::iter::Iterator;
12006                        self.quartiles = v.into_iter().map(|i| i.into()).collect();
12007                        self
12008                    }
12009
12010                    /// Sets the value of [max][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::max].
12011                    pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12012                        self.max = v.into();
12013                        self
12014                    }
12015                }
12016
12017                impl wkt::message::Message for IntegerFieldInfo {
12018                    fn typename() -> &'static str {
12019                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo"
12020                    }
12021                }
12022
12023                /// The profile information for a double type field.
12024                #[derive(Clone, Default, PartialEq)]
12025                #[non_exhaustive]
12026                pub struct DoubleFieldInfo {
12027                    /// Output only. Average of non-null values in the scanned data. NaN,
12028                    /// if the field has a NaN.
12029                    pub average: f64,
12030
12031                    /// Output only. Standard deviation of non-null values in the scanned
12032                    /// data. NaN, if the field has a NaN.
12033                    pub standard_deviation: f64,
12034
12035                    /// Output only. Minimum of non-null values in the scanned data. NaN,
12036                    /// if the field has a NaN.
12037                    pub min: f64,
12038
12039                    /// Output only. A quartile divides the number of data points into four
12040                    /// parts, or quarters, of more-or-less equal size. Three main
12041                    /// quartiles used are: The first quartile (Q1) splits off the lowest
12042                    /// 25% of data from the highest 75%. It is also known as the lower or
12043                    /// 25th empirical quartile, as 25% of the data is below this point.
12044                    /// The second quartile (Q2) is the median of a data set. So, 50% of
12045                    /// the data lies below this point. The third quartile (Q3) splits off
12046                    /// the highest 25% of data from the lowest 75%. It is known as the
12047                    /// upper or 75th empirical quartile, as 75% of the data lies below
12048                    /// this point. Here, the quartiles is provided as an ordered list of
12049                    /// quartile values for the scanned data, occurring in order Q1,
12050                    /// median, Q3.
12051                    pub quartiles: std::vec::Vec<f64>,
12052
12053                    /// Output only. Maximum of non-null values in the scanned data. NaN,
12054                    /// if the field has a NaN.
12055                    pub max: f64,
12056
12057                    pub(crate) _unknown_fields:
12058                        serde_json::Map<std::string::String, serde_json::Value>,
12059                }
12060
12061                impl DoubleFieldInfo {
12062                    pub fn new() -> Self {
12063                        std::default::Default::default()
12064                    }
12065
12066                    /// Sets the value of [average][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::average].
12067                    pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12068                        self.average = v.into();
12069                        self
12070                    }
12071
12072                    /// Sets the value of [standard_deviation][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::standard_deviation].
12073                    pub fn set_standard_deviation<T: std::convert::Into<f64>>(
12074                        mut self,
12075                        v: T,
12076                    ) -> Self {
12077                        self.standard_deviation = v.into();
12078                        self
12079                    }
12080
12081                    /// Sets the value of [min][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::min].
12082                    pub fn set_min<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12083                        self.min = v.into();
12084                        self
12085                    }
12086
12087                    /// Sets the value of [quartiles][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::quartiles].
12088                    pub fn set_quartiles<T, V>(mut self, v: T) -> Self
12089                    where
12090                        T: std::iter::IntoIterator<Item = V>,
12091                        V: std::convert::Into<f64>,
12092                    {
12093                        use std::iter::Iterator;
12094                        self.quartiles = v.into_iter().map(|i| i.into()).collect();
12095                        self
12096                    }
12097
12098                    /// Sets the value of [max][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::max].
12099                    pub fn set_max<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12100                        self.max = v.into();
12101                        self
12102                    }
12103                }
12104
12105                impl wkt::message::Message for DoubleFieldInfo {
12106                    fn typename() -> &'static str {
12107                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo"
12108                    }
12109                }
12110
12111                /// Top N non-null values in the scanned data.
12112                #[derive(Clone, Default, PartialEq)]
12113                #[non_exhaustive]
12114                pub struct TopNValue {
12115                    /// Output only. String value of a top N non-null value.
12116                    pub value: std::string::String,
12117
12118                    /// Output only. Count of the corresponding value in the scanned data.
12119                    pub count: i64,
12120
12121                    /// Output only. Ratio of the corresponding value in the field against
12122                    /// the total number of rows in the scanned data.
12123                    pub ratio: f64,
12124
12125                    pub(crate) _unknown_fields:
12126                        serde_json::Map<std::string::String, serde_json::Value>,
12127                }
12128
12129                impl TopNValue {
12130                    pub fn new() -> Self {
12131                        std::default::Default::default()
12132                    }
12133
12134                    /// Sets the value of [value][crate::model::data_profile_result::profile::field::profile_info::TopNValue::value].
12135                    pub fn set_value<T: std::convert::Into<std::string::String>>(
12136                        mut self,
12137                        v: T,
12138                    ) -> Self {
12139                        self.value = v.into();
12140                        self
12141                    }
12142
12143                    /// Sets the value of [count][crate::model::data_profile_result::profile::field::profile_info::TopNValue::count].
12144                    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12145                        self.count = v.into();
12146                        self
12147                    }
12148
12149                    /// Sets the value of [ratio][crate::model::data_profile_result::profile::field::profile_info::TopNValue::ratio].
12150                    pub fn set_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12151                        self.ratio = v.into();
12152                        self
12153                    }
12154                }
12155
12156                impl wkt::message::Message for TopNValue {
12157                    fn typename() -> &'static str {
12158                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue"
12159                    }
12160                }
12161
12162                /// Structural and profile information for specific field type. Not
12163                /// available, if mode is REPEATABLE.
12164                #[derive(Clone, Debug, PartialEq)]
12165                #[non_exhaustive]
12166                pub enum FieldInfo {
12167                    /// String type field information.
12168                    StringProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>),
12169                    /// Integer type field information.
12170                    IntegerProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>),
12171                    /// Double type field information.
12172                    DoubleProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>),
12173                }
12174            }
12175        }
12176    }
12177
12178    /// The result of post scan actions of DataProfileScan job.
12179    #[derive(Clone, Default, PartialEq)]
12180    #[non_exhaustive]
12181    pub struct PostScanActionsResult {
12182        /// Output only. The result of BigQuery export post scan action.
12183        pub bigquery_export_result: std::option::Option<
12184            crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult,
12185        >,
12186
12187        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12188    }
12189
12190    impl PostScanActionsResult {
12191        pub fn new() -> Self {
12192            std::default::Default::default()
12193        }
12194
12195        /// Sets the value of [bigquery_export_result][crate::model::data_profile_result::PostScanActionsResult::bigquery_export_result].
12196        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
12197        where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
12198        {
12199            self.bigquery_export_result = std::option::Option::Some(v.into());
12200            self
12201        }
12202
12203        /// Sets or clears the value of [bigquery_export_result][crate::model::data_profile_result::PostScanActionsResult::bigquery_export_result].
12204        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
12205        where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
12206        {
12207            self.bigquery_export_result = v.map(|x| x.into());
12208            self
12209        }
12210    }
12211
12212    impl wkt::message::Message for PostScanActionsResult {
12213        fn typename() -> &'static str {
12214            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult"
12215        }
12216    }
12217
12218    /// Defines additional types related to [PostScanActionsResult].
12219    pub mod post_scan_actions_result {
12220        #[allow(unused_imports)]
12221        use super::*;
12222
12223        /// The result of BigQuery export post scan action.
12224        #[derive(Clone, Default, PartialEq)]
12225        #[non_exhaustive]
12226        pub struct BigQueryExportResult {
12227
12228            /// Output only. Execution state for the BigQuery exporting.
12229            pub state: crate::model::data_profile_result::post_scan_actions_result::big_query_export_result::State,
12230
12231            /// Output only. Additional information about the BigQuery exporting.
12232            pub message: std::string::String,
12233
12234            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12235        }
12236
12237        impl BigQueryExportResult {
12238            pub fn new() -> Self {
12239                std::default::Default::default()
12240            }
12241
12242            /// Sets the value of [state][crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult::state].
12243            pub fn set_state<T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::big_query_export_result::State>>(mut self, v: T) -> Self{
12244                self.state = v.into();
12245                self
12246            }
12247
12248            /// Sets the value of [message][crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult::message].
12249            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12250                self.message = v.into();
12251                self
12252            }
12253        }
12254
12255        impl wkt::message::Message for BigQueryExportResult {
12256            fn typename() -> &'static str {
12257                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult"
12258            }
12259        }
12260
12261        /// Defines additional types related to [BigQueryExportResult].
12262        pub mod big_query_export_result {
12263            #[allow(unused_imports)]
12264            use super::*;
12265
12266            /// Execution state for the exporting.
12267            ///
12268            /// # Working with unknown values
12269            ///
12270            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12271            /// additional enum variants at any time. Adding new variants is not considered
12272            /// a breaking change. Applications should write their code in anticipation of:
12273            ///
12274            /// - New values appearing in future releases of the client library, **and**
12275            /// - New values received dynamically, without application changes.
12276            ///
12277            /// Please consult the [Working with enums] section in the user guide for some
12278            /// guidelines.
12279            ///
12280            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12281            #[derive(Clone, Debug, PartialEq)]
12282            #[non_exhaustive]
12283            pub enum State {
12284                /// The exporting state is unspecified.
12285                Unspecified,
12286                /// The exporting completed successfully.
12287                Succeeded,
12288                /// The exporting is no longer running due to an error.
12289                Failed,
12290                /// The exporting is skipped due to no valid scan result to export
12291                /// (usually caused by scan failed).
12292                Skipped,
12293                /// If set, the enum was initialized with an unknown value.
12294                ///
12295                /// Applications can examine the value using [State::value] or
12296                /// [State::name].
12297                UnknownValue(state::UnknownValue),
12298            }
12299
12300            #[doc(hidden)]
12301            pub mod state {
12302                #[allow(unused_imports)]
12303                use super::*;
12304                #[derive(Clone, Debug, PartialEq)]
12305                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12306            }
12307
12308            impl State {
12309                /// Gets the enum value.
12310                ///
12311                /// Returns `None` if the enum contains an unknown value deserialized from
12312                /// the string representation of enums.
12313                pub fn value(&self) -> std::option::Option<i32> {
12314                    match self {
12315                        Self::Unspecified => std::option::Option::Some(0),
12316                        Self::Succeeded => std::option::Option::Some(1),
12317                        Self::Failed => std::option::Option::Some(2),
12318                        Self::Skipped => std::option::Option::Some(3),
12319                        Self::UnknownValue(u) => u.0.value(),
12320                    }
12321                }
12322
12323                /// Gets the enum value as a string.
12324                ///
12325                /// Returns `None` if the enum contains an unknown value deserialized from
12326                /// the integer representation of enums.
12327                pub fn name(&self) -> std::option::Option<&str> {
12328                    match self {
12329                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12330                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12331                        Self::Failed => std::option::Option::Some("FAILED"),
12332                        Self::Skipped => std::option::Option::Some("SKIPPED"),
12333                        Self::UnknownValue(u) => u.0.name(),
12334                    }
12335                }
12336            }
12337
12338            impl std::default::Default for State {
12339                fn default() -> Self {
12340                    use std::convert::From;
12341                    Self::from(0)
12342                }
12343            }
12344
12345            impl std::fmt::Display for State {
12346                fn fmt(
12347                    &self,
12348                    f: &mut std::fmt::Formatter<'_>,
12349                ) -> std::result::Result<(), std::fmt::Error> {
12350                    wkt::internal::display_enum(f, self.name(), self.value())
12351                }
12352            }
12353
12354            impl std::convert::From<i32> for State {
12355                fn from(value: i32) -> Self {
12356                    match value {
12357                        0 => Self::Unspecified,
12358                        1 => Self::Succeeded,
12359                        2 => Self::Failed,
12360                        3 => Self::Skipped,
12361                        _ => Self::UnknownValue(state::UnknownValue(
12362                            wkt::internal::UnknownEnumValue::Integer(value),
12363                        )),
12364                    }
12365                }
12366            }
12367
12368            impl std::convert::From<&str> for State {
12369                fn from(value: &str) -> Self {
12370                    use std::string::ToString;
12371                    match value {
12372                        "STATE_UNSPECIFIED" => Self::Unspecified,
12373                        "SUCCEEDED" => Self::Succeeded,
12374                        "FAILED" => Self::Failed,
12375                        "SKIPPED" => Self::Skipped,
12376                        _ => Self::UnknownValue(state::UnknownValue(
12377                            wkt::internal::UnknownEnumValue::String(value.to_string()),
12378                        )),
12379                    }
12380                }
12381            }
12382
12383            impl serde::ser::Serialize for State {
12384                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12385                where
12386                    S: serde::Serializer,
12387                {
12388                    match self {
12389                        Self::Unspecified => serializer.serialize_i32(0),
12390                        Self::Succeeded => serializer.serialize_i32(1),
12391                        Self::Failed => serializer.serialize_i32(2),
12392                        Self::Skipped => serializer.serialize_i32(3),
12393                        Self::UnknownValue(u) => u.0.serialize(serializer),
12394                    }
12395                }
12396            }
12397
12398            impl<'de> serde::de::Deserialize<'de> for State {
12399                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12400                where
12401                    D: serde::Deserializer<'de>,
12402                {
12403                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12404                        ".google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State"))
12405                }
12406            }
12407        }
12408    }
12409}
12410
12411/// DataQualityScan related setting.
12412#[derive(Clone, Default, PartialEq)]
12413#[non_exhaustive]
12414pub struct DataQualitySpec {
12415    /// Required. The list of rules to evaluate against a data source. At least one
12416    /// rule is required.
12417    pub rules: std::vec::Vec<crate::model::DataQualityRule>,
12418
12419    /// Optional. The percentage of the records to be selected from the dataset for
12420    /// DataScan.
12421    ///
12422    /// * Value can range between 0.0 and 100.0 with up to 3 significant decimal
12423    ///   digits.
12424    /// * Sampling is not applied if `sampling_percent` is not specified, 0 or
12425    ///
12426    pub sampling_percent: f32,
12427
12428    /// Optional. A filter applied to all rows in a single DataScan job.
12429    /// The filter needs to be a valid SQL expression for a [WHERE clause in
12430    /// GoogleSQL
12431    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#where_clause).
12432    ///
12433    /// Example: col1 >= 0 AND col2 < 10
12434    pub row_filter: std::string::String,
12435
12436    /// Optional. Actions to take upon job completion.
12437    pub post_scan_actions: std::option::Option<crate::model::data_quality_spec::PostScanActions>,
12438
12439    /// Optional. If set, the latest DataScan job result will be published as
12440    /// Dataplex Universal Catalog metadata.
12441    pub catalog_publishing_enabled: bool,
12442
12443    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12444}
12445
12446impl DataQualitySpec {
12447    pub fn new() -> Self {
12448        std::default::Default::default()
12449    }
12450
12451    /// Sets the value of [rules][crate::model::DataQualitySpec::rules].
12452    pub fn set_rules<T, V>(mut self, v: T) -> Self
12453    where
12454        T: std::iter::IntoIterator<Item = V>,
12455        V: std::convert::Into<crate::model::DataQualityRule>,
12456    {
12457        use std::iter::Iterator;
12458        self.rules = v.into_iter().map(|i| i.into()).collect();
12459        self
12460    }
12461
12462    /// Sets the value of [sampling_percent][crate::model::DataQualitySpec::sampling_percent].
12463    pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12464        self.sampling_percent = v.into();
12465        self
12466    }
12467
12468    /// Sets the value of [row_filter][crate::model::DataQualitySpec::row_filter].
12469    pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12470        self.row_filter = v.into();
12471        self
12472    }
12473
12474    /// Sets the value of [post_scan_actions][crate::model::DataQualitySpec::post_scan_actions].
12475    pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
12476    where
12477        T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
12478    {
12479        self.post_scan_actions = std::option::Option::Some(v.into());
12480        self
12481    }
12482
12483    /// Sets or clears the value of [post_scan_actions][crate::model::DataQualitySpec::post_scan_actions].
12484    pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
12485    where
12486        T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
12487    {
12488        self.post_scan_actions = v.map(|x| x.into());
12489        self
12490    }
12491
12492    /// Sets the value of [catalog_publishing_enabled][crate::model::DataQualitySpec::catalog_publishing_enabled].
12493    pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12494        self.catalog_publishing_enabled = v.into();
12495        self
12496    }
12497}
12498
12499impl wkt::message::Message for DataQualitySpec {
12500    fn typename() -> &'static str {
12501        "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec"
12502    }
12503}
12504
12505/// Defines additional types related to [DataQualitySpec].
12506pub mod data_quality_spec {
12507    #[allow(unused_imports)]
12508    use super::*;
12509
12510    /// The configuration of post scan actions of DataQualityScan.
12511    #[derive(Clone, Default, PartialEq)]
12512    #[non_exhaustive]
12513    pub struct PostScanActions {
12514        /// Optional. If set, results will be exported to the provided BigQuery
12515        /// table.
12516        pub bigquery_export:
12517            std::option::Option<crate::model::data_quality_spec::post_scan_actions::BigQueryExport>,
12518
12519        /// Optional. If set, results will be sent to the provided notification
12520        /// receipts upon triggers.
12521        pub notification_report: std::option::Option<
12522            crate::model::data_quality_spec::post_scan_actions::NotificationReport,
12523        >,
12524
12525        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12526    }
12527
12528    impl PostScanActions {
12529        pub fn new() -> Self {
12530            std::default::Default::default()
12531        }
12532
12533        /// Sets the value of [bigquery_export][crate::model::data_quality_spec::PostScanActions::bigquery_export].
12534        pub fn set_bigquery_export<T>(mut self, v: T) -> Self
12535        where
12536            T: std::convert::Into<
12537                    crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
12538                >,
12539        {
12540            self.bigquery_export = std::option::Option::Some(v.into());
12541            self
12542        }
12543
12544        /// Sets or clears the value of [bigquery_export][crate::model::data_quality_spec::PostScanActions::bigquery_export].
12545        pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
12546        where
12547            T: std::convert::Into<
12548                    crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
12549                >,
12550        {
12551            self.bigquery_export = v.map(|x| x.into());
12552            self
12553        }
12554
12555        /// Sets the value of [notification_report][crate::model::data_quality_spec::PostScanActions::notification_report].
12556        pub fn set_notification_report<T>(mut self, v: T) -> Self
12557        where
12558            T: std::convert::Into<
12559                    crate::model::data_quality_spec::post_scan_actions::NotificationReport,
12560                >,
12561        {
12562            self.notification_report = std::option::Option::Some(v.into());
12563            self
12564        }
12565
12566        /// Sets or clears the value of [notification_report][crate::model::data_quality_spec::PostScanActions::notification_report].
12567        pub fn set_or_clear_notification_report<T>(mut self, v: std::option::Option<T>) -> Self
12568        where
12569            T: std::convert::Into<
12570                    crate::model::data_quality_spec::post_scan_actions::NotificationReport,
12571                >,
12572        {
12573            self.notification_report = v.map(|x| x.into());
12574            self
12575        }
12576    }
12577
12578    impl wkt::message::Message for PostScanActions {
12579        fn typename() -> &'static str {
12580            "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions"
12581        }
12582    }
12583
12584    /// Defines additional types related to [PostScanActions].
12585    pub mod post_scan_actions {
12586        #[allow(unused_imports)]
12587        use super::*;
12588
12589        /// The configuration of BigQuery export post scan action.
12590        #[derive(Clone, Default, PartialEq)]
12591        #[non_exhaustive]
12592        pub struct BigQueryExport {
12593            /// Optional. The BigQuery table to export DataQualityScan results to.
12594            /// Format:
12595            /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
12596            /// or
12597            /// projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
12598            pub results_table: std::string::String,
12599
12600            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12601        }
12602
12603        impl BigQueryExport {
12604            pub fn new() -> Self {
12605                std::default::Default::default()
12606            }
12607
12608            /// Sets the value of [results_table][crate::model::data_quality_spec::post_scan_actions::BigQueryExport::results_table].
12609            pub fn set_results_table<T: std::convert::Into<std::string::String>>(
12610                mut self,
12611                v: T,
12612            ) -> Self {
12613                self.results_table = v.into();
12614                self
12615            }
12616        }
12617
12618        impl wkt::message::Message for BigQueryExport {
12619            fn typename() -> &'static str {
12620                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport"
12621            }
12622        }
12623
12624        /// The individuals or groups who are designated to receive notifications
12625        /// upon triggers.
12626        #[derive(Clone, Default, PartialEq)]
12627        #[non_exhaustive]
12628        pub struct Recipients {
12629            /// Optional. The email recipients who will receive the DataQualityScan
12630            /// results report.
12631            pub emails: std::vec::Vec<std::string::String>,
12632
12633            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12634        }
12635
12636        impl Recipients {
12637            pub fn new() -> Self {
12638                std::default::Default::default()
12639            }
12640
12641            /// Sets the value of [emails][crate::model::data_quality_spec::post_scan_actions::Recipients::emails].
12642            pub fn set_emails<T, V>(mut self, v: T) -> Self
12643            where
12644                T: std::iter::IntoIterator<Item = V>,
12645                V: std::convert::Into<std::string::String>,
12646            {
12647                use std::iter::Iterator;
12648                self.emails = v.into_iter().map(|i| i.into()).collect();
12649                self
12650            }
12651        }
12652
12653        impl wkt::message::Message for Recipients {
12654            fn typename() -> &'static str {
12655                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients"
12656            }
12657        }
12658
12659        /// This trigger is triggered when the DQ score in the job result is less
12660        /// than a specified input score.
12661        #[derive(Clone, Default, PartialEq)]
12662        #[non_exhaustive]
12663        pub struct ScoreThresholdTrigger {
12664            /// Optional. The score range is in [0,100].
12665            pub score_threshold: f32,
12666
12667            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12668        }
12669
12670        impl ScoreThresholdTrigger {
12671            pub fn new() -> Self {
12672                std::default::Default::default()
12673            }
12674
12675            /// Sets the value of [score_threshold][crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger::score_threshold].
12676            pub fn set_score_threshold<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12677                self.score_threshold = v.into();
12678                self
12679            }
12680        }
12681
12682        impl wkt::message::Message for ScoreThresholdTrigger {
12683            fn typename() -> &'static str {
12684                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger"
12685            }
12686        }
12687
12688        /// This trigger is triggered when the scan job itself fails, regardless of
12689        /// the result.
12690        #[derive(Clone, Default, PartialEq)]
12691        #[non_exhaustive]
12692        pub struct JobFailureTrigger {
12693            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12694        }
12695
12696        impl JobFailureTrigger {
12697            pub fn new() -> Self {
12698                std::default::Default::default()
12699            }
12700        }
12701
12702        impl wkt::message::Message for JobFailureTrigger {
12703            fn typename() -> &'static str {
12704                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger"
12705            }
12706        }
12707
12708        /// This trigger is triggered whenever a scan job run ends, regardless
12709        /// of the result.
12710        #[derive(Clone, Default, PartialEq)]
12711        #[non_exhaustive]
12712        pub struct JobEndTrigger {
12713            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12714        }
12715
12716        impl JobEndTrigger {
12717            pub fn new() -> Self {
12718                std::default::Default::default()
12719            }
12720        }
12721
12722        impl wkt::message::Message for JobEndTrigger {
12723            fn typename() -> &'static str {
12724                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger"
12725            }
12726        }
12727
12728        /// The configuration of notification report post scan action.
12729        #[derive(Clone, Default, PartialEq)]
12730        #[non_exhaustive]
12731        pub struct NotificationReport {
12732            /// Required. The recipients who will receive the notification report.
12733            pub recipients:
12734                std::option::Option<crate::model::data_quality_spec::post_scan_actions::Recipients>,
12735
12736            /// Optional. If set, report will be sent when score threshold is met.
12737            pub score_threshold_trigger: std::option::Option<
12738                crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
12739            >,
12740
12741            /// Optional. If set, report will be sent when a scan job fails.
12742            pub job_failure_trigger: std::option::Option<
12743                crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
12744            >,
12745
12746            /// Optional. If set, report will be sent when a scan job ends.
12747            pub job_end_trigger: std::option::Option<
12748                crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
12749            >,
12750
12751            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12752        }
12753
12754        impl NotificationReport {
12755            pub fn new() -> Self {
12756                std::default::Default::default()
12757            }
12758
12759            /// Sets the value of [recipients][crate::model::data_quality_spec::post_scan_actions::NotificationReport::recipients].
12760            pub fn set_recipients<T>(mut self, v: T) -> Self
12761            where
12762                T: std::convert::Into<
12763                        crate::model::data_quality_spec::post_scan_actions::Recipients,
12764                    >,
12765            {
12766                self.recipients = std::option::Option::Some(v.into());
12767                self
12768            }
12769
12770            /// Sets or clears the value of [recipients][crate::model::data_quality_spec::post_scan_actions::NotificationReport::recipients].
12771            pub fn set_or_clear_recipients<T>(mut self, v: std::option::Option<T>) -> Self
12772            where
12773                T: std::convert::Into<
12774                        crate::model::data_quality_spec::post_scan_actions::Recipients,
12775                    >,
12776            {
12777                self.recipients = v.map(|x| x.into());
12778                self
12779            }
12780
12781            /// Sets the value of [score_threshold_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::score_threshold_trigger].
12782            pub fn set_score_threshold_trigger<T>(mut self, v: T) -> Self
12783            where
12784                T: std::convert::Into<
12785                        crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
12786                    >,
12787            {
12788                self.score_threshold_trigger = std::option::Option::Some(v.into());
12789                self
12790            }
12791
12792            /// Sets or clears the value of [score_threshold_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::score_threshold_trigger].
12793            pub fn set_or_clear_score_threshold_trigger<T>(
12794                mut self,
12795                v: std::option::Option<T>,
12796            ) -> Self
12797            where
12798                T: std::convert::Into<
12799                        crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
12800                    >,
12801            {
12802                self.score_threshold_trigger = v.map(|x| x.into());
12803                self
12804            }
12805
12806            /// Sets the value of [job_failure_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_failure_trigger].
12807            pub fn set_job_failure_trigger<T>(mut self, v: T) -> Self
12808            where
12809                T: std::convert::Into<
12810                        crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
12811                    >,
12812            {
12813                self.job_failure_trigger = std::option::Option::Some(v.into());
12814                self
12815            }
12816
12817            /// Sets or clears the value of [job_failure_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_failure_trigger].
12818            pub fn set_or_clear_job_failure_trigger<T>(mut self, v: std::option::Option<T>) -> Self
12819            where
12820                T: std::convert::Into<
12821                        crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
12822                    >,
12823            {
12824                self.job_failure_trigger = v.map(|x| x.into());
12825                self
12826            }
12827
12828            /// Sets the value of [job_end_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_end_trigger].
12829            pub fn set_job_end_trigger<T>(mut self, v: T) -> Self
12830            where
12831                T: std::convert::Into<
12832                        crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
12833                    >,
12834            {
12835                self.job_end_trigger = std::option::Option::Some(v.into());
12836                self
12837            }
12838
12839            /// Sets or clears the value of [job_end_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_end_trigger].
12840            pub fn set_or_clear_job_end_trigger<T>(mut self, v: std::option::Option<T>) -> Self
12841            where
12842                T: std::convert::Into<
12843                        crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
12844                    >,
12845            {
12846                self.job_end_trigger = v.map(|x| x.into());
12847                self
12848            }
12849        }
12850
12851        impl wkt::message::Message for NotificationReport {
12852            fn typename() -> &'static str {
12853                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport"
12854            }
12855        }
12856    }
12857}
12858
12859/// The output of a DataQualityScan.
12860#[derive(Clone, Default, PartialEq)]
12861#[non_exhaustive]
12862pub struct DataQualityResult {
12863    /// Output only. Overall data quality result -- `true` if all rules passed.
12864    pub passed: bool,
12865
12866    /// Output only. The overall data quality score.
12867    ///
12868    /// The score ranges between [0, 100] (up to two decimal points).
12869    pub score: std::option::Option<f32>,
12870
12871    /// Output only. A list of results at the dimension level.
12872    ///
12873    /// A dimension will have a corresponding `DataQualityDimensionResult` if and
12874    /// only if there is at least one rule with the 'dimension' field set to it.
12875    pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
12876
12877    /// Output only. A list of results at the column level.
12878    ///
12879    /// A column will have a corresponding `DataQualityColumnResult` if and only if
12880    /// there is at least one rule with the 'column' field set to it.
12881    pub columns: std::vec::Vec<crate::model::DataQualityColumnResult>,
12882
12883    /// Output only. A list of all the rules in a job, and their results.
12884    pub rules: std::vec::Vec<crate::model::DataQualityRuleResult>,
12885
12886    /// Output only. The count of rows processed.
12887    pub row_count: i64,
12888
12889    /// Output only. The data scanned for this result.
12890    pub scanned_data: std::option::Option<crate::model::ScannedData>,
12891
12892    /// Output only. The result of post scan actions.
12893    pub post_scan_actions_result:
12894        std::option::Option<crate::model::data_quality_result::PostScanActionsResult>,
12895
12896    /// Output only. The status of publishing the data scan as Dataplex Universal
12897    /// Catalog metadata.
12898    pub catalog_publishing_status:
12899        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
12900
12901    /// Output only. The generated assets for anomaly detection.
12902    pub anomaly_detection_generated_assets:
12903        std::option::Option<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
12904
12905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12906}
12907
12908impl DataQualityResult {
12909    pub fn new() -> Self {
12910        std::default::Default::default()
12911    }
12912
12913    /// Sets the value of [passed][crate::model::DataQualityResult::passed].
12914    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12915        self.passed = v.into();
12916        self
12917    }
12918
12919    /// Sets the value of [score][crate::model::DataQualityResult::score].
12920    pub fn set_score<T>(mut self, v: T) -> Self
12921    where
12922        T: std::convert::Into<f32>,
12923    {
12924        self.score = std::option::Option::Some(v.into());
12925        self
12926    }
12927
12928    /// Sets or clears the value of [score][crate::model::DataQualityResult::score].
12929    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
12930    where
12931        T: std::convert::Into<f32>,
12932    {
12933        self.score = v.map(|x| x.into());
12934        self
12935    }
12936
12937    /// Sets the value of [dimensions][crate::model::DataQualityResult::dimensions].
12938    pub fn set_dimensions<T, V>(mut self, v: T) -> Self
12939    where
12940        T: std::iter::IntoIterator<Item = V>,
12941        V: std::convert::Into<crate::model::DataQualityDimensionResult>,
12942    {
12943        use std::iter::Iterator;
12944        self.dimensions = v.into_iter().map(|i| i.into()).collect();
12945        self
12946    }
12947
12948    /// Sets the value of [columns][crate::model::DataQualityResult::columns].
12949    pub fn set_columns<T, V>(mut self, v: T) -> Self
12950    where
12951        T: std::iter::IntoIterator<Item = V>,
12952        V: std::convert::Into<crate::model::DataQualityColumnResult>,
12953    {
12954        use std::iter::Iterator;
12955        self.columns = v.into_iter().map(|i| i.into()).collect();
12956        self
12957    }
12958
12959    /// Sets the value of [rules][crate::model::DataQualityResult::rules].
12960    pub fn set_rules<T, V>(mut self, v: T) -> Self
12961    where
12962        T: std::iter::IntoIterator<Item = V>,
12963        V: std::convert::Into<crate::model::DataQualityRuleResult>,
12964    {
12965        use std::iter::Iterator;
12966        self.rules = v.into_iter().map(|i| i.into()).collect();
12967        self
12968    }
12969
12970    /// Sets the value of [row_count][crate::model::DataQualityResult::row_count].
12971    pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12972        self.row_count = v.into();
12973        self
12974    }
12975
12976    /// Sets the value of [scanned_data][crate::model::DataQualityResult::scanned_data].
12977    pub fn set_scanned_data<T>(mut self, v: T) -> Self
12978    where
12979        T: std::convert::Into<crate::model::ScannedData>,
12980    {
12981        self.scanned_data = std::option::Option::Some(v.into());
12982        self
12983    }
12984
12985    /// Sets or clears the value of [scanned_data][crate::model::DataQualityResult::scanned_data].
12986    pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
12987    where
12988        T: std::convert::Into<crate::model::ScannedData>,
12989    {
12990        self.scanned_data = v.map(|x| x.into());
12991        self
12992    }
12993
12994    /// Sets the value of [post_scan_actions_result][crate::model::DataQualityResult::post_scan_actions_result].
12995    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
12996    where
12997        T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
12998    {
12999        self.post_scan_actions_result = std::option::Option::Some(v.into());
13000        self
13001    }
13002
13003    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataQualityResult::post_scan_actions_result].
13004    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
13005    where
13006        T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
13007    {
13008        self.post_scan_actions_result = v.map(|x| x.into());
13009        self
13010    }
13011
13012    /// Sets the value of [catalog_publishing_status][crate::model::DataQualityResult::catalog_publishing_status].
13013    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
13014    where
13015        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
13016    {
13017        self.catalog_publishing_status = std::option::Option::Some(v.into());
13018        self
13019    }
13020
13021    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataQualityResult::catalog_publishing_status].
13022    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
13023    where
13024        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
13025    {
13026        self.catalog_publishing_status = v.map(|x| x.into());
13027        self
13028    }
13029
13030    /// Sets the value of [anomaly_detection_generated_assets][crate::model::DataQualityResult::anomaly_detection_generated_assets].
13031    pub fn set_anomaly_detection_generated_assets<T>(mut self, v: T) -> Self
13032    where
13033        T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
13034    {
13035        self.anomaly_detection_generated_assets = std::option::Option::Some(v.into());
13036        self
13037    }
13038
13039    /// Sets or clears the value of [anomaly_detection_generated_assets][crate::model::DataQualityResult::anomaly_detection_generated_assets].
13040    pub fn set_or_clear_anomaly_detection_generated_assets<T>(
13041        mut self,
13042        v: std::option::Option<T>,
13043    ) -> Self
13044    where
13045        T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
13046    {
13047        self.anomaly_detection_generated_assets = v.map(|x| x.into());
13048        self
13049    }
13050}
13051
13052impl wkt::message::Message for DataQualityResult {
13053    fn typename() -> &'static str {
13054        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult"
13055    }
13056}
13057
13058/// Defines additional types related to [DataQualityResult].
13059pub mod data_quality_result {
13060    #[allow(unused_imports)]
13061    use super::*;
13062
13063    /// The result of post scan actions of DataQualityScan job.
13064    #[derive(Clone, Default, PartialEq)]
13065    #[non_exhaustive]
13066    pub struct PostScanActionsResult {
13067        /// Output only. The result of BigQuery export post scan action.
13068        pub bigquery_export_result: std::option::Option<
13069            crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult,
13070        >,
13071
13072        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13073    }
13074
13075    impl PostScanActionsResult {
13076        pub fn new() -> Self {
13077            std::default::Default::default()
13078        }
13079
13080        /// Sets the value of [bigquery_export_result][crate::model::data_quality_result::PostScanActionsResult::bigquery_export_result].
13081        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
13082        where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
13083        {
13084            self.bigquery_export_result = std::option::Option::Some(v.into());
13085            self
13086        }
13087
13088        /// Sets or clears the value of [bigquery_export_result][crate::model::data_quality_result::PostScanActionsResult::bigquery_export_result].
13089        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
13090        where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
13091        {
13092            self.bigquery_export_result = v.map(|x| x.into());
13093            self
13094        }
13095    }
13096
13097    impl wkt::message::Message for PostScanActionsResult {
13098        fn typename() -> &'static str {
13099            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult"
13100        }
13101    }
13102
13103    /// Defines additional types related to [PostScanActionsResult].
13104    pub mod post_scan_actions_result {
13105        #[allow(unused_imports)]
13106        use super::*;
13107
13108        /// The result of BigQuery export post scan action.
13109        #[derive(Clone, Default, PartialEq)]
13110        #[non_exhaustive]
13111        pub struct BigQueryExportResult {
13112
13113            /// Output only. Execution state for the BigQuery exporting.
13114            pub state: crate::model::data_quality_result::post_scan_actions_result::big_query_export_result::State,
13115
13116            /// Output only. Additional information about the BigQuery exporting.
13117            pub message: std::string::String,
13118
13119            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13120        }
13121
13122        impl BigQueryExportResult {
13123            pub fn new() -> Self {
13124                std::default::Default::default()
13125            }
13126
13127            /// Sets the value of [state][crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult::state].
13128            pub fn set_state<T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::big_query_export_result::State>>(mut self, v: T) -> Self{
13129                self.state = v.into();
13130                self
13131            }
13132
13133            /// Sets the value of [message][crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult::message].
13134            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13135                self.message = v.into();
13136                self
13137            }
13138        }
13139
13140        impl wkt::message::Message for BigQueryExportResult {
13141            fn typename() -> &'static str {
13142                "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult"
13143            }
13144        }
13145
13146        /// Defines additional types related to [BigQueryExportResult].
13147        pub mod big_query_export_result {
13148            #[allow(unused_imports)]
13149            use super::*;
13150
13151            /// Execution state for the exporting.
13152            ///
13153            /// # Working with unknown values
13154            ///
13155            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13156            /// additional enum variants at any time. Adding new variants is not considered
13157            /// a breaking change. Applications should write their code in anticipation of:
13158            ///
13159            /// - New values appearing in future releases of the client library, **and**
13160            /// - New values received dynamically, without application changes.
13161            ///
13162            /// Please consult the [Working with enums] section in the user guide for some
13163            /// guidelines.
13164            ///
13165            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13166            #[derive(Clone, Debug, PartialEq)]
13167            #[non_exhaustive]
13168            pub enum State {
13169                /// The exporting state is unspecified.
13170                Unspecified,
13171                /// The exporting completed successfully.
13172                Succeeded,
13173                /// The exporting is no longer running due to an error.
13174                Failed,
13175                /// The exporting is skipped due to no valid scan result to export
13176                /// (usually caused by scan failed).
13177                Skipped,
13178                /// If set, the enum was initialized with an unknown value.
13179                ///
13180                /// Applications can examine the value using [State::value] or
13181                /// [State::name].
13182                UnknownValue(state::UnknownValue),
13183            }
13184
13185            #[doc(hidden)]
13186            pub mod state {
13187                #[allow(unused_imports)]
13188                use super::*;
13189                #[derive(Clone, Debug, PartialEq)]
13190                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13191            }
13192
13193            impl State {
13194                /// Gets the enum value.
13195                ///
13196                /// Returns `None` if the enum contains an unknown value deserialized from
13197                /// the string representation of enums.
13198                pub fn value(&self) -> std::option::Option<i32> {
13199                    match self {
13200                        Self::Unspecified => std::option::Option::Some(0),
13201                        Self::Succeeded => std::option::Option::Some(1),
13202                        Self::Failed => std::option::Option::Some(2),
13203                        Self::Skipped => std::option::Option::Some(3),
13204                        Self::UnknownValue(u) => u.0.value(),
13205                    }
13206                }
13207
13208                /// Gets the enum value as a string.
13209                ///
13210                /// Returns `None` if the enum contains an unknown value deserialized from
13211                /// the integer representation of enums.
13212                pub fn name(&self) -> std::option::Option<&str> {
13213                    match self {
13214                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13215                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
13216                        Self::Failed => std::option::Option::Some("FAILED"),
13217                        Self::Skipped => std::option::Option::Some("SKIPPED"),
13218                        Self::UnknownValue(u) => u.0.name(),
13219                    }
13220                }
13221            }
13222
13223            impl std::default::Default for State {
13224                fn default() -> Self {
13225                    use std::convert::From;
13226                    Self::from(0)
13227                }
13228            }
13229
13230            impl std::fmt::Display for State {
13231                fn fmt(
13232                    &self,
13233                    f: &mut std::fmt::Formatter<'_>,
13234                ) -> std::result::Result<(), std::fmt::Error> {
13235                    wkt::internal::display_enum(f, self.name(), self.value())
13236                }
13237            }
13238
13239            impl std::convert::From<i32> for State {
13240                fn from(value: i32) -> Self {
13241                    match value {
13242                        0 => Self::Unspecified,
13243                        1 => Self::Succeeded,
13244                        2 => Self::Failed,
13245                        3 => Self::Skipped,
13246                        _ => Self::UnknownValue(state::UnknownValue(
13247                            wkt::internal::UnknownEnumValue::Integer(value),
13248                        )),
13249                    }
13250                }
13251            }
13252
13253            impl std::convert::From<&str> for State {
13254                fn from(value: &str) -> Self {
13255                    use std::string::ToString;
13256                    match value {
13257                        "STATE_UNSPECIFIED" => Self::Unspecified,
13258                        "SUCCEEDED" => Self::Succeeded,
13259                        "FAILED" => Self::Failed,
13260                        "SKIPPED" => Self::Skipped,
13261                        _ => Self::UnknownValue(state::UnknownValue(
13262                            wkt::internal::UnknownEnumValue::String(value.to_string()),
13263                        )),
13264                    }
13265                }
13266            }
13267
13268            impl serde::ser::Serialize for State {
13269                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13270                where
13271                    S: serde::Serializer,
13272                {
13273                    match self {
13274                        Self::Unspecified => serializer.serialize_i32(0),
13275                        Self::Succeeded => serializer.serialize_i32(1),
13276                        Self::Failed => serializer.serialize_i32(2),
13277                        Self::Skipped => serializer.serialize_i32(3),
13278                        Self::UnknownValue(u) => u.0.serialize(serializer),
13279                    }
13280                }
13281            }
13282
13283            impl<'de> serde::de::Deserialize<'de> for State {
13284                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13285                where
13286                    D: serde::Deserializer<'de>,
13287                {
13288                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13289                        ".google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State"))
13290                }
13291            }
13292        }
13293    }
13294
13295    /// The assets generated by Anomaly Detection Data Scan.
13296    #[derive(Clone, Default, PartialEq)]
13297    #[non_exhaustive]
13298    pub struct AnomalyDetectionGeneratedAssets {
13299        /// Output only. The result table for anomaly detection.
13300        /// Format:
13301        /// PROJECT_ID.DATASET_ID.TABLE_ID
13302        /// If the result table is set at AnomalyDetectionAssets, the result table
13303        /// here would be the same as the one set in the
13304        /// AnomalyDetectionAssets.result_table.
13305        pub result_table: std::string::String,
13306
13307        /// Output only. The intermediate table for data anomaly detection.
13308        /// Format:
13309        /// PROJECT_ID.DATASET_ID.TABLE_ID
13310        pub data_intermediate_table: std::string::String,
13311
13312        /// Output only. The intermediate table for freshness anomaly detection.
13313        /// Format:
13314        /// PROJECT_ID.DATASET_ID.TABLE_ID
13315        pub freshness_intermediate_table: std::string::String,
13316
13317        /// Output only. The intermediate table for volume anomaly detection.
13318        /// Format:
13319        /// PROJECT_ID.DATASET_ID.TABLE_ID
13320        pub volume_intermediate_table: std::string::String,
13321
13322        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13323    }
13324
13325    impl AnomalyDetectionGeneratedAssets {
13326        pub fn new() -> Self {
13327            std::default::Default::default()
13328        }
13329
13330        /// Sets the value of [result_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::result_table].
13331        pub fn set_result_table<T: std::convert::Into<std::string::String>>(
13332            mut self,
13333            v: T,
13334        ) -> Self {
13335            self.result_table = v.into();
13336            self
13337        }
13338
13339        /// Sets the value of [data_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::data_intermediate_table].
13340        pub fn set_data_intermediate_table<T: std::convert::Into<std::string::String>>(
13341            mut self,
13342            v: T,
13343        ) -> Self {
13344            self.data_intermediate_table = v.into();
13345            self
13346        }
13347
13348        /// Sets the value of [freshness_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::freshness_intermediate_table].
13349        pub fn set_freshness_intermediate_table<T: std::convert::Into<std::string::String>>(
13350            mut self,
13351            v: T,
13352        ) -> Self {
13353            self.freshness_intermediate_table = v.into();
13354            self
13355        }
13356
13357        /// Sets the value of [volume_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::volume_intermediate_table].
13358        pub fn set_volume_intermediate_table<T: std::convert::Into<std::string::String>>(
13359            mut self,
13360            v: T,
13361        ) -> Self {
13362            self.volume_intermediate_table = v.into();
13363            self
13364        }
13365    }
13366
13367    impl wkt::message::Message for AnomalyDetectionGeneratedAssets {
13368        fn typename() -> &'static str {
13369            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.AnomalyDetectionGeneratedAssets"
13370        }
13371    }
13372}
13373
13374/// DataQualityRuleResult provides a more detailed, per-rule view of the results.
13375#[derive(Clone, Default, PartialEq)]
13376#[non_exhaustive]
13377pub struct DataQualityRuleResult {
13378    /// Output only. The rule specified in the DataQualitySpec, as is.
13379    pub rule: std::option::Option<crate::model::DataQualityRule>,
13380
13381    /// Output only. Whether the rule passed or failed.
13382    pub passed: bool,
13383
13384    /// Output only. The number of rows a rule was evaluated against.
13385    ///
13386    /// This field is only valid for row-level type rules.
13387    ///
13388    /// Evaluated count can be configured to either
13389    ///
13390    /// * include all rows (default) - with `null` rows automatically failing rule
13391    ///   evaluation, or
13392    /// * exclude `null` rows from the `evaluated_count`, by setting
13393    ///   `ignore_nulls = true`.
13394    ///
13395    /// This field is not set for rule SqlAssertion.
13396    pub evaluated_count: i64,
13397
13398    /// Output only. The number of rows which passed a rule evaluation.
13399    ///
13400    /// This field is only valid for row-level type rules.
13401    ///
13402    /// This field is not set for rule SqlAssertion.
13403    pub passed_count: i64,
13404
13405    /// Output only. The number of rows with null values in the specified column.
13406    pub null_count: i64,
13407
13408    /// Output only. The ratio of **passed_count / evaluated_count**.
13409    ///
13410    /// This field is only valid for row-level type rules.
13411    pub pass_ratio: f64,
13412
13413    /// Output only. The query to find rows that did not pass this rule.
13414    ///
13415    /// This field is only valid for row-level type rules.
13416    pub failing_rows_query: std::string::String,
13417
13418    /// Output only. The number of rows returned by the SQL statement in a SQL
13419    /// assertion rule.
13420    ///
13421    /// This field is only valid for SQL assertion rules.
13422    pub assertion_row_count: i64,
13423
13424    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13425}
13426
13427impl DataQualityRuleResult {
13428    pub fn new() -> Self {
13429        std::default::Default::default()
13430    }
13431
13432    /// Sets the value of [rule][crate::model::DataQualityRuleResult::rule].
13433    pub fn set_rule<T>(mut self, v: T) -> Self
13434    where
13435        T: std::convert::Into<crate::model::DataQualityRule>,
13436    {
13437        self.rule = std::option::Option::Some(v.into());
13438        self
13439    }
13440
13441    /// Sets or clears the value of [rule][crate::model::DataQualityRuleResult::rule].
13442    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
13443    where
13444        T: std::convert::Into<crate::model::DataQualityRule>,
13445    {
13446        self.rule = v.map(|x| x.into());
13447        self
13448    }
13449
13450    /// Sets the value of [passed][crate::model::DataQualityRuleResult::passed].
13451    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13452        self.passed = v.into();
13453        self
13454    }
13455
13456    /// Sets the value of [evaluated_count][crate::model::DataQualityRuleResult::evaluated_count].
13457    pub fn set_evaluated_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13458        self.evaluated_count = v.into();
13459        self
13460    }
13461
13462    /// Sets the value of [passed_count][crate::model::DataQualityRuleResult::passed_count].
13463    pub fn set_passed_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13464        self.passed_count = v.into();
13465        self
13466    }
13467
13468    /// Sets the value of [null_count][crate::model::DataQualityRuleResult::null_count].
13469    pub fn set_null_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13470        self.null_count = v.into();
13471        self
13472    }
13473
13474    /// Sets the value of [pass_ratio][crate::model::DataQualityRuleResult::pass_ratio].
13475    pub fn set_pass_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13476        self.pass_ratio = v.into();
13477        self
13478    }
13479
13480    /// Sets the value of [failing_rows_query][crate::model::DataQualityRuleResult::failing_rows_query].
13481    pub fn set_failing_rows_query<T: std::convert::Into<std::string::String>>(
13482        mut self,
13483        v: T,
13484    ) -> Self {
13485        self.failing_rows_query = v.into();
13486        self
13487    }
13488
13489    /// Sets the value of [assertion_row_count][crate::model::DataQualityRuleResult::assertion_row_count].
13490    pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13491        self.assertion_row_count = v.into();
13492        self
13493    }
13494}
13495
13496impl wkt::message::Message for DataQualityRuleResult {
13497    fn typename() -> &'static str {
13498        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRuleResult"
13499    }
13500}
13501
13502/// DataQualityDimensionResult provides a more detailed, per-dimension view of
13503/// the results.
13504#[derive(Clone, Default, PartialEq)]
13505#[non_exhaustive]
13506pub struct DataQualityDimensionResult {
13507    /// Output only. The dimension config specified in the DataQualitySpec, as is.
13508    pub dimension: std::option::Option<crate::model::DataQualityDimension>,
13509
13510    /// Output only. Whether the dimension passed or failed.
13511    pub passed: bool,
13512
13513    /// Output only. The dimension-level data quality score for this data scan job
13514    /// if and only if the 'dimension' field is set.
13515    ///
13516    /// The score ranges between [0, 100] (up to two decimal
13517    /// points).
13518    pub score: std::option::Option<f32>,
13519
13520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13521}
13522
13523impl DataQualityDimensionResult {
13524    pub fn new() -> Self {
13525        std::default::Default::default()
13526    }
13527
13528    /// Sets the value of [dimension][crate::model::DataQualityDimensionResult::dimension].
13529    pub fn set_dimension<T>(mut self, v: T) -> Self
13530    where
13531        T: std::convert::Into<crate::model::DataQualityDimension>,
13532    {
13533        self.dimension = std::option::Option::Some(v.into());
13534        self
13535    }
13536
13537    /// Sets or clears the value of [dimension][crate::model::DataQualityDimensionResult::dimension].
13538    pub fn set_or_clear_dimension<T>(mut self, v: std::option::Option<T>) -> Self
13539    where
13540        T: std::convert::Into<crate::model::DataQualityDimension>,
13541    {
13542        self.dimension = v.map(|x| x.into());
13543        self
13544    }
13545
13546    /// Sets the value of [passed][crate::model::DataQualityDimensionResult::passed].
13547    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13548        self.passed = v.into();
13549        self
13550    }
13551
13552    /// Sets the value of [score][crate::model::DataQualityDimensionResult::score].
13553    pub fn set_score<T>(mut self, v: T) -> Self
13554    where
13555        T: std::convert::Into<f32>,
13556    {
13557        self.score = std::option::Option::Some(v.into());
13558        self
13559    }
13560
13561    /// Sets or clears the value of [score][crate::model::DataQualityDimensionResult::score].
13562    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
13563    where
13564        T: std::convert::Into<f32>,
13565    {
13566        self.score = v.map(|x| x.into());
13567        self
13568    }
13569}
13570
13571impl wkt::message::Message for DataQualityDimensionResult {
13572    fn typename() -> &'static str {
13573        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimensionResult"
13574    }
13575}
13576
13577/// A dimension captures data quality intent about a defined subset of the rules
13578/// specified.
13579#[derive(Clone, Default, PartialEq)]
13580#[non_exhaustive]
13581pub struct DataQualityDimension {
13582    /// Output only. The dimension name a rule belongs to. Custom dimension name is
13583    /// supported with all uppercase letters and maximum length of 30 characters.
13584    pub name: std::string::String,
13585
13586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13587}
13588
13589impl DataQualityDimension {
13590    pub fn new() -> Self {
13591        std::default::Default::default()
13592    }
13593
13594    /// Sets the value of [name][crate::model::DataQualityDimension::name].
13595    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13596        self.name = v.into();
13597        self
13598    }
13599}
13600
13601impl wkt::message::Message for DataQualityDimension {
13602    fn typename() -> &'static str {
13603        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimension"
13604    }
13605}
13606
13607/// A rule captures data quality intent about a data source.
13608#[derive(Clone, Default, PartialEq)]
13609#[non_exhaustive]
13610pub struct DataQualityRule {
13611    /// Optional. The unnested column which this rule is evaluated against.
13612    pub column: std::string::String,
13613
13614    /// Optional. Rows with `null` values will automatically fail a rule, unless
13615    /// `ignore_null` is `true`. In that case, such `null` rows are trivially
13616    /// considered passing.
13617    ///
13618    /// This field is only valid for the following type of rules:
13619    ///
13620    /// * RangeExpectation
13621    /// * RegexExpectation
13622    /// * SetExpectation
13623    /// * UniquenessExpectation
13624    pub ignore_null: bool,
13625
13626    /// Required. The dimension a rule belongs to. Results are also aggregated at
13627    /// the dimension level. Custom dimension name is supported with all uppercase
13628    /// letters and maximum length of 30 characters.
13629    pub dimension: std::string::String,
13630
13631    /// Optional. The minimum ratio of **passing_rows / total_rows** required to
13632    /// pass this rule, with a range of [0.0, 1.0].
13633    ///
13634    /// 0 indicates default value (i.e. 1.0).
13635    ///
13636    /// This field is only valid for row-level type rules.
13637    pub threshold: f64,
13638
13639    /// Optional. A mutable name for the rule.
13640    ///
13641    /// * The name must contain only letters (a-z, A-Z), numbers (0-9), or
13642    ///   hyphens (-).
13643    /// * The maximum length is 63 characters.
13644    /// * Must start with a letter.
13645    /// * Must end with a number or a letter.
13646    pub name: std::string::String,
13647
13648    /// Optional. Description of the rule.
13649    ///
13650    /// * The maximum length is 1,024 characters.
13651    pub description: std::string::String,
13652
13653    /// Optional. Whether the Rule is active or suspended.
13654    /// Default is false.
13655    pub suspended: bool,
13656
13657    /// The rule-specific configuration.
13658    pub rule_type: std::option::Option<crate::model::data_quality_rule::RuleType>,
13659
13660    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13661}
13662
13663impl DataQualityRule {
13664    pub fn new() -> Self {
13665        std::default::Default::default()
13666    }
13667
13668    /// Sets the value of [column][crate::model::DataQualityRule::column].
13669    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13670        self.column = v.into();
13671        self
13672    }
13673
13674    /// Sets the value of [ignore_null][crate::model::DataQualityRule::ignore_null].
13675    pub fn set_ignore_null<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13676        self.ignore_null = v.into();
13677        self
13678    }
13679
13680    /// Sets the value of [dimension][crate::model::DataQualityRule::dimension].
13681    pub fn set_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13682        self.dimension = v.into();
13683        self
13684    }
13685
13686    /// Sets the value of [threshold][crate::model::DataQualityRule::threshold].
13687    pub fn set_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13688        self.threshold = v.into();
13689        self
13690    }
13691
13692    /// Sets the value of [name][crate::model::DataQualityRule::name].
13693    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13694        self.name = v.into();
13695        self
13696    }
13697
13698    /// Sets the value of [description][crate::model::DataQualityRule::description].
13699    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13700        self.description = v.into();
13701        self
13702    }
13703
13704    /// Sets the value of [suspended][crate::model::DataQualityRule::suspended].
13705    pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13706        self.suspended = v.into();
13707        self
13708    }
13709
13710    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type].
13711    ///
13712    /// Note that all the setters affecting `rule_type` are mutually
13713    /// exclusive.
13714    pub fn set_rule_type<
13715        T: std::convert::Into<std::option::Option<crate::model::data_quality_rule::RuleType>>,
13716    >(
13717        mut self,
13718        v: T,
13719    ) -> Self {
13720        self.rule_type = v.into();
13721        self
13722    }
13723
13724    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13725    /// if it holds a `RangeExpectation`, `None` if the field is not set or
13726    /// holds a different branch.
13727    pub fn range_expectation(
13728        &self,
13729    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>
13730    {
13731        #[allow(unreachable_patterns)]
13732        self.rule_type.as_ref().and_then(|v| match v {
13733            crate::model::data_quality_rule::RuleType::RangeExpectation(v) => {
13734                std::option::Option::Some(v)
13735            }
13736            _ => std::option::Option::None,
13737        })
13738    }
13739
13740    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13741    /// to hold a `RangeExpectation`.
13742    ///
13743    /// Note that all the setters affecting `rule_type` are
13744    /// mutually exclusive.
13745    pub fn set_range_expectation<
13746        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>,
13747    >(
13748        mut self,
13749        v: T,
13750    ) -> Self {
13751        self.rule_type = std::option::Option::Some(
13752            crate::model::data_quality_rule::RuleType::RangeExpectation(v.into()),
13753        );
13754        self
13755    }
13756
13757    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13758    /// if it holds a `NonNullExpectation`, `None` if the field is not set or
13759    /// holds a different branch.
13760    pub fn non_null_expectation(
13761        &self,
13762    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>
13763    {
13764        #[allow(unreachable_patterns)]
13765        self.rule_type.as_ref().and_then(|v| match v {
13766            crate::model::data_quality_rule::RuleType::NonNullExpectation(v) => {
13767                std::option::Option::Some(v)
13768            }
13769            _ => std::option::Option::None,
13770        })
13771    }
13772
13773    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13774    /// to hold a `NonNullExpectation`.
13775    ///
13776    /// Note that all the setters affecting `rule_type` are
13777    /// mutually exclusive.
13778    pub fn set_non_null_expectation<
13779        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>,
13780    >(
13781        mut self,
13782        v: T,
13783    ) -> Self {
13784        self.rule_type = std::option::Option::Some(
13785            crate::model::data_quality_rule::RuleType::NonNullExpectation(v.into()),
13786        );
13787        self
13788    }
13789
13790    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13791    /// if it holds a `SetExpectation`, `None` if the field is not set or
13792    /// holds a different branch.
13793    pub fn set_expectation(
13794        &self,
13795    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>
13796    {
13797        #[allow(unreachable_patterns)]
13798        self.rule_type.as_ref().and_then(|v| match v {
13799            crate::model::data_quality_rule::RuleType::SetExpectation(v) => {
13800                std::option::Option::Some(v)
13801            }
13802            _ => std::option::Option::None,
13803        })
13804    }
13805
13806    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13807    /// to hold a `SetExpectation`.
13808    ///
13809    /// Note that all the setters affecting `rule_type` are
13810    /// mutually exclusive.
13811    pub fn set_set_expectation<
13812        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>,
13813    >(
13814        mut self,
13815        v: T,
13816    ) -> Self {
13817        self.rule_type = std::option::Option::Some(
13818            crate::model::data_quality_rule::RuleType::SetExpectation(v.into()),
13819        );
13820        self
13821    }
13822
13823    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13824    /// if it holds a `RegexExpectation`, `None` if the field is not set or
13825    /// holds a different branch.
13826    pub fn regex_expectation(
13827        &self,
13828    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>
13829    {
13830        #[allow(unreachable_patterns)]
13831        self.rule_type.as_ref().and_then(|v| match v {
13832            crate::model::data_quality_rule::RuleType::RegexExpectation(v) => {
13833                std::option::Option::Some(v)
13834            }
13835            _ => std::option::Option::None,
13836        })
13837    }
13838
13839    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13840    /// to hold a `RegexExpectation`.
13841    ///
13842    /// Note that all the setters affecting `rule_type` are
13843    /// mutually exclusive.
13844    pub fn set_regex_expectation<
13845        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>,
13846    >(
13847        mut self,
13848        v: T,
13849    ) -> Self {
13850        self.rule_type = std::option::Option::Some(
13851            crate::model::data_quality_rule::RuleType::RegexExpectation(v.into()),
13852        );
13853        self
13854    }
13855
13856    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13857    /// if it holds a `UniquenessExpectation`, `None` if the field is not set or
13858    /// holds a different branch.
13859    pub fn uniqueness_expectation(
13860        &self,
13861    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>
13862    {
13863        #[allow(unreachable_patterns)]
13864        self.rule_type.as_ref().and_then(|v| match v {
13865            crate::model::data_quality_rule::RuleType::UniquenessExpectation(v) => {
13866                std::option::Option::Some(v)
13867            }
13868            _ => std::option::Option::None,
13869        })
13870    }
13871
13872    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13873    /// to hold a `UniquenessExpectation`.
13874    ///
13875    /// Note that all the setters affecting `rule_type` are
13876    /// mutually exclusive.
13877    pub fn set_uniqueness_expectation<
13878        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>,
13879    >(
13880        mut self,
13881        v: T,
13882    ) -> Self {
13883        self.rule_type = std::option::Option::Some(
13884            crate::model::data_quality_rule::RuleType::UniquenessExpectation(v.into()),
13885        );
13886        self
13887    }
13888
13889    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13890    /// if it holds a `StatisticRangeExpectation`, `None` if the field is not set or
13891    /// holds a different branch.
13892    pub fn statistic_range_expectation(
13893        &self,
13894    ) -> std::option::Option<
13895        &std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
13896    > {
13897        #[allow(unreachable_patterns)]
13898        self.rule_type.as_ref().and_then(|v| match v {
13899            crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v) => {
13900                std::option::Option::Some(v)
13901            }
13902            _ => std::option::Option::None,
13903        })
13904    }
13905
13906    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13907    /// to hold a `StatisticRangeExpectation`.
13908    ///
13909    /// Note that all the setters affecting `rule_type` are
13910    /// mutually exclusive.
13911    pub fn set_statistic_range_expectation<
13912        T: std::convert::Into<
13913                std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
13914            >,
13915    >(
13916        mut self,
13917        v: T,
13918    ) -> Self {
13919        self.rule_type = std::option::Option::Some(
13920            crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v.into()),
13921        );
13922        self
13923    }
13924
13925    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13926    /// if it holds a `RowConditionExpectation`, `None` if the field is not set or
13927    /// holds a different branch.
13928    pub fn row_condition_expectation(
13929        &self,
13930    ) -> std::option::Option<
13931        &std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
13932    > {
13933        #[allow(unreachable_patterns)]
13934        self.rule_type.as_ref().and_then(|v| match v {
13935            crate::model::data_quality_rule::RuleType::RowConditionExpectation(v) => {
13936                std::option::Option::Some(v)
13937            }
13938            _ => std::option::Option::None,
13939        })
13940    }
13941
13942    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13943    /// to hold a `RowConditionExpectation`.
13944    ///
13945    /// Note that all the setters affecting `rule_type` are
13946    /// mutually exclusive.
13947    pub fn set_row_condition_expectation<
13948        T: std::convert::Into<
13949                std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
13950            >,
13951    >(
13952        mut self,
13953        v: T,
13954    ) -> Self {
13955        self.rule_type = std::option::Option::Some(
13956            crate::model::data_quality_rule::RuleType::RowConditionExpectation(v.into()),
13957        );
13958        self
13959    }
13960
13961    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13962    /// if it holds a `TableConditionExpectation`, `None` if the field is not set or
13963    /// holds a different branch.
13964    pub fn table_condition_expectation(
13965        &self,
13966    ) -> std::option::Option<
13967        &std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
13968    > {
13969        #[allow(unreachable_patterns)]
13970        self.rule_type.as_ref().and_then(|v| match v {
13971            crate::model::data_quality_rule::RuleType::TableConditionExpectation(v) => {
13972                std::option::Option::Some(v)
13973            }
13974            _ => std::option::Option::None,
13975        })
13976    }
13977
13978    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
13979    /// to hold a `TableConditionExpectation`.
13980    ///
13981    /// Note that all the setters affecting `rule_type` are
13982    /// mutually exclusive.
13983    pub fn set_table_condition_expectation<
13984        T: std::convert::Into<
13985                std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
13986            >,
13987    >(
13988        mut self,
13989        v: T,
13990    ) -> Self {
13991        self.rule_type = std::option::Option::Some(
13992            crate::model::data_quality_rule::RuleType::TableConditionExpectation(v.into()),
13993        );
13994        self
13995    }
13996
13997    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
13998    /// if it holds a `SqlAssertion`, `None` if the field is not set or
13999    /// holds a different branch.
14000    pub fn sql_assertion(
14001        &self,
14002    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>> {
14003        #[allow(unreachable_patterns)]
14004        self.rule_type.as_ref().and_then(|v| match v {
14005            crate::model::data_quality_rule::RuleType::SqlAssertion(v) => {
14006                std::option::Option::Some(v)
14007            }
14008            _ => std::option::Option::None,
14009        })
14010    }
14011
14012    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
14013    /// to hold a `SqlAssertion`.
14014    ///
14015    /// Note that all the setters affecting `rule_type` are
14016    /// mutually exclusive.
14017    pub fn set_sql_assertion<
14018        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>>,
14019    >(
14020        mut self,
14021        v: T,
14022    ) -> Self {
14023        self.rule_type = std::option::Option::Some(
14024            crate::model::data_quality_rule::RuleType::SqlAssertion(v.into()),
14025        );
14026        self
14027    }
14028}
14029
14030impl wkt::message::Message for DataQualityRule {
14031    fn typename() -> &'static str {
14032        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule"
14033    }
14034}
14035
14036/// Defines additional types related to [DataQualityRule].
14037pub mod data_quality_rule {
14038    #[allow(unused_imports)]
14039    use super::*;
14040
14041    /// Evaluates whether each column value lies between a specified range.
14042    #[derive(Clone, Default, PartialEq)]
14043    #[non_exhaustive]
14044    pub struct RangeExpectation {
14045        /// Optional. The minimum column value allowed for a row to pass this
14046        /// validation. At least one of `min_value` and `max_value` need to be
14047        /// provided.
14048        pub min_value: std::string::String,
14049
14050        /// Optional. The maximum column value allowed for a row to pass this
14051        /// validation. At least one of `min_value` and `max_value` need to be
14052        /// provided.
14053        pub max_value: std::string::String,
14054
14055        /// Optional. Whether each value needs to be strictly greater than ('>') the
14056        /// minimum, or if equality is allowed.
14057        ///
14058        /// Only relevant if a `min_value` has been defined. Default = false.
14059        pub strict_min_enabled: bool,
14060
14061        /// Optional. Whether each value needs to be strictly lesser than ('<') the
14062        /// maximum, or if equality is allowed.
14063        ///
14064        /// Only relevant if a `max_value` has been defined. Default = false.
14065        pub strict_max_enabled: bool,
14066
14067        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14068    }
14069
14070    impl RangeExpectation {
14071        pub fn new() -> Self {
14072            std::default::Default::default()
14073        }
14074
14075        /// Sets the value of [min_value][crate::model::data_quality_rule::RangeExpectation::min_value].
14076        pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14077            self.min_value = v.into();
14078            self
14079        }
14080
14081        /// Sets the value of [max_value][crate::model::data_quality_rule::RangeExpectation::max_value].
14082        pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14083            self.max_value = v.into();
14084            self
14085        }
14086
14087        /// Sets the value of [strict_min_enabled][crate::model::data_quality_rule::RangeExpectation::strict_min_enabled].
14088        pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14089            self.strict_min_enabled = v.into();
14090            self
14091        }
14092
14093        /// Sets the value of [strict_max_enabled][crate::model::data_quality_rule::RangeExpectation::strict_max_enabled].
14094        pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14095            self.strict_max_enabled = v.into();
14096            self
14097        }
14098    }
14099
14100    impl wkt::message::Message for RangeExpectation {
14101        fn typename() -> &'static str {
14102            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RangeExpectation"
14103        }
14104    }
14105
14106    /// Evaluates whether each column value is null.
14107    #[derive(Clone, Default, PartialEq)]
14108    #[non_exhaustive]
14109    pub struct NonNullExpectation {
14110        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14111    }
14112
14113    impl NonNullExpectation {
14114        pub fn new() -> Self {
14115            std::default::Default::default()
14116        }
14117    }
14118
14119    impl wkt::message::Message for NonNullExpectation {
14120        fn typename() -> &'static str {
14121            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation"
14122        }
14123    }
14124
14125    /// Evaluates whether each column value is contained by a specified set.
14126    #[derive(Clone, Default, PartialEq)]
14127    #[non_exhaustive]
14128    pub struct SetExpectation {
14129        /// Optional. Expected values for the column value.
14130        pub values: std::vec::Vec<std::string::String>,
14131
14132        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14133    }
14134
14135    impl SetExpectation {
14136        pub fn new() -> Self {
14137            std::default::Default::default()
14138        }
14139
14140        /// Sets the value of [values][crate::model::data_quality_rule::SetExpectation::values].
14141        pub fn set_values<T, V>(mut self, v: T) -> Self
14142        where
14143            T: std::iter::IntoIterator<Item = V>,
14144            V: std::convert::Into<std::string::String>,
14145        {
14146            use std::iter::Iterator;
14147            self.values = v.into_iter().map(|i| i.into()).collect();
14148            self
14149        }
14150    }
14151
14152    impl wkt::message::Message for SetExpectation {
14153        fn typename() -> &'static str {
14154            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SetExpectation"
14155        }
14156    }
14157
14158    /// Evaluates whether each column value matches a specified regex.
14159    #[derive(Clone, Default, PartialEq)]
14160    #[non_exhaustive]
14161    pub struct RegexExpectation {
14162        /// Optional. A regular expression the column value is expected to match.
14163        pub regex: std::string::String,
14164
14165        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14166    }
14167
14168    impl RegexExpectation {
14169        pub fn new() -> Self {
14170            std::default::Default::default()
14171        }
14172
14173        /// Sets the value of [regex][crate::model::data_quality_rule::RegexExpectation::regex].
14174        pub fn set_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14175            self.regex = v.into();
14176            self
14177        }
14178    }
14179
14180    impl wkt::message::Message for RegexExpectation {
14181        fn typename() -> &'static str {
14182            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RegexExpectation"
14183        }
14184    }
14185
14186    /// Evaluates whether the column has duplicates.
14187    #[derive(Clone, Default, PartialEq)]
14188    #[non_exhaustive]
14189    pub struct UniquenessExpectation {
14190        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14191    }
14192
14193    impl UniquenessExpectation {
14194        pub fn new() -> Self {
14195            std::default::Default::default()
14196        }
14197    }
14198
14199    impl wkt::message::Message for UniquenessExpectation {
14200        fn typename() -> &'static str {
14201            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation"
14202        }
14203    }
14204
14205    /// Evaluates whether the column aggregate statistic lies between a specified
14206    /// range.
14207    #[derive(Clone, Default, PartialEq)]
14208    #[non_exhaustive]
14209    pub struct StatisticRangeExpectation {
14210        /// Optional. The aggregate metric to evaluate.
14211        pub statistic:
14212            crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
14213
14214        /// Optional. The minimum column statistic value allowed for a row to pass
14215        /// this validation.
14216        ///
14217        /// At least one of `min_value` and `max_value` need to be provided.
14218        pub min_value: std::string::String,
14219
14220        /// Optional. The maximum column statistic value allowed for a row to pass
14221        /// this validation.
14222        ///
14223        /// At least one of `min_value` and `max_value` need to be provided.
14224        pub max_value: std::string::String,
14225
14226        /// Optional. Whether column statistic needs to be strictly greater than
14227        /// ('>') the minimum, or if equality is allowed.
14228        ///
14229        /// Only relevant if a `min_value` has been defined. Default = false.
14230        pub strict_min_enabled: bool,
14231
14232        /// Optional. Whether column statistic needs to be strictly lesser than ('<')
14233        /// the maximum, or if equality is allowed.
14234        ///
14235        /// Only relevant if a `max_value` has been defined. Default = false.
14236        pub strict_max_enabled: bool,
14237
14238        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14239    }
14240
14241    impl StatisticRangeExpectation {
14242        pub fn new() -> Self {
14243            std::default::Default::default()
14244        }
14245
14246        /// Sets the value of [statistic][crate::model::data_quality_rule::StatisticRangeExpectation::statistic].
14247        pub fn set_statistic<
14248            T: std::convert::Into<
14249                    crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
14250                >,
14251        >(
14252            mut self,
14253            v: T,
14254        ) -> Self {
14255            self.statistic = v.into();
14256            self
14257        }
14258
14259        /// Sets the value of [min_value][crate::model::data_quality_rule::StatisticRangeExpectation::min_value].
14260        pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14261            self.min_value = v.into();
14262            self
14263        }
14264
14265        /// Sets the value of [max_value][crate::model::data_quality_rule::StatisticRangeExpectation::max_value].
14266        pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14267            self.max_value = v.into();
14268            self
14269        }
14270
14271        /// Sets the value of [strict_min_enabled][crate::model::data_quality_rule::StatisticRangeExpectation::strict_min_enabled].
14272        pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14273            self.strict_min_enabled = v.into();
14274            self
14275        }
14276
14277        /// Sets the value of [strict_max_enabled][crate::model::data_quality_rule::StatisticRangeExpectation::strict_max_enabled].
14278        pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14279            self.strict_max_enabled = v.into();
14280            self
14281        }
14282    }
14283
14284    impl wkt::message::Message for StatisticRangeExpectation {
14285        fn typename() -> &'static str {
14286            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation"
14287        }
14288    }
14289
14290    /// Defines additional types related to [StatisticRangeExpectation].
14291    pub mod statistic_range_expectation {
14292        #[allow(unused_imports)]
14293        use super::*;
14294
14295        /// The list of aggregate metrics a rule can be evaluated against.
14296        ///
14297        /// # Working with unknown values
14298        ///
14299        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14300        /// additional enum variants at any time. Adding new variants is not considered
14301        /// a breaking change. Applications should write their code in anticipation of:
14302        ///
14303        /// - New values appearing in future releases of the client library, **and**
14304        /// - New values received dynamically, without application changes.
14305        ///
14306        /// Please consult the [Working with enums] section in the user guide for some
14307        /// guidelines.
14308        ///
14309        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14310        #[derive(Clone, Debug, PartialEq)]
14311        #[non_exhaustive]
14312        pub enum ColumnStatistic {
14313            /// Unspecified statistic type
14314            StatisticUndefined,
14315            /// Evaluate the column mean
14316            Mean,
14317            /// Evaluate the column min
14318            Min,
14319            /// Evaluate the column max
14320            Max,
14321            /// If set, the enum was initialized with an unknown value.
14322            ///
14323            /// Applications can examine the value using [ColumnStatistic::value] or
14324            /// [ColumnStatistic::name].
14325            UnknownValue(column_statistic::UnknownValue),
14326        }
14327
14328        #[doc(hidden)]
14329        pub mod column_statistic {
14330            #[allow(unused_imports)]
14331            use super::*;
14332            #[derive(Clone, Debug, PartialEq)]
14333            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14334        }
14335
14336        impl ColumnStatistic {
14337            /// Gets the enum value.
14338            ///
14339            /// Returns `None` if the enum contains an unknown value deserialized from
14340            /// the string representation of enums.
14341            pub fn value(&self) -> std::option::Option<i32> {
14342                match self {
14343                    Self::StatisticUndefined => std::option::Option::Some(0),
14344                    Self::Mean => std::option::Option::Some(1),
14345                    Self::Min => std::option::Option::Some(2),
14346                    Self::Max => std::option::Option::Some(3),
14347                    Self::UnknownValue(u) => u.0.value(),
14348                }
14349            }
14350
14351            /// Gets the enum value as a string.
14352            ///
14353            /// Returns `None` if the enum contains an unknown value deserialized from
14354            /// the integer representation of enums.
14355            pub fn name(&self) -> std::option::Option<&str> {
14356                match self {
14357                    Self::StatisticUndefined => std::option::Option::Some("STATISTIC_UNDEFINED"),
14358                    Self::Mean => std::option::Option::Some("MEAN"),
14359                    Self::Min => std::option::Option::Some("MIN"),
14360                    Self::Max => std::option::Option::Some("MAX"),
14361                    Self::UnknownValue(u) => u.0.name(),
14362                }
14363            }
14364        }
14365
14366        impl std::default::Default for ColumnStatistic {
14367            fn default() -> Self {
14368                use std::convert::From;
14369                Self::from(0)
14370            }
14371        }
14372
14373        impl std::fmt::Display for ColumnStatistic {
14374            fn fmt(
14375                &self,
14376                f: &mut std::fmt::Formatter<'_>,
14377            ) -> std::result::Result<(), std::fmt::Error> {
14378                wkt::internal::display_enum(f, self.name(), self.value())
14379            }
14380        }
14381
14382        impl std::convert::From<i32> for ColumnStatistic {
14383            fn from(value: i32) -> Self {
14384                match value {
14385                    0 => Self::StatisticUndefined,
14386                    1 => Self::Mean,
14387                    2 => Self::Min,
14388                    3 => Self::Max,
14389                    _ => Self::UnknownValue(column_statistic::UnknownValue(
14390                        wkt::internal::UnknownEnumValue::Integer(value),
14391                    )),
14392                }
14393            }
14394        }
14395
14396        impl std::convert::From<&str> for ColumnStatistic {
14397            fn from(value: &str) -> Self {
14398                use std::string::ToString;
14399                match value {
14400                    "STATISTIC_UNDEFINED" => Self::StatisticUndefined,
14401                    "MEAN" => Self::Mean,
14402                    "MIN" => Self::Min,
14403                    "MAX" => Self::Max,
14404                    _ => Self::UnknownValue(column_statistic::UnknownValue(
14405                        wkt::internal::UnknownEnumValue::String(value.to_string()),
14406                    )),
14407                }
14408            }
14409        }
14410
14411        impl serde::ser::Serialize for ColumnStatistic {
14412            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14413            where
14414                S: serde::Serializer,
14415            {
14416                match self {
14417                    Self::StatisticUndefined => serializer.serialize_i32(0),
14418                    Self::Mean => serializer.serialize_i32(1),
14419                    Self::Min => serializer.serialize_i32(2),
14420                    Self::Max => serializer.serialize_i32(3),
14421                    Self::UnknownValue(u) => u.0.serialize(serializer),
14422                }
14423            }
14424        }
14425
14426        impl<'de> serde::de::Deserialize<'de> for ColumnStatistic {
14427            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14428            where
14429                D: serde::Deserializer<'de>,
14430            {
14431                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ColumnStatistic>::new(
14432                    ".google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic"))
14433            }
14434        }
14435    }
14436
14437    /// Evaluates whether each row passes the specified condition.
14438    ///
14439    /// The SQL expression needs to use [GoogleSQL
14440    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax)
14441    /// and should produce a boolean value per row as the result.
14442    ///
14443    /// Example: col1 >= 0 AND col2 < 10
14444    #[derive(Clone, Default, PartialEq)]
14445    #[non_exhaustive]
14446    pub struct RowConditionExpectation {
14447        /// Optional. The SQL expression.
14448        pub sql_expression: std::string::String,
14449
14450        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14451    }
14452
14453    impl RowConditionExpectation {
14454        pub fn new() -> Self {
14455            std::default::Default::default()
14456        }
14457
14458        /// Sets the value of [sql_expression][crate::model::data_quality_rule::RowConditionExpectation::sql_expression].
14459        pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
14460            mut self,
14461            v: T,
14462        ) -> Self {
14463            self.sql_expression = v.into();
14464            self
14465        }
14466    }
14467
14468    impl wkt::message::Message for RowConditionExpectation {
14469        fn typename() -> &'static str {
14470            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation"
14471        }
14472    }
14473
14474    /// Evaluates whether the provided expression is true.
14475    ///
14476    /// The SQL expression needs to use [GoogleSQL
14477    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax)
14478    /// and should produce a scalar boolean result.
14479    ///
14480    /// Example: MIN(col1) >= 0
14481    #[derive(Clone, Default, PartialEq)]
14482    #[non_exhaustive]
14483    pub struct TableConditionExpectation {
14484        /// Optional. The SQL expression.
14485        pub sql_expression: std::string::String,
14486
14487        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14488    }
14489
14490    impl TableConditionExpectation {
14491        pub fn new() -> Self {
14492            std::default::Default::default()
14493        }
14494
14495        /// Sets the value of [sql_expression][crate::model::data_quality_rule::TableConditionExpectation::sql_expression].
14496        pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
14497            mut self,
14498            v: T,
14499        ) -> Self {
14500            self.sql_expression = v.into();
14501            self
14502        }
14503    }
14504
14505    impl wkt::message::Message for TableConditionExpectation {
14506        fn typename() -> &'static str {
14507            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation"
14508        }
14509    }
14510
14511    /// A SQL statement that is evaluated to return rows that match an invalid
14512    /// state. If any rows are are returned, this rule fails.
14513    ///
14514    /// The SQL statement must use [GoogleSQL
14515    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax),
14516    /// and must not contain any semicolons.
14517    ///
14518    /// You can use the data reference parameter `${data()}` to reference the
14519    /// source table with all of its precondition filters applied. Examples of
14520    /// precondition filters include row filters, incremental data filters, and
14521    /// sampling. For more information, see [Data reference
14522    /// parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
14523    ///
14524    /// Example: `SELECT * FROM ${data()} WHERE price < 0`
14525    #[derive(Clone, Default, PartialEq)]
14526    #[non_exhaustive]
14527    pub struct SqlAssertion {
14528        /// Optional. The SQL statement.
14529        pub sql_statement: std::string::String,
14530
14531        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14532    }
14533
14534    impl SqlAssertion {
14535        pub fn new() -> Self {
14536            std::default::Default::default()
14537        }
14538
14539        /// Sets the value of [sql_statement][crate::model::data_quality_rule::SqlAssertion::sql_statement].
14540        pub fn set_sql_statement<T: std::convert::Into<std::string::String>>(
14541            mut self,
14542            v: T,
14543        ) -> Self {
14544            self.sql_statement = v.into();
14545            self
14546        }
14547    }
14548
14549    impl wkt::message::Message for SqlAssertion {
14550        fn typename() -> &'static str {
14551            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SqlAssertion"
14552        }
14553    }
14554
14555    /// The rule-specific configuration.
14556    #[derive(Clone, Debug, PartialEq)]
14557    #[non_exhaustive]
14558    pub enum RuleType {
14559        /// Row-level rule which evaluates whether each column value lies between a
14560        /// specified range.
14561        RangeExpectation(std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>),
14562        /// Row-level rule which evaluates whether each column value is null.
14563        NonNullExpectation(std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>),
14564        /// Row-level rule which evaluates whether each column value is contained by
14565        /// a specified set.
14566        SetExpectation(std::boxed::Box<crate::model::data_quality_rule::SetExpectation>),
14567        /// Row-level rule which evaluates whether each column value matches a
14568        /// specified regex.
14569        RegexExpectation(std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>),
14570        /// Row-level rule which evaluates whether each column value is unique.
14571        UniquenessExpectation(
14572            std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>,
14573        ),
14574        /// Aggregate rule which evaluates whether the column aggregate
14575        /// statistic lies between a specified range.
14576        StatisticRangeExpectation(
14577            std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
14578        ),
14579        /// Row-level rule which evaluates whether each row in a table passes the
14580        /// specified condition.
14581        RowConditionExpectation(
14582            std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
14583        ),
14584        /// Aggregate rule which evaluates whether the provided expression is true
14585        /// for a table.
14586        TableConditionExpectation(
14587            std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
14588        ),
14589        /// Aggregate rule which evaluates the number of rows returned for the
14590        /// provided statement. If any rows are returned, this rule fails.
14591        SqlAssertion(std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>),
14592    }
14593}
14594
14595/// DataQualityColumnResult provides a more detailed, per-column view of
14596/// the results.
14597#[derive(Clone, Default, PartialEq)]
14598#[non_exhaustive]
14599pub struct DataQualityColumnResult {
14600    /// Output only. The column specified in the DataQualityRule.
14601    pub column: std::string::String,
14602
14603    /// Output only. The column-level data quality score for this data scan job if
14604    /// and only if the 'column' field is set.
14605    ///
14606    /// The score ranges between between [0, 100] (up to two decimal
14607    /// points).
14608    pub score: std::option::Option<f32>,
14609
14610    /// Output only. Whether the column passed or failed.
14611    pub passed: bool,
14612
14613    /// Output only. The dimension-level results for this column.
14614    pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
14615
14616    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14617}
14618
14619impl DataQualityColumnResult {
14620    pub fn new() -> Self {
14621        std::default::Default::default()
14622    }
14623
14624    /// Sets the value of [column][crate::model::DataQualityColumnResult::column].
14625    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14626        self.column = v.into();
14627        self
14628    }
14629
14630    /// Sets the value of [score][crate::model::DataQualityColumnResult::score].
14631    pub fn set_score<T>(mut self, v: T) -> Self
14632    where
14633        T: std::convert::Into<f32>,
14634    {
14635        self.score = std::option::Option::Some(v.into());
14636        self
14637    }
14638
14639    /// Sets or clears the value of [score][crate::model::DataQualityColumnResult::score].
14640    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
14641    where
14642        T: std::convert::Into<f32>,
14643    {
14644        self.score = v.map(|x| x.into());
14645        self
14646    }
14647
14648    /// Sets the value of [passed][crate::model::DataQualityColumnResult::passed].
14649    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14650        self.passed = v.into();
14651        self
14652    }
14653
14654    /// Sets the value of [dimensions][crate::model::DataQualityColumnResult::dimensions].
14655    pub fn set_dimensions<T, V>(mut self, v: T) -> Self
14656    where
14657        T: std::iter::IntoIterator<Item = V>,
14658        V: std::convert::Into<crate::model::DataQualityDimensionResult>,
14659    {
14660        use std::iter::Iterator;
14661        self.dimensions = v.into_iter().map(|i| i.into()).collect();
14662        self
14663    }
14664}
14665
14666impl wkt::message::Message for DataQualityColumnResult {
14667    fn typename() -> &'static str {
14668        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityColumnResult"
14669    }
14670}
14671
14672/// DataTaxonomy represents a set of hierarchical DataAttributes resources,
14673/// grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes
14674/// to manage PII data. It is defined at project level.
14675#[derive(Clone, Default, PartialEq)]
14676#[non_exhaustive]
14677#[deprecated]
14678pub struct DataTaxonomy {
14679    /// Output only. The relative resource name of the DataTaxonomy, of the form:
14680    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
14681    pub name: std::string::String,
14682
14683    /// Output only. System generated globally unique ID for the dataTaxonomy. This
14684    /// ID will be different if the DataTaxonomy is deleted and re-created with the
14685    /// same name.
14686    pub uid: std::string::String,
14687
14688    /// Output only. The time when the DataTaxonomy was created.
14689    pub create_time: std::option::Option<wkt::Timestamp>,
14690
14691    /// Output only. The time when the DataTaxonomy was last updated.
14692    pub update_time: std::option::Option<wkt::Timestamp>,
14693
14694    /// Optional. Description of the DataTaxonomy.
14695    pub description: std::string::String,
14696
14697    /// Optional. User friendly display name.
14698    pub display_name: std::string::String,
14699
14700    /// Optional. User-defined labels for the DataTaxonomy.
14701    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
14702
14703    /// Output only. The number of attributes in the DataTaxonomy.
14704    pub attribute_count: i32,
14705
14706    /// This checksum is computed by the server based on the value of other
14707    /// fields, and may be sent on update and delete requests to ensure the
14708    /// client has an up-to-date value before proceeding.
14709    pub etag: std::string::String,
14710
14711    /// Output only. The number of classes in the DataTaxonomy.
14712    pub class_count: i32,
14713
14714    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14715}
14716
14717impl DataTaxonomy {
14718    pub fn new() -> Self {
14719        std::default::Default::default()
14720    }
14721
14722    /// Sets the value of [name][crate::model::DataTaxonomy::name].
14723    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14724        self.name = v.into();
14725        self
14726    }
14727
14728    /// Sets the value of [uid][crate::model::DataTaxonomy::uid].
14729    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14730        self.uid = v.into();
14731        self
14732    }
14733
14734    /// Sets the value of [create_time][crate::model::DataTaxonomy::create_time].
14735    pub fn set_create_time<T>(mut self, v: T) -> Self
14736    where
14737        T: std::convert::Into<wkt::Timestamp>,
14738    {
14739        self.create_time = std::option::Option::Some(v.into());
14740        self
14741    }
14742
14743    /// Sets or clears the value of [create_time][crate::model::DataTaxonomy::create_time].
14744    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14745    where
14746        T: std::convert::Into<wkt::Timestamp>,
14747    {
14748        self.create_time = v.map(|x| x.into());
14749        self
14750    }
14751
14752    /// Sets the value of [update_time][crate::model::DataTaxonomy::update_time].
14753    pub fn set_update_time<T>(mut self, v: T) -> Self
14754    where
14755        T: std::convert::Into<wkt::Timestamp>,
14756    {
14757        self.update_time = std::option::Option::Some(v.into());
14758        self
14759    }
14760
14761    /// Sets or clears the value of [update_time][crate::model::DataTaxonomy::update_time].
14762    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14763    where
14764        T: std::convert::Into<wkt::Timestamp>,
14765    {
14766        self.update_time = v.map(|x| x.into());
14767        self
14768    }
14769
14770    /// Sets the value of [description][crate::model::DataTaxonomy::description].
14771    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14772        self.description = v.into();
14773        self
14774    }
14775
14776    /// Sets the value of [display_name][crate::model::DataTaxonomy::display_name].
14777    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14778        self.display_name = v.into();
14779        self
14780    }
14781
14782    /// Sets the value of [labels][crate::model::DataTaxonomy::labels].
14783    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
14784    where
14785        T: std::iter::IntoIterator<Item = (K, V)>,
14786        K: std::convert::Into<std::string::String>,
14787        V: std::convert::Into<std::string::String>,
14788    {
14789        use std::iter::Iterator;
14790        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14791        self
14792    }
14793
14794    /// Sets the value of [attribute_count][crate::model::DataTaxonomy::attribute_count].
14795    pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14796        self.attribute_count = v.into();
14797        self
14798    }
14799
14800    /// Sets the value of [etag][crate::model::DataTaxonomy::etag].
14801    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14802        self.etag = v.into();
14803        self
14804    }
14805
14806    /// Sets the value of [class_count][crate::model::DataTaxonomy::class_count].
14807    pub fn set_class_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14808        self.class_count = v.into();
14809        self
14810    }
14811}
14812
14813impl wkt::message::Message for DataTaxonomy {
14814    fn typename() -> &'static str {
14815        "type.googleapis.com/google.cloud.dataplex.v1.DataTaxonomy"
14816    }
14817}
14818
14819/// Denotes one dataAttribute in a dataTaxonomy, for example, PII.
14820/// DataAttribute resources can be defined in a hierarchy.
14821/// A single dataAttribute resource can contain specs of multiple types
14822///
14823/// ```norust
14824/// PII
14825///   - ResourceAccessSpec :
14826///                 - readers :foo@bar.com
14827///   - DataAccessSpec :
14828///                 - readers :bar@foo.com
14829/// ```
14830#[derive(Clone, Default, PartialEq)]
14831#[non_exhaustive]
14832#[deprecated]
14833pub struct DataAttribute {
14834    /// Output only. The relative resource name of the dataAttribute, of the form:
14835    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
14836    pub name: std::string::String,
14837
14838    /// Output only. System generated globally unique ID for the DataAttribute.
14839    /// This ID will be different if the DataAttribute is deleted and re-created
14840    /// with the same name.
14841    pub uid: std::string::String,
14842
14843    /// Output only. The time when the DataAttribute was created.
14844    pub create_time: std::option::Option<wkt::Timestamp>,
14845
14846    /// Output only. The time when the DataAttribute was last updated.
14847    pub update_time: std::option::Option<wkt::Timestamp>,
14848
14849    /// Optional. Description of the DataAttribute.
14850    pub description: std::string::String,
14851
14852    /// Optional. User friendly display name.
14853    pub display_name: std::string::String,
14854
14855    /// Optional. User-defined labels for the DataAttribute.
14856    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
14857
14858    /// Optional. The ID of the parent DataAttribute resource, should belong to the
14859    /// same data taxonomy. Circular dependency in parent chain is not valid.
14860    /// Maximum depth of the hierarchy allowed is 4.
14861    /// [a -> b -> c -> d -> e, depth = 4]
14862    pub parent_id: std::string::String,
14863
14864    /// Output only. The number of child attributes present for this attribute.
14865    pub attribute_count: i32,
14866
14867    /// This checksum is computed by the server based on the value of other
14868    /// fields, and may be sent on update and delete requests to ensure the
14869    /// client has an up-to-date value before proceeding.
14870    pub etag: std::string::String,
14871
14872    /// Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
14873    /// BigQuery dataset, BigQuery table).
14874    pub resource_access_spec: std::option::Option<crate::model::ResourceAccessSpec>,
14875
14876    /// Optional. Specified when applied to data stored on the resource (eg: rows,
14877    /// columns in BigQuery Tables).
14878    pub data_access_spec: std::option::Option<crate::model::DataAccessSpec>,
14879
14880    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14881}
14882
14883impl DataAttribute {
14884    pub fn new() -> Self {
14885        std::default::Default::default()
14886    }
14887
14888    /// Sets the value of [name][crate::model::DataAttribute::name].
14889    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14890        self.name = v.into();
14891        self
14892    }
14893
14894    /// Sets the value of [uid][crate::model::DataAttribute::uid].
14895    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14896        self.uid = v.into();
14897        self
14898    }
14899
14900    /// Sets the value of [create_time][crate::model::DataAttribute::create_time].
14901    pub fn set_create_time<T>(mut self, v: T) -> Self
14902    where
14903        T: std::convert::Into<wkt::Timestamp>,
14904    {
14905        self.create_time = std::option::Option::Some(v.into());
14906        self
14907    }
14908
14909    /// Sets or clears the value of [create_time][crate::model::DataAttribute::create_time].
14910    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14911    where
14912        T: std::convert::Into<wkt::Timestamp>,
14913    {
14914        self.create_time = v.map(|x| x.into());
14915        self
14916    }
14917
14918    /// Sets the value of [update_time][crate::model::DataAttribute::update_time].
14919    pub fn set_update_time<T>(mut self, v: T) -> Self
14920    where
14921        T: std::convert::Into<wkt::Timestamp>,
14922    {
14923        self.update_time = std::option::Option::Some(v.into());
14924        self
14925    }
14926
14927    /// Sets or clears the value of [update_time][crate::model::DataAttribute::update_time].
14928    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14929    where
14930        T: std::convert::Into<wkt::Timestamp>,
14931    {
14932        self.update_time = v.map(|x| x.into());
14933        self
14934    }
14935
14936    /// Sets the value of [description][crate::model::DataAttribute::description].
14937    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14938        self.description = v.into();
14939        self
14940    }
14941
14942    /// Sets the value of [display_name][crate::model::DataAttribute::display_name].
14943    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14944        self.display_name = v.into();
14945        self
14946    }
14947
14948    /// Sets the value of [labels][crate::model::DataAttribute::labels].
14949    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
14950    where
14951        T: std::iter::IntoIterator<Item = (K, V)>,
14952        K: std::convert::Into<std::string::String>,
14953        V: std::convert::Into<std::string::String>,
14954    {
14955        use std::iter::Iterator;
14956        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14957        self
14958    }
14959
14960    /// Sets the value of [parent_id][crate::model::DataAttribute::parent_id].
14961    pub fn set_parent_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14962        self.parent_id = v.into();
14963        self
14964    }
14965
14966    /// Sets the value of [attribute_count][crate::model::DataAttribute::attribute_count].
14967    pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14968        self.attribute_count = v.into();
14969        self
14970    }
14971
14972    /// Sets the value of [etag][crate::model::DataAttribute::etag].
14973    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14974        self.etag = v.into();
14975        self
14976    }
14977
14978    /// Sets the value of [resource_access_spec][crate::model::DataAttribute::resource_access_spec].
14979    pub fn set_resource_access_spec<T>(mut self, v: T) -> Self
14980    where
14981        T: std::convert::Into<crate::model::ResourceAccessSpec>,
14982    {
14983        self.resource_access_spec = std::option::Option::Some(v.into());
14984        self
14985    }
14986
14987    /// Sets or clears the value of [resource_access_spec][crate::model::DataAttribute::resource_access_spec].
14988    pub fn set_or_clear_resource_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
14989    where
14990        T: std::convert::Into<crate::model::ResourceAccessSpec>,
14991    {
14992        self.resource_access_spec = v.map(|x| x.into());
14993        self
14994    }
14995
14996    /// Sets the value of [data_access_spec][crate::model::DataAttribute::data_access_spec].
14997    pub fn set_data_access_spec<T>(mut self, v: T) -> Self
14998    where
14999        T: std::convert::Into<crate::model::DataAccessSpec>,
15000    {
15001        self.data_access_spec = std::option::Option::Some(v.into());
15002        self
15003    }
15004
15005    /// Sets or clears the value of [data_access_spec][crate::model::DataAttribute::data_access_spec].
15006    pub fn set_or_clear_data_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
15007    where
15008        T: std::convert::Into<crate::model::DataAccessSpec>,
15009    {
15010        self.data_access_spec = v.map(|x| x.into());
15011        self
15012    }
15013}
15014
15015impl wkt::message::Message for DataAttribute {
15016    fn typename() -> &'static str {
15017        "type.googleapis.com/google.cloud.dataplex.v1.DataAttribute"
15018    }
15019}
15020
15021/// DataAttributeBinding represents binding of attributes to resources. Eg: Bind
15022/// 'CustomerInfo' entity with 'PII' attribute.
15023#[derive(Clone, Default, PartialEq)]
15024#[non_exhaustive]
15025#[deprecated]
15026pub struct DataAttributeBinding {
15027    /// Output only. The relative resource name of the Data Attribute Binding, of
15028    /// the form:
15029    /// projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
15030    pub name: std::string::String,
15031
15032    /// Output only. System generated globally unique ID for the
15033    /// DataAttributeBinding. This ID will be different if the DataAttributeBinding
15034    /// is deleted and re-created with the same name.
15035    pub uid: std::string::String,
15036
15037    /// Output only. The time when the DataAttributeBinding was created.
15038    pub create_time: std::option::Option<wkt::Timestamp>,
15039
15040    /// Output only. The time when the DataAttributeBinding was last updated.
15041    pub update_time: std::option::Option<wkt::Timestamp>,
15042
15043    /// Optional. Description of the DataAttributeBinding.
15044    pub description: std::string::String,
15045
15046    /// Optional. User friendly display name.
15047    pub display_name: std::string::String,
15048
15049    /// Optional. User-defined labels for the DataAttributeBinding.
15050    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
15051
15052    /// This checksum is computed by the server based on the value of other
15053    /// fields, and may be sent on update and delete requests to ensure the
15054    /// client has an up-to-date value before proceeding.
15055    /// Etags must be used when calling the DeleteDataAttributeBinding and the
15056    /// UpdateDataAttributeBinding method.
15057    pub etag: std::string::String,
15058
15059    /// Optional. List of attributes to be associated with the resource, provided
15060    /// in the form:
15061    /// projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
15062    pub attributes: std::vec::Vec<std::string::String>,
15063
15064    /// Optional. The list of paths for items within the associated resource (eg.
15065    /// columns and partitions within a table) along with attribute bindings.
15066    pub paths: std::vec::Vec<crate::model::data_attribute_binding::Path>,
15067
15068    /// The reference to the resource that is associated to attributes, or
15069    /// the query to match resources and associate attributes.
15070    pub resource_reference:
15071        std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
15072
15073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15074}
15075
15076impl DataAttributeBinding {
15077    pub fn new() -> Self {
15078        std::default::Default::default()
15079    }
15080
15081    /// Sets the value of [name][crate::model::DataAttributeBinding::name].
15082    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15083        self.name = v.into();
15084        self
15085    }
15086
15087    /// Sets the value of [uid][crate::model::DataAttributeBinding::uid].
15088    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15089        self.uid = v.into();
15090        self
15091    }
15092
15093    /// Sets the value of [create_time][crate::model::DataAttributeBinding::create_time].
15094    pub fn set_create_time<T>(mut self, v: T) -> Self
15095    where
15096        T: std::convert::Into<wkt::Timestamp>,
15097    {
15098        self.create_time = std::option::Option::Some(v.into());
15099        self
15100    }
15101
15102    /// Sets or clears the value of [create_time][crate::model::DataAttributeBinding::create_time].
15103    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15104    where
15105        T: std::convert::Into<wkt::Timestamp>,
15106    {
15107        self.create_time = v.map(|x| x.into());
15108        self
15109    }
15110
15111    /// Sets the value of [update_time][crate::model::DataAttributeBinding::update_time].
15112    pub fn set_update_time<T>(mut self, v: T) -> Self
15113    where
15114        T: std::convert::Into<wkt::Timestamp>,
15115    {
15116        self.update_time = std::option::Option::Some(v.into());
15117        self
15118    }
15119
15120    /// Sets or clears the value of [update_time][crate::model::DataAttributeBinding::update_time].
15121    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15122    where
15123        T: std::convert::Into<wkt::Timestamp>,
15124    {
15125        self.update_time = v.map(|x| x.into());
15126        self
15127    }
15128
15129    /// Sets the value of [description][crate::model::DataAttributeBinding::description].
15130    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15131        self.description = v.into();
15132        self
15133    }
15134
15135    /// Sets the value of [display_name][crate::model::DataAttributeBinding::display_name].
15136    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15137        self.display_name = v.into();
15138        self
15139    }
15140
15141    /// Sets the value of [labels][crate::model::DataAttributeBinding::labels].
15142    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
15143    where
15144        T: std::iter::IntoIterator<Item = (K, V)>,
15145        K: std::convert::Into<std::string::String>,
15146        V: std::convert::Into<std::string::String>,
15147    {
15148        use std::iter::Iterator;
15149        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
15150        self
15151    }
15152
15153    /// Sets the value of [etag][crate::model::DataAttributeBinding::etag].
15154    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15155        self.etag = v.into();
15156        self
15157    }
15158
15159    /// Sets the value of [attributes][crate::model::DataAttributeBinding::attributes].
15160    pub fn set_attributes<T, V>(mut self, v: T) -> Self
15161    where
15162        T: std::iter::IntoIterator<Item = V>,
15163        V: std::convert::Into<std::string::String>,
15164    {
15165        use std::iter::Iterator;
15166        self.attributes = v.into_iter().map(|i| i.into()).collect();
15167        self
15168    }
15169
15170    /// Sets the value of [paths][crate::model::DataAttributeBinding::paths].
15171    pub fn set_paths<T, V>(mut self, v: T) -> Self
15172    where
15173        T: std::iter::IntoIterator<Item = V>,
15174        V: std::convert::Into<crate::model::data_attribute_binding::Path>,
15175    {
15176        use std::iter::Iterator;
15177        self.paths = v.into_iter().map(|i| i.into()).collect();
15178        self
15179    }
15180
15181    /// Sets the value of [resource_reference][crate::model::DataAttributeBinding::resource_reference].
15182    ///
15183    /// Note that all the setters affecting `resource_reference` are mutually
15184    /// exclusive.
15185    pub fn set_resource_reference<
15186        T: std::convert::Into<
15187                std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
15188            >,
15189    >(
15190        mut self,
15191        v: T,
15192    ) -> Self {
15193        self.resource_reference = v.into();
15194        self
15195    }
15196
15197    /// The value of [resource_reference][crate::model::DataAttributeBinding::resource_reference]
15198    /// if it holds a `Resource`, `None` if the field is not set or
15199    /// holds a different branch.
15200    pub fn resource(&self) -> std::option::Option<&std::string::String> {
15201        #[allow(unreachable_patterns)]
15202        self.resource_reference.as_ref().and_then(|v| match v {
15203            crate::model::data_attribute_binding::ResourceReference::Resource(v) => {
15204                std::option::Option::Some(v)
15205            }
15206            _ => std::option::Option::None,
15207        })
15208    }
15209
15210    /// Sets the value of [resource_reference][crate::model::DataAttributeBinding::resource_reference]
15211    /// to hold a `Resource`.
15212    ///
15213    /// Note that all the setters affecting `resource_reference` are
15214    /// mutually exclusive.
15215    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15216        self.resource_reference = std::option::Option::Some(
15217            crate::model::data_attribute_binding::ResourceReference::Resource(v.into()),
15218        );
15219        self
15220    }
15221}
15222
15223impl wkt::message::Message for DataAttributeBinding {
15224    fn typename() -> &'static str {
15225        "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding"
15226    }
15227}
15228
15229/// Defines additional types related to [DataAttributeBinding].
15230pub mod data_attribute_binding {
15231    #[allow(unused_imports)]
15232    use super::*;
15233
15234    /// Represents a subresource of the given resource, and associated bindings
15235    /// with it. Currently supported subresources are column and partition schema
15236    /// fields within a table.
15237    #[derive(Clone, Default, PartialEq)]
15238    #[non_exhaustive]
15239    pub struct Path {
15240        /// Required. The name identifier of the path.
15241        /// Nested columns should be of the form: 'address.city'.
15242        pub name: std::string::String,
15243
15244        /// Optional. List of attributes to be associated with the path of the
15245        /// resource, provided in the form:
15246        /// projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
15247        pub attributes: std::vec::Vec<std::string::String>,
15248
15249        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15250    }
15251
15252    impl Path {
15253        pub fn new() -> Self {
15254            std::default::Default::default()
15255        }
15256
15257        /// Sets the value of [name][crate::model::data_attribute_binding::Path::name].
15258        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15259            self.name = v.into();
15260            self
15261        }
15262
15263        /// Sets the value of [attributes][crate::model::data_attribute_binding::Path::attributes].
15264        pub fn set_attributes<T, V>(mut self, v: T) -> Self
15265        where
15266            T: std::iter::IntoIterator<Item = V>,
15267            V: std::convert::Into<std::string::String>,
15268        {
15269            use std::iter::Iterator;
15270            self.attributes = v.into_iter().map(|i| i.into()).collect();
15271            self
15272        }
15273    }
15274
15275    impl wkt::message::Message for Path {
15276        fn typename() -> &'static str {
15277            "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding.Path"
15278        }
15279    }
15280
15281    /// The reference to the resource that is associated to attributes, or
15282    /// the query to match resources and associate attributes.
15283    #[derive(Clone, Debug, PartialEq)]
15284    #[non_exhaustive]
15285    pub enum ResourceReference {
15286        /// Optional. Immutable. The resource name of the resource that is associated
15287        /// to attributes. Presently, only entity resource is supported in the form:
15288        /// projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
15289        /// Must belong in the same project and region as the attribute binding, and
15290        /// there can only exist one active binding for a resource.
15291        Resource(std::string::String),
15292    }
15293}
15294
15295/// Create DataTaxonomy request.
15296#[derive(Clone, Default, PartialEq)]
15297#[non_exhaustive]
15298#[deprecated]
15299pub struct CreateDataTaxonomyRequest {
15300    pub parent: std::string::String,
15301
15302    /// Required. DataTaxonomy identifier.
15303    ///
15304    /// * Must contain only lowercase letters, numbers and hyphens.
15305    /// * Must start with a letter.
15306    /// * Must be between 1-63 characters.
15307    /// * Must end with a number or a letter.
15308    /// * Must be unique within the Project.
15309    pub data_taxonomy_id: std::string::String,
15310
15311    /// Required. DataTaxonomy resource.
15312    pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
15313
15314    /// Optional. Only validate the request, but do not perform mutations.
15315    /// The default is false.
15316    pub validate_only: bool,
15317
15318    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15319}
15320
15321impl CreateDataTaxonomyRequest {
15322    pub fn new() -> Self {
15323        std::default::Default::default()
15324    }
15325
15326    /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
15327    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15328        self.parent = v.into();
15329        self
15330    }
15331
15332    /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
15333    pub fn set_data_taxonomy_id<T: std::convert::Into<std::string::String>>(
15334        mut self,
15335        v: T,
15336    ) -> Self {
15337        self.data_taxonomy_id = v.into();
15338        self
15339    }
15340
15341    /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
15342    pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
15343    where
15344        T: std::convert::Into<crate::model::DataTaxonomy>,
15345    {
15346        self.data_taxonomy = std::option::Option::Some(v.into());
15347        self
15348    }
15349
15350    /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
15351    pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
15352    where
15353        T: std::convert::Into<crate::model::DataTaxonomy>,
15354    {
15355        self.data_taxonomy = v.map(|x| x.into());
15356        self
15357    }
15358
15359    /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
15360    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15361        self.validate_only = v.into();
15362        self
15363    }
15364}
15365
15366impl wkt::message::Message for CreateDataTaxonomyRequest {
15367    fn typename() -> &'static str {
15368        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataTaxonomyRequest"
15369    }
15370}
15371
15372/// Update DataTaxonomy request.
15373#[derive(Clone, Default, PartialEq)]
15374#[non_exhaustive]
15375#[deprecated]
15376pub struct UpdateDataTaxonomyRequest {
15377    /// Required. Mask of fields to update.
15378    pub update_mask: std::option::Option<wkt::FieldMask>,
15379
15380    /// Required. Only fields specified in `update_mask` are updated.
15381    pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
15382
15383    /// Optional. Only validate the request, but do not perform mutations.
15384    /// The default is false.
15385    pub validate_only: bool,
15386
15387    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15388}
15389
15390impl UpdateDataTaxonomyRequest {
15391    pub fn new() -> Self {
15392        std::default::Default::default()
15393    }
15394
15395    /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
15396    pub fn set_update_mask<T>(mut self, v: T) -> Self
15397    where
15398        T: std::convert::Into<wkt::FieldMask>,
15399    {
15400        self.update_mask = std::option::Option::Some(v.into());
15401        self
15402    }
15403
15404    /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
15405    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15406    where
15407        T: std::convert::Into<wkt::FieldMask>,
15408    {
15409        self.update_mask = v.map(|x| x.into());
15410        self
15411    }
15412
15413    /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
15414    pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
15415    where
15416        T: std::convert::Into<crate::model::DataTaxonomy>,
15417    {
15418        self.data_taxonomy = std::option::Option::Some(v.into());
15419        self
15420    }
15421
15422    /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
15423    pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
15424    where
15425        T: std::convert::Into<crate::model::DataTaxonomy>,
15426    {
15427        self.data_taxonomy = v.map(|x| x.into());
15428        self
15429    }
15430
15431    /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
15432    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15433        self.validate_only = v.into();
15434        self
15435    }
15436}
15437
15438impl wkt::message::Message for UpdateDataTaxonomyRequest {
15439    fn typename() -> &'static str {
15440        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataTaxonomyRequest"
15441    }
15442}
15443
15444/// Get DataTaxonomy request.
15445#[derive(Clone, Default, PartialEq)]
15446#[non_exhaustive]
15447#[deprecated]
15448pub struct GetDataTaxonomyRequest {
15449    pub name: std::string::String,
15450
15451    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15452}
15453
15454impl GetDataTaxonomyRequest {
15455    pub fn new() -> Self {
15456        std::default::Default::default()
15457    }
15458
15459    /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
15460    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15461        self.name = v.into();
15462        self
15463    }
15464}
15465
15466impl wkt::message::Message for GetDataTaxonomyRequest {
15467    fn typename() -> &'static str {
15468        "type.googleapis.com/google.cloud.dataplex.v1.GetDataTaxonomyRequest"
15469    }
15470}
15471
15472/// List DataTaxonomies request.
15473#[derive(Clone, Default, PartialEq)]
15474#[non_exhaustive]
15475pub struct ListDataTaxonomiesRequest {
15476    /// Required. The resource name of the DataTaxonomy location, of the form:
15477    /// projects/{project_number}/locations/{location_id}
15478    /// where `location_id` refers to a Google Cloud region.
15479    pub parent: std::string::String,
15480
15481    /// Optional. Maximum number of DataTaxonomies to return. The service may
15482    /// return fewer than this value. If unspecified, at most 10 DataTaxonomies
15483    /// will be returned. The maximum value is 1000; values above 1000 will be
15484    /// coerced to 1000.
15485    pub page_size: i32,
15486
15487    /// Optional. Page token received from a previous ` ListDataTaxonomies` call.
15488    /// Provide this to retrieve the subsequent page. When paginating, all other
15489    /// parameters provided to ` ListDataTaxonomies` must match the call that
15490    /// provided the page token.
15491    pub page_token: std::string::String,
15492
15493    /// Optional. Filter request.
15494    pub filter: std::string::String,
15495
15496    /// Optional. Order by fields for the result.
15497    pub order_by: std::string::String,
15498
15499    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15500}
15501
15502impl ListDataTaxonomiesRequest {
15503    pub fn new() -> Self {
15504        std::default::Default::default()
15505    }
15506
15507    /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
15508    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15509        self.parent = v.into();
15510        self
15511    }
15512
15513    /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
15514    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15515        self.page_size = v.into();
15516        self
15517    }
15518
15519    /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
15520    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15521        self.page_token = v.into();
15522        self
15523    }
15524
15525    /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
15526    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15527        self.filter = v.into();
15528        self
15529    }
15530
15531    /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
15532    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15533        self.order_by = v.into();
15534        self
15535    }
15536}
15537
15538impl wkt::message::Message for ListDataTaxonomiesRequest {
15539    fn typename() -> &'static str {
15540        "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesRequest"
15541    }
15542}
15543
15544/// List DataTaxonomies response.
15545#[derive(Clone, Default, PartialEq)]
15546#[non_exhaustive]
15547pub struct ListDataTaxonomiesResponse {
15548    /// DataTaxonomies under the given parent location.
15549    pub data_taxonomies: std::vec::Vec<crate::model::DataTaxonomy>,
15550
15551    /// Token to retrieve the next page of results, or empty if there are no more
15552    /// results in the list.
15553    pub next_page_token: std::string::String,
15554
15555    /// Locations that could not be reached.
15556    pub unreachable_locations: std::vec::Vec<std::string::String>,
15557
15558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15559}
15560
15561impl ListDataTaxonomiesResponse {
15562    pub fn new() -> Self {
15563        std::default::Default::default()
15564    }
15565
15566    /// Sets the value of [data_taxonomies][crate::model::ListDataTaxonomiesResponse::data_taxonomies].
15567    pub fn set_data_taxonomies<T, V>(mut self, v: T) -> Self
15568    where
15569        T: std::iter::IntoIterator<Item = V>,
15570        V: std::convert::Into<crate::model::DataTaxonomy>,
15571    {
15572        use std::iter::Iterator;
15573        self.data_taxonomies = v.into_iter().map(|i| i.into()).collect();
15574        self
15575    }
15576
15577    /// Sets the value of [next_page_token][crate::model::ListDataTaxonomiesResponse::next_page_token].
15578    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15579        self.next_page_token = v.into();
15580        self
15581    }
15582
15583    /// Sets the value of [unreachable_locations][crate::model::ListDataTaxonomiesResponse::unreachable_locations].
15584    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
15585    where
15586        T: std::iter::IntoIterator<Item = V>,
15587        V: std::convert::Into<std::string::String>,
15588    {
15589        use std::iter::Iterator;
15590        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
15591        self
15592    }
15593}
15594
15595impl wkt::message::Message for ListDataTaxonomiesResponse {
15596    fn typename() -> &'static str {
15597        "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesResponse"
15598    }
15599}
15600
15601#[doc(hidden)]
15602impl gax::paginator::internal::PageableResponse for ListDataTaxonomiesResponse {
15603    type PageItem = crate::model::DataTaxonomy;
15604
15605    fn items(self) -> std::vec::Vec<Self::PageItem> {
15606        self.data_taxonomies
15607    }
15608
15609    fn next_page_token(&self) -> std::string::String {
15610        use std::clone::Clone;
15611        self.next_page_token.clone()
15612    }
15613}
15614
15615/// Delete DataTaxonomy request.
15616#[derive(Clone, Default, PartialEq)]
15617#[non_exhaustive]
15618#[deprecated]
15619pub struct DeleteDataTaxonomyRequest {
15620    /// Required. The resource name of the DataTaxonomy:
15621    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
15622    pub name: std::string::String,
15623
15624    /// Optional. If the client provided etag value does not match the current etag
15625    /// value,the DeleteDataTaxonomy method returns an ABORTED error.
15626    pub etag: std::string::String,
15627
15628    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15629}
15630
15631impl DeleteDataTaxonomyRequest {
15632    pub fn new() -> Self {
15633        std::default::Default::default()
15634    }
15635
15636    /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
15637    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15638        self.name = v.into();
15639        self
15640    }
15641
15642    /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
15643    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15644        self.etag = v.into();
15645        self
15646    }
15647}
15648
15649impl wkt::message::Message for DeleteDataTaxonomyRequest {
15650    fn typename() -> &'static str {
15651        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataTaxonomyRequest"
15652    }
15653}
15654
15655/// Create DataAttribute request.
15656#[derive(Clone, Default, PartialEq)]
15657#[non_exhaustive]
15658pub struct CreateDataAttributeRequest {
15659    /// Required. The resource name of the parent data taxonomy
15660    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
15661    pub parent: std::string::String,
15662
15663    /// Required. DataAttribute identifier.
15664    ///
15665    /// * Must contain only lowercase letters, numbers and hyphens.
15666    /// * Must start with a letter.
15667    /// * Must be between 1-63 characters.
15668    /// * Must end with a number or a letter.
15669    /// * Must be unique within the DataTaxonomy.
15670    pub data_attribute_id: std::string::String,
15671
15672    /// Required. DataAttribute resource.
15673    pub data_attribute: std::option::Option<crate::model::DataAttribute>,
15674
15675    /// Optional. Only validate the request, but do not perform mutations.
15676    /// The default is false.
15677    pub validate_only: bool,
15678
15679    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15680}
15681
15682impl CreateDataAttributeRequest {
15683    pub fn new() -> Self {
15684        std::default::Default::default()
15685    }
15686
15687    /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
15688    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15689        self.parent = v.into();
15690        self
15691    }
15692
15693    /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
15694    pub fn set_data_attribute_id<T: std::convert::Into<std::string::String>>(
15695        mut self,
15696        v: T,
15697    ) -> Self {
15698        self.data_attribute_id = v.into();
15699        self
15700    }
15701
15702    /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
15703    pub fn set_data_attribute<T>(mut self, v: T) -> Self
15704    where
15705        T: std::convert::Into<crate::model::DataAttribute>,
15706    {
15707        self.data_attribute = std::option::Option::Some(v.into());
15708        self
15709    }
15710
15711    /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
15712    pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
15713    where
15714        T: std::convert::Into<crate::model::DataAttribute>,
15715    {
15716        self.data_attribute = v.map(|x| x.into());
15717        self
15718    }
15719
15720    /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
15721    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15722        self.validate_only = v.into();
15723        self
15724    }
15725}
15726
15727impl wkt::message::Message for CreateDataAttributeRequest {
15728    fn typename() -> &'static str {
15729        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeRequest"
15730    }
15731}
15732
15733/// Update DataAttribute request.
15734#[derive(Clone, Default, PartialEq)]
15735#[non_exhaustive]
15736pub struct UpdateDataAttributeRequest {
15737    /// Required. Mask of fields to update.
15738    pub update_mask: std::option::Option<wkt::FieldMask>,
15739
15740    /// Required. Only fields specified in `update_mask` are updated.
15741    pub data_attribute: std::option::Option<crate::model::DataAttribute>,
15742
15743    /// Optional. Only validate the request, but do not perform mutations.
15744    /// The default is false.
15745    pub validate_only: bool,
15746
15747    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15748}
15749
15750impl UpdateDataAttributeRequest {
15751    pub fn new() -> Self {
15752        std::default::Default::default()
15753    }
15754
15755    /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
15756    pub fn set_update_mask<T>(mut self, v: T) -> Self
15757    where
15758        T: std::convert::Into<wkt::FieldMask>,
15759    {
15760        self.update_mask = std::option::Option::Some(v.into());
15761        self
15762    }
15763
15764    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
15765    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15766    where
15767        T: std::convert::Into<wkt::FieldMask>,
15768    {
15769        self.update_mask = v.map(|x| x.into());
15770        self
15771    }
15772
15773    /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
15774    pub fn set_data_attribute<T>(mut self, v: T) -> Self
15775    where
15776        T: std::convert::Into<crate::model::DataAttribute>,
15777    {
15778        self.data_attribute = std::option::Option::Some(v.into());
15779        self
15780    }
15781
15782    /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
15783    pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
15784    where
15785        T: std::convert::Into<crate::model::DataAttribute>,
15786    {
15787        self.data_attribute = v.map(|x| x.into());
15788        self
15789    }
15790
15791    /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
15792    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15793        self.validate_only = v.into();
15794        self
15795    }
15796}
15797
15798impl wkt::message::Message for UpdateDataAttributeRequest {
15799    fn typename() -> &'static str {
15800        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeRequest"
15801    }
15802}
15803
15804/// Get DataAttribute request.
15805#[derive(Clone, Default, PartialEq)]
15806#[non_exhaustive]
15807pub struct GetDataAttributeRequest {
15808    /// Required. The resource name of the dataAttribute:
15809    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
15810    pub name: std::string::String,
15811
15812    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15813}
15814
15815impl GetDataAttributeRequest {
15816    pub fn new() -> Self {
15817        std::default::Default::default()
15818    }
15819
15820    /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
15821    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15822        self.name = v.into();
15823        self
15824    }
15825}
15826
15827impl wkt::message::Message for GetDataAttributeRequest {
15828    fn typename() -> &'static str {
15829        "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeRequest"
15830    }
15831}
15832
15833/// List DataAttributes request.
15834#[derive(Clone, Default, PartialEq)]
15835#[non_exhaustive]
15836pub struct ListDataAttributesRequest {
15837    /// Required. The resource name of the DataTaxonomy:
15838    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
15839    pub parent: std::string::String,
15840
15841    /// Optional. Maximum number of DataAttributes to return. The service may
15842    /// return fewer than this value. If unspecified, at most 10 dataAttributes
15843    /// will be returned. The maximum value is 1000; values above 1000 will be
15844    /// coerced to 1000.
15845    pub page_size: i32,
15846
15847    /// Optional. Page token received from a previous `ListDataAttributes` call.
15848    /// Provide this to retrieve the subsequent page. When paginating, all other
15849    /// parameters provided to `ListDataAttributes` must match the call that
15850    /// provided the page token.
15851    pub page_token: std::string::String,
15852
15853    /// Optional. Filter request.
15854    pub filter: std::string::String,
15855
15856    /// Optional. Order by fields for the result.
15857    pub order_by: std::string::String,
15858
15859    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15860}
15861
15862impl ListDataAttributesRequest {
15863    pub fn new() -> Self {
15864        std::default::Default::default()
15865    }
15866
15867    /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
15868    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15869        self.parent = v.into();
15870        self
15871    }
15872
15873    /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
15874    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15875        self.page_size = v.into();
15876        self
15877    }
15878
15879    /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
15880    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15881        self.page_token = v.into();
15882        self
15883    }
15884
15885    /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
15886    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15887        self.filter = v.into();
15888        self
15889    }
15890
15891    /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
15892    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15893        self.order_by = v.into();
15894        self
15895    }
15896}
15897
15898impl wkt::message::Message for ListDataAttributesRequest {
15899    fn typename() -> &'static str {
15900        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesRequest"
15901    }
15902}
15903
15904/// List DataAttributes response.
15905#[derive(Clone, Default, PartialEq)]
15906#[non_exhaustive]
15907pub struct ListDataAttributesResponse {
15908    /// DataAttributes under the given parent DataTaxonomy.
15909    pub data_attributes: std::vec::Vec<crate::model::DataAttribute>,
15910
15911    /// Token to retrieve the next page of results, or empty if there are no more
15912    /// results in the list.
15913    pub next_page_token: std::string::String,
15914
15915    /// Locations that could not be reached.
15916    pub unreachable_locations: std::vec::Vec<std::string::String>,
15917
15918    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15919}
15920
15921impl ListDataAttributesResponse {
15922    pub fn new() -> Self {
15923        std::default::Default::default()
15924    }
15925
15926    /// Sets the value of [data_attributes][crate::model::ListDataAttributesResponse::data_attributes].
15927    pub fn set_data_attributes<T, V>(mut self, v: T) -> Self
15928    where
15929        T: std::iter::IntoIterator<Item = V>,
15930        V: std::convert::Into<crate::model::DataAttribute>,
15931    {
15932        use std::iter::Iterator;
15933        self.data_attributes = v.into_iter().map(|i| i.into()).collect();
15934        self
15935    }
15936
15937    /// Sets the value of [next_page_token][crate::model::ListDataAttributesResponse::next_page_token].
15938    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15939        self.next_page_token = v.into();
15940        self
15941    }
15942
15943    /// Sets the value of [unreachable_locations][crate::model::ListDataAttributesResponse::unreachable_locations].
15944    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
15945    where
15946        T: std::iter::IntoIterator<Item = V>,
15947        V: std::convert::Into<std::string::String>,
15948    {
15949        use std::iter::Iterator;
15950        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
15951        self
15952    }
15953}
15954
15955impl wkt::message::Message for ListDataAttributesResponse {
15956    fn typename() -> &'static str {
15957        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesResponse"
15958    }
15959}
15960
15961#[doc(hidden)]
15962impl gax::paginator::internal::PageableResponse for ListDataAttributesResponse {
15963    type PageItem = crate::model::DataAttribute;
15964
15965    fn items(self) -> std::vec::Vec<Self::PageItem> {
15966        self.data_attributes
15967    }
15968
15969    fn next_page_token(&self) -> std::string::String {
15970        use std::clone::Clone;
15971        self.next_page_token.clone()
15972    }
15973}
15974
15975/// Delete DataAttribute request.
15976#[derive(Clone, Default, PartialEq)]
15977#[non_exhaustive]
15978pub struct DeleteDataAttributeRequest {
15979    /// Required. The resource name of the DataAttribute:
15980    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
15981    pub name: std::string::String,
15982
15983    /// Optional. If the client provided etag value does not match the current etag
15984    /// value, the DeleteDataAttribute method returns an ABORTED error response.
15985    pub etag: std::string::String,
15986
15987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15988}
15989
15990impl DeleteDataAttributeRequest {
15991    pub fn new() -> Self {
15992        std::default::Default::default()
15993    }
15994
15995    /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
15996    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15997        self.name = v.into();
15998        self
15999    }
16000
16001    /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
16002    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16003        self.etag = v.into();
16004        self
16005    }
16006}
16007
16008impl wkt::message::Message for DeleteDataAttributeRequest {
16009    fn typename() -> &'static str {
16010        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeRequest"
16011    }
16012}
16013
16014/// Create DataAttributeBinding request.
16015#[derive(Clone, Default, PartialEq)]
16016#[non_exhaustive]
16017pub struct CreateDataAttributeBindingRequest {
16018    /// Required. The resource name of the parent data taxonomy
16019    /// projects/{project_number}/locations/{location_id}
16020    pub parent: std::string::String,
16021
16022    /// Required. DataAttributeBinding identifier.
16023    ///
16024    /// * Must contain only lowercase letters, numbers and hyphens.
16025    /// * Must start with a letter.
16026    /// * Must be between 1-63 characters.
16027    /// * Must end with a number or a letter.
16028    /// * Must be unique within the Location.
16029    pub data_attribute_binding_id: std::string::String,
16030
16031    /// Required. DataAttributeBinding resource.
16032    pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
16033
16034    /// Optional. Only validate the request, but do not perform mutations.
16035    /// The default is false.
16036    pub validate_only: bool,
16037
16038    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16039}
16040
16041impl CreateDataAttributeBindingRequest {
16042    pub fn new() -> Self {
16043        std::default::Default::default()
16044    }
16045
16046    /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
16047    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16048        self.parent = v.into();
16049        self
16050    }
16051
16052    /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
16053    pub fn set_data_attribute_binding_id<T: std::convert::Into<std::string::String>>(
16054        mut self,
16055        v: T,
16056    ) -> Self {
16057        self.data_attribute_binding_id = v.into();
16058        self
16059    }
16060
16061    /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
16062    pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
16063    where
16064        T: std::convert::Into<crate::model::DataAttributeBinding>,
16065    {
16066        self.data_attribute_binding = std::option::Option::Some(v.into());
16067        self
16068    }
16069
16070    /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
16071    pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
16072    where
16073        T: std::convert::Into<crate::model::DataAttributeBinding>,
16074    {
16075        self.data_attribute_binding = v.map(|x| x.into());
16076        self
16077    }
16078
16079    /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
16080    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16081        self.validate_only = v.into();
16082        self
16083    }
16084}
16085
16086impl wkt::message::Message for CreateDataAttributeBindingRequest {
16087    fn typename() -> &'static str {
16088        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeBindingRequest"
16089    }
16090}
16091
16092/// Update DataAttributeBinding request.
16093#[derive(Clone, Default, PartialEq)]
16094#[non_exhaustive]
16095pub struct UpdateDataAttributeBindingRequest {
16096    /// Required. Mask of fields to update.
16097    pub update_mask: std::option::Option<wkt::FieldMask>,
16098
16099    /// Required. Only fields specified in `update_mask` are updated.
16100    pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
16101
16102    /// Optional. Only validate the request, but do not perform mutations.
16103    /// The default is false.
16104    pub validate_only: bool,
16105
16106    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16107}
16108
16109impl UpdateDataAttributeBindingRequest {
16110    pub fn new() -> Self {
16111        std::default::Default::default()
16112    }
16113
16114    /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
16115    pub fn set_update_mask<T>(mut self, v: T) -> Self
16116    where
16117        T: std::convert::Into<wkt::FieldMask>,
16118    {
16119        self.update_mask = std::option::Option::Some(v.into());
16120        self
16121    }
16122
16123    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
16124    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16125    where
16126        T: std::convert::Into<wkt::FieldMask>,
16127    {
16128        self.update_mask = v.map(|x| x.into());
16129        self
16130    }
16131
16132    /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
16133    pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
16134    where
16135        T: std::convert::Into<crate::model::DataAttributeBinding>,
16136    {
16137        self.data_attribute_binding = std::option::Option::Some(v.into());
16138        self
16139    }
16140
16141    /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
16142    pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
16143    where
16144        T: std::convert::Into<crate::model::DataAttributeBinding>,
16145    {
16146        self.data_attribute_binding = v.map(|x| x.into());
16147        self
16148    }
16149
16150    /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
16151    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16152        self.validate_only = v.into();
16153        self
16154    }
16155}
16156
16157impl wkt::message::Message for UpdateDataAttributeBindingRequest {
16158    fn typename() -> &'static str {
16159        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest"
16160    }
16161}
16162
16163/// Get DataAttributeBinding request.
16164#[derive(Clone, Default, PartialEq)]
16165#[non_exhaustive]
16166pub struct GetDataAttributeBindingRequest {
16167    /// Required. The resource name of the DataAttributeBinding:
16168    /// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
16169    pub name: std::string::String,
16170
16171    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16172}
16173
16174impl GetDataAttributeBindingRequest {
16175    pub fn new() -> Self {
16176        std::default::Default::default()
16177    }
16178
16179    /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
16180    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16181        self.name = v.into();
16182        self
16183    }
16184}
16185
16186impl wkt::message::Message for GetDataAttributeBindingRequest {
16187    fn typename() -> &'static str {
16188        "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeBindingRequest"
16189    }
16190}
16191
16192/// List DataAttributeBindings request.
16193#[derive(Clone, Default, PartialEq)]
16194#[non_exhaustive]
16195pub struct ListDataAttributeBindingsRequest {
16196    /// Required. The resource name of the Location:
16197    /// projects/{project_number}/locations/{location_id}
16198    pub parent: std::string::String,
16199
16200    /// Optional. Maximum number of DataAttributeBindings to return. The service
16201    /// may return fewer than this value. If unspecified, at most 10
16202    /// DataAttributeBindings will be returned. The maximum value is 1000; values
16203    /// above 1000 will be coerced to 1000.
16204    pub page_size: i32,
16205
16206    /// Optional. Page token received from a previous `ListDataAttributeBindings`
16207    /// call. Provide this to retrieve the subsequent page. When paginating, all
16208    /// other parameters provided to `ListDataAttributeBindings` must match the
16209    /// call that provided the page token.
16210    pub page_token: std::string::String,
16211
16212    /// Optional. Filter request.
16213    /// Filter using resource: filter=resource:"resource-name"
16214    /// Filter using attribute: filter=attributes:"attribute-name"
16215    /// Filter using attribute in paths list:
16216    /// filter=paths.attributes:"attribute-name"
16217    pub filter: std::string::String,
16218
16219    /// Optional. Order by fields for the result.
16220    pub order_by: std::string::String,
16221
16222    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16223}
16224
16225impl ListDataAttributeBindingsRequest {
16226    pub fn new() -> Self {
16227        std::default::Default::default()
16228    }
16229
16230    /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
16231    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16232        self.parent = v.into();
16233        self
16234    }
16235
16236    /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
16237    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16238        self.page_size = v.into();
16239        self
16240    }
16241
16242    /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
16243    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16244        self.page_token = v.into();
16245        self
16246    }
16247
16248    /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
16249    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16250        self.filter = v.into();
16251        self
16252    }
16253
16254    /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
16255    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16256        self.order_by = v.into();
16257        self
16258    }
16259}
16260
16261impl wkt::message::Message for ListDataAttributeBindingsRequest {
16262    fn typename() -> &'static str {
16263        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsRequest"
16264    }
16265}
16266
16267/// List DataAttributeBindings response.
16268#[derive(Clone, Default, PartialEq)]
16269#[non_exhaustive]
16270pub struct ListDataAttributeBindingsResponse {
16271    /// DataAttributeBindings under the given parent Location.
16272    pub data_attribute_bindings: std::vec::Vec<crate::model::DataAttributeBinding>,
16273
16274    /// Token to retrieve the next page of results, or empty if there are no more
16275    /// results in the list.
16276    pub next_page_token: std::string::String,
16277
16278    /// Locations that could not be reached.
16279    pub unreachable_locations: std::vec::Vec<std::string::String>,
16280
16281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16282}
16283
16284impl ListDataAttributeBindingsResponse {
16285    pub fn new() -> Self {
16286        std::default::Default::default()
16287    }
16288
16289    /// Sets the value of [data_attribute_bindings][crate::model::ListDataAttributeBindingsResponse::data_attribute_bindings].
16290    pub fn set_data_attribute_bindings<T, V>(mut self, v: T) -> Self
16291    where
16292        T: std::iter::IntoIterator<Item = V>,
16293        V: std::convert::Into<crate::model::DataAttributeBinding>,
16294    {
16295        use std::iter::Iterator;
16296        self.data_attribute_bindings = v.into_iter().map(|i| i.into()).collect();
16297        self
16298    }
16299
16300    /// Sets the value of [next_page_token][crate::model::ListDataAttributeBindingsResponse::next_page_token].
16301    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16302        self.next_page_token = v.into();
16303        self
16304    }
16305
16306    /// Sets the value of [unreachable_locations][crate::model::ListDataAttributeBindingsResponse::unreachable_locations].
16307    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
16308    where
16309        T: std::iter::IntoIterator<Item = V>,
16310        V: std::convert::Into<std::string::String>,
16311    {
16312        use std::iter::Iterator;
16313        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
16314        self
16315    }
16316}
16317
16318impl wkt::message::Message for ListDataAttributeBindingsResponse {
16319    fn typename() -> &'static str {
16320        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsResponse"
16321    }
16322}
16323
16324#[doc(hidden)]
16325impl gax::paginator::internal::PageableResponse for ListDataAttributeBindingsResponse {
16326    type PageItem = crate::model::DataAttributeBinding;
16327
16328    fn items(self) -> std::vec::Vec<Self::PageItem> {
16329        self.data_attribute_bindings
16330    }
16331
16332    fn next_page_token(&self) -> std::string::String {
16333        use std::clone::Clone;
16334        self.next_page_token.clone()
16335    }
16336}
16337
16338/// Delete DataAttributeBinding request.
16339#[derive(Clone, Default, PartialEq)]
16340#[non_exhaustive]
16341pub struct DeleteDataAttributeBindingRequest {
16342    /// Required. The resource name of the DataAttributeBinding:
16343    /// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
16344    pub name: std::string::String,
16345
16346    /// Required. If the client provided etag value does not match the current etag
16347    /// value, the DeleteDataAttributeBindingRequest method returns an ABORTED
16348    /// error response. Etags must be used when calling the
16349    /// DeleteDataAttributeBinding.
16350    pub etag: std::string::String,
16351
16352    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16353}
16354
16355impl DeleteDataAttributeBindingRequest {
16356    pub fn new() -> Self {
16357        std::default::Default::default()
16358    }
16359
16360    /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
16361    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16362        self.name = v.into();
16363        self
16364    }
16365
16366    /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
16367    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16368        self.etag = v.into();
16369        self
16370    }
16371}
16372
16373impl wkt::message::Message for DeleteDataAttributeBindingRequest {
16374    fn typename() -> &'static str {
16375        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest"
16376    }
16377}
16378
16379/// Create dataScan request.
16380#[derive(Clone, Default, PartialEq)]
16381#[non_exhaustive]
16382pub struct CreateDataScanRequest {
16383    /// Required. The resource name of the parent location:
16384    /// `projects/{project}/locations/{location_id}`
16385    /// where `project` refers to a *project_id* or *project_number* and
16386    /// `location_id` refers to a Google Cloud region.
16387    pub parent: std::string::String,
16388
16389    /// Required. DataScan resource.
16390    pub data_scan: std::option::Option<crate::model::DataScan>,
16391
16392    /// Required. DataScan identifier.
16393    ///
16394    /// * Must contain only lowercase letters, numbers and hyphens.
16395    /// * Must start with a letter.
16396    /// * Must end with a number or a letter.
16397    /// * Must be between 1-63 characters.
16398    /// * Must be unique within the customer project / location.
16399    pub data_scan_id: std::string::String,
16400
16401    /// Optional. Only validate the request, but do not perform mutations.
16402    /// The default is `false`.
16403    pub validate_only: bool,
16404
16405    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16406}
16407
16408impl CreateDataScanRequest {
16409    pub fn new() -> Self {
16410        std::default::Default::default()
16411    }
16412
16413    /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
16414    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16415        self.parent = v.into();
16416        self
16417    }
16418
16419    /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
16420    pub fn set_data_scan<T>(mut self, v: T) -> Self
16421    where
16422        T: std::convert::Into<crate::model::DataScan>,
16423    {
16424        self.data_scan = std::option::Option::Some(v.into());
16425        self
16426    }
16427
16428    /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
16429    pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
16430    where
16431        T: std::convert::Into<crate::model::DataScan>,
16432    {
16433        self.data_scan = v.map(|x| x.into());
16434        self
16435    }
16436
16437    /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
16438    pub fn set_data_scan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16439        self.data_scan_id = v.into();
16440        self
16441    }
16442
16443    /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
16444    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16445        self.validate_only = v.into();
16446        self
16447    }
16448}
16449
16450impl wkt::message::Message for CreateDataScanRequest {
16451    fn typename() -> &'static str {
16452        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataScanRequest"
16453    }
16454}
16455
16456/// Update dataScan request.
16457#[derive(Clone, Default, PartialEq)]
16458#[non_exhaustive]
16459pub struct UpdateDataScanRequest {
16460    /// Required. DataScan resource to be updated.
16461    ///
16462    /// Only fields specified in `update_mask` are updated.
16463    pub data_scan: std::option::Option<crate::model::DataScan>,
16464
16465    /// Optional. Mask of fields to update.
16466    pub update_mask: std::option::Option<wkt::FieldMask>,
16467
16468    /// Optional. Only validate the request, but do not perform mutations.
16469    /// The default is `false`.
16470    pub validate_only: bool,
16471
16472    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16473}
16474
16475impl UpdateDataScanRequest {
16476    pub fn new() -> Self {
16477        std::default::Default::default()
16478    }
16479
16480    /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
16481    pub fn set_data_scan<T>(mut self, v: T) -> Self
16482    where
16483        T: std::convert::Into<crate::model::DataScan>,
16484    {
16485        self.data_scan = std::option::Option::Some(v.into());
16486        self
16487    }
16488
16489    /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
16490    pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
16491    where
16492        T: std::convert::Into<crate::model::DataScan>,
16493    {
16494        self.data_scan = v.map(|x| x.into());
16495        self
16496    }
16497
16498    /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
16499    pub fn set_update_mask<T>(mut self, v: T) -> Self
16500    where
16501        T: std::convert::Into<wkt::FieldMask>,
16502    {
16503        self.update_mask = std::option::Option::Some(v.into());
16504        self
16505    }
16506
16507    /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
16508    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16509    where
16510        T: std::convert::Into<wkt::FieldMask>,
16511    {
16512        self.update_mask = v.map(|x| x.into());
16513        self
16514    }
16515
16516    /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
16517    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16518        self.validate_only = v.into();
16519        self
16520    }
16521}
16522
16523impl wkt::message::Message for UpdateDataScanRequest {
16524    fn typename() -> &'static str {
16525        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataScanRequest"
16526    }
16527}
16528
16529/// Delete dataScan request.
16530#[derive(Clone, Default, PartialEq)]
16531#[non_exhaustive]
16532pub struct DeleteDataScanRequest {
16533    /// Required. The resource name of the dataScan:
16534    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
16535    /// where `project` refers to a *project_id* or *project_number* and
16536    /// `location_id` refers to a Google Cloud region.
16537    pub name: std::string::String,
16538
16539    /// Optional. If set to true, any child resources of this data scan will also
16540    /// be deleted. (Otherwise, the request will only work if the data scan has no
16541    /// child resources.)
16542    pub force: bool,
16543
16544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16545}
16546
16547impl DeleteDataScanRequest {
16548    pub fn new() -> Self {
16549        std::default::Default::default()
16550    }
16551
16552    /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
16553    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16554        self.name = v.into();
16555        self
16556    }
16557
16558    /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
16559    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16560        self.force = v.into();
16561        self
16562    }
16563}
16564
16565impl wkt::message::Message for DeleteDataScanRequest {
16566    fn typename() -> &'static str {
16567        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataScanRequest"
16568    }
16569}
16570
16571/// Get dataScan request.
16572#[derive(Clone, Default, PartialEq)]
16573#[non_exhaustive]
16574pub struct GetDataScanRequest {
16575    /// Required. The resource name of the dataScan:
16576    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
16577    /// where `project` refers to a *project_id* or *project_number* and
16578    /// `location_id` refers to a Google Cloud region.
16579    pub name: std::string::String,
16580
16581    /// Optional. Select the DataScan view to return. Defaults to `BASIC`.
16582    pub view: crate::model::get_data_scan_request::DataScanView,
16583
16584    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16585}
16586
16587impl GetDataScanRequest {
16588    pub fn new() -> Self {
16589        std::default::Default::default()
16590    }
16591
16592    /// Sets the value of [name][crate::model::GetDataScanRequest::name].
16593    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16594        self.name = v.into();
16595        self
16596    }
16597
16598    /// Sets the value of [view][crate::model::GetDataScanRequest::view].
16599    pub fn set_view<T: std::convert::Into<crate::model::get_data_scan_request::DataScanView>>(
16600        mut self,
16601        v: T,
16602    ) -> Self {
16603        self.view = v.into();
16604        self
16605    }
16606}
16607
16608impl wkt::message::Message for GetDataScanRequest {
16609    fn typename() -> &'static str {
16610        "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanRequest"
16611    }
16612}
16613
16614/// Defines additional types related to [GetDataScanRequest].
16615pub mod get_data_scan_request {
16616    #[allow(unused_imports)]
16617    use super::*;
16618
16619    /// DataScan view options.
16620    ///
16621    /// # Working with unknown values
16622    ///
16623    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16624    /// additional enum variants at any time. Adding new variants is not considered
16625    /// a breaking change. Applications should write their code in anticipation of:
16626    ///
16627    /// - New values appearing in future releases of the client library, **and**
16628    /// - New values received dynamically, without application changes.
16629    ///
16630    /// Please consult the [Working with enums] section in the user guide for some
16631    /// guidelines.
16632    ///
16633    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16634    #[derive(Clone, Debug, PartialEq)]
16635    #[non_exhaustive]
16636    pub enum DataScanView {
16637        /// The API will default to the `BASIC` view.
16638        Unspecified,
16639        /// Basic view that does not include *spec* and *result*.
16640        Basic,
16641        /// Include everything.
16642        Full,
16643        /// If set, the enum was initialized with an unknown value.
16644        ///
16645        /// Applications can examine the value using [DataScanView::value] or
16646        /// [DataScanView::name].
16647        UnknownValue(data_scan_view::UnknownValue),
16648    }
16649
16650    #[doc(hidden)]
16651    pub mod data_scan_view {
16652        #[allow(unused_imports)]
16653        use super::*;
16654        #[derive(Clone, Debug, PartialEq)]
16655        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16656    }
16657
16658    impl DataScanView {
16659        /// Gets the enum value.
16660        ///
16661        /// Returns `None` if the enum contains an unknown value deserialized from
16662        /// the string representation of enums.
16663        pub fn value(&self) -> std::option::Option<i32> {
16664            match self {
16665                Self::Unspecified => std::option::Option::Some(0),
16666                Self::Basic => std::option::Option::Some(1),
16667                Self::Full => std::option::Option::Some(10),
16668                Self::UnknownValue(u) => u.0.value(),
16669            }
16670        }
16671
16672        /// Gets the enum value as a string.
16673        ///
16674        /// Returns `None` if the enum contains an unknown value deserialized from
16675        /// the integer representation of enums.
16676        pub fn name(&self) -> std::option::Option<&str> {
16677            match self {
16678                Self::Unspecified => std::option::Option::Some("DATA_SCAN_VIEW_UNSPECIFIED"),
16679                Self::Basic => std::option::Option::Some("BASIC"),
16680                Self::Full => std::option::Option::Some("FULL"),
16681                Self::UnknownValue(u) => u.0.name(),
16682            }
16683        }
16684    }
16685
16686    impl std::default::Default for DataScanView {
16687        fn default() -> Self {
16688            use std::convert::From;
16689            Self::from(0)
16690        }
16691    }
16692
16693    impl std::fmt::Display for DataScanView {
16694        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16695            wkt::internal::display_enum(f, self.name(), self.value())
16696        }
16697    }
16698
16699    impl std::convert::From<i32> for DataScanView {
16700        fn from(value: i32) -> Self {
16701            match value {
16702                0 => Self::Unspecified,
16703                1 => Self::Basic,
16704                10 => Self::Full,
16705                _ => Self::UnknownValue(data_scan_view::UnknownValue(
16706                    wkt::internal::UnknownEnumValue::Integer(value),
16707                )),
16708            }
16709        }
16710    }
16711
16712    impl std::convert::From<&str> for DataScanView {
16713        fn from(value: &str) -> Self {
16714            use std::string::ToString;
16715            match value {
16716                "DATA_SCAN_VIEW_UNSPECIFIED" => Self::Unspecified,
16717                "BASIC" => Self::Basic,
16718                "FULL" => Self::Full,
16719                _ => Self::UnknownValue(data_scan_view::UnknownValue(
16720                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16721                )),
16722            }
16723        }
16724    }
16725
16726    impl serde::ser::Serialize for DataScanView {
16727        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16728        where
16729            S: serde::Serializer,
16730        {
16731            match self {
16732                Self::Unspecified => serializer.serialize_i32(0),
16733                Self::Basic => serializer.serialize_i32(1),
16734                Self::Full => serializer.serialize_i32(10),
16735                Self::UnknownValue(u) => u.0.serialize(serializer),
16736            }
16737        }
16738    }
16739
16740    impl<'de> serde::de::Deserialize<'de> for DataScanView {
16741        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16742        where
16743            D: serde::Deserializer<'de>,
16744        {
16745            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanView>::new(
16746                ".google.cloud.dataplex.v1.GetDataScanRequest.DataScanView",
16747            ))
16748        }
16749    }
16750}
16751
16752/// List dataScans request.
16753#[derive(Clone, Default, PartialEq)]
16754#[non_exhaustive]
16755pub struct ListDataScansRequest {
16756    /// Required. The resource name of the parent location:
16757    /// `projects/{project}/locations/{location_id}`
16758    /// where `project` refers to a *project_id* or *project_number* and
16759    /// `location_id` refers to a Google Cloud region.
16760    pub parent: std::string::String,
16761
16762    /// Optional. Maximum number of dataScans to return. The service may return
16763    /// fewer than this value. If unspecified, at most 500 scans will be returned.
16764    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
16765    pub page_size: i32,
16766
16767    /// Optional. Page token received from a previous `ListDataScans` call. Provide
16768    /// this to retrieve the subsequent page. When paginating, all other parameters
16769    /// provided to `ListDataScans` must match the call that provided the
16770    /// page token.
16771    pub page_token: std::string::String,
16772
16773    /// Optional. Filter request.
16774    pub filter: std::string::String,
16775
16776    /// Optional. Order by fields (`name` or `create_time`) for the result.
16777    /// If not specified, the ordering is undefined.
16778    pub order_by: std::string::String,
16779
16780    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16781}
16782
16783impl ListDataScansRequest {
16784    pub fn new() -> Self {
16785        std::default::Default::default()
16786    }
16787
16788    /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
16789    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16790        self.parent = v.into();
16791        self
16792    }
16793
16794    /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
16795    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16796        self.page_size = v.into();
16797        self
16798    }
16799
16800    /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
16801    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16802        self.page_token = v.into();
16803        self
16804    }
16805
16806    /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
16807    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16808        self.filter = v.into();
16809        self
16810    }
16811
16812    /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
16813    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16814        self.order_by = v.into();
16815        self
16816    }
16817}
16818
16819impl wkt::message::Message for ListDataScansRequest {
16820    fn typename() -> &'static str {
16821        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansRequest"
16822    }
16823}
16824
16825/// List dataScans response.
16826#[derive(Clone, Default, PartialEq)]
16827#[non_exhaustive]
16828pub struct ListDataScansResponse {
16829    /// DataScans (`BASIC` view only) under the given parent location.
16830    pub data_scans: std::vec::Vec<crate::model::DataScan>,
16831
16832    /// Token to retrieve the next page of results, or empty if there are no more
16833    /// results in the list.
16834    pub next_page_token: std::string::String,
16835
16836    /// Locations that could not be reached.
16837    pub unreachable: std::vec::Vec<std::string::String>,
16838
16839    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16840}
16841
16842impl ListDataScansResponse {
16843    pub fn new() -> Self {
16844        std::default::Default::default()
16845    }
16846
16847    /// Sets the value of [data_scans][crate::model::ListDataScansResponse::data_scans].
16848    pub fn set_data_scans<T, V>(mut self, v: T) -> Self
16849    where
16850        T: std::iter::IntoIterator<Item = V>,
16851        V: std::convert::Into<crate::model::DataScan>,
16852    {
16853        use std::iter::Iterator;
16854        self.data_scans = v.into_iter().map(|i| i.into()).collect();
16855        self
16856    }
16857
16858    /// Sets the value of [next_page_token][crate::model::ListDataScansResponse::next_page_token].
16859    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16860        self.next_page_token = v.into();
16861        self
16862    }
16863
16864    /// Sets the value of [unreachable][crate::model::ListDataScansResponse::unreachable].
16865    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
16866    where
16867        T: std::iter::IntoIterator<Item = V>,
16868        V: std::convert::Into<std::string::String>,
16869    {
16870        use std::iter::Iterator;
16871        self.unreachable = v.into_iter().map(|i| i.into()).collect();
16872        self
16873    }
16874}
16875
16876impl wkt::message::Message for ListDataScansResponse {
16877    fn typename() -> &'static str {
16878        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansResponse"
16879    }
16880}
16881
16882#[doc(hidden)]
16883impl gax::paginator::internal::PageableResponse for ListDataScansResponse {
16884    type PageItem = crate::model::DataScan;
16885
16886    fn items(self) -> std::vec::Vec<Self::PageItem> {
16887        self.data_scans
16888    }
16889
16890    fn next_page_token(&self) -> std::string::String {
16891        use std::clone::Clone;
16892        self.next_page_token.clone()
16893    }
16894}
16895
16896/// Run DataScan Request
16897#[derive(Clone, Default, PartialEq)]
16898#[non_exhaustive]
16899pub struct RunDataScanRequest {
16900    /// Required. The resource name of the DataScan:
16901    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`.
16902    /// where `project` refers to a *project_id* or *project_number* and
16903    /// `location_id` refers to a Google Cloud region.
16904    ///
16905    /// Only **OnDemand** data scans are allowed.
16906    pub name: std::string::String,
16907
16908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16909}
16910
16911impl RunDataScanRequest {
16912    pub fn new() -> Self {
16913        std::default::Default::default()
16914    }
16915
16916    /// Sets the value of [name][crate::model::RunDataScanRequest::name].
16917    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16918        self.name = v.into();
16919        self
16920    }
16921}
16922
16923impl wkt::message::Message for RunDataScanRequest {
16924    fn typename() -> &'static str {
16925        "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanRequest"
16926    }
16927}
16928
16929/// Run DataScan Response.
16930#[derive(Clone, Default, PartialEq)]
16931#[non_exhaustive]
16932pub struct RunDataScanResponse {
16933    /// DataScanJob created by RunDataScan request.
16934    pub job: std::option::Option<crate::model::DataScanJob>,
16935
16936    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16937}
16938
16939impl RunDataScanResponse {
16940    pub fn new() -> Self {
16941        std::default::Default::default()
16942    }
16943
16944    /// Sets the value of [job][crate::model::RunDataScanResponse::job].
16945    pub fn set_job<T>(mut self, v: T) -> Self
16946    where
16947        T: std::convert::Into<crate::model::DataScanJob>,
16948    {
16949        self.job = std::option::Option::Some(v.into());
16950        self
16951    }
16952
16953    /// Sets or clears the value of [job][crate::model::RunDataScanResponse::job].
16954    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
16955    where
16956        T: std::convert::Into<crate::model::DataScanJob>,
16957    {
16958        self.job = v.map(|x| x.into());
16959        self
16960    }
16961}
16962
16963impl wkt::message::Message for RunDataScanResponse {
16964    fn typename() -> &'static str {
16965        "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanResponse"
16966    }
16967}
16968
16969/// Get DataScanJob request.
16970#[derive(Clone, Default, PartialEq)]
16971#[non_exhaustive]
16972pub struct GetDataScanJobRequest {
16973    /// Required. The resource name of the DataScanJob:
16974    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}`
16975    /// where `project` refers to a *project_id* or *project_number* and
16976    /// `location_id` refers to a Google Cloud region.
16977    pub name: std::string::String,
16978
16979    /// Optional. Select the DataScanJob view to return. Defaults to `BASIC`.
16980    pub view: crate::model::get_data_scan_job_request::DataScanJobView,
16981
16982    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16983}
16984
16985impl GetDataScanJobRequest {
16986    pub fn new() -> Self {
16987        std::default::Default::default()
16988    }
16989
16990    /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
16991    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16992        self.name = v.into();
16993        self
16994    }
16995
16996    /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
16997    pub fn set_view<
16998        T: std::convert::Into<crate::model::get_data_scan_job_request::DataScanJobView>,
16999    >(
17000        mut self,
17001        v: T,
17002    ) -> Self {
17003        self.view = v.into();
17004        self
17005    }
17006}
17007
17008impl wkt::message::Message for GetDataScanJobRequest {
17009    fn typename() -> &'static str {
17010        "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanJobRequest"
17011    }
17012}
17013
17014/// Defines additional types related to [GetDataScanJobRequest].
17015pub mod get_data_scan_job_request {
17016    #[allow(unused_imports)]
17017    use super::*;
17018
17019    /// DataScanJob view options.
17020    ///
17021    /// # Working with unknown values
17022    ///
17023    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17024    /// additional enum variants at any time. Adding new variants is not considered
17025    /// a breaking change. Applications should write their code in anticipation of:
17026    ///
17027    /// - New values appearing in future releases of the client library, **and**
17028    /// - New values received dynamically, without application changes.
17029    ///
17030    /// Please consult the [Working with enums] section in the user guide for some
17031    /// guidelines.
17032    ///
17033    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17034    #[derive(Clone, Debug, PartialEq)]
17035    #[non_exhaustive]
17036    pub enum DataScanJobView {
17037        /// The API will default to the `BASIC` view.
17038        Unspecified,
17039        /// Basic view that does not include *spec* and *result*.
17040        Basic,
17041        /// Include everything.
17042        Full,
17043        /// If set, the enum was initialized with an unknown value.
17044        ///
17045        /// Applications can examine the value using [DataScanJobView::value] or
17046        /// [DataScanJobView::name].
17047        UnknownValue(data_scan_job_view::UnknownValue),
17048    }
17049
17050    #[doc(hidden)]
17051    pub mod data_scan_job_view {
17052        #[allow(unused_imports)]
17053        use super::*;
17054        #[derive(Clone, Debug, PartialEq)]
17055        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17056    }
17057
17058    impl DataScanJobView {
17059        /// Gets the enum value.
17060        ///
17061        /// Returns `None` if the enum contains an unknown value deserialized from
17062        /// the string representation of enums.
17063        pub fn value(&self) -> std::option::Option<i32> {
17064            match self {
17065                Self::Unspecified => std::option::Option::Some(0),
17066                Self::Basic => std::option::Option::Some(1),
17067                Self::Full => std::option::Option::Some(10),
17068                Self::UnknownValue(u) => u.0.value(),
17069            }
17070        }
17071
17072        /// Gets the enum value as a string.
17073        ///
17074        /// Returns `None` if the enum contains an unknown value deserialized from
17075        /// the integer representation of enums.
17076        pub fn name(&self) -> std::option::Option<&str> {
17077            match self {
17078                Self::Unspecified => std::option::Option::Some("DATA_SCAN_JOB_VIEW_UNSPECIFIED"),
17079                Self::Basic => std::option::Option::Some("BASIC"),
17080                Self::Full => std::option::Option::Some("FULL"),
17081                Self::UnknownValue(u) => u.0.name(),
17082            }
17083        }
17084    }
17085
17086    impl std::default::Default for DataScanJobView {
17087        fn default() -> Self {
17088            use std::convert::From;
17089            Self::from(0)
17090        }
17091    }
17092
17093    impl std::fmt::Display for DataScanJobView {
17094        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17095            wkt::internal::display_enum(f, self.name(), self.value())
17096        }
17097    }
17098
17099    impl std::convert::From<i32> for DataScanJobView {
17100        fn from(value: i32) -> Self {
17101            match value {
17102                0 => Self::Unspecified,
17103                1 => Self::Basic,
17104                10 => Self::Full,
17105                _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
17106                    wkt::internal::UnknownEnumValue::Integer(value),
17107                )),
17108            }
17109        }
17110    }
17111
17112    impl std::convert::From<&str> for DataScanJobView {
17113        fn from(value: &str) -> Self {
17114            use std::string::ToString;
17115            match value {
17116                "DATA_SCAN_JOB_VIEW_UNSPECIFIED" => Self::Unspecified,
17117                "BASIC" => Self::Basic,
17118                "FULL" => Self::Full,
17119                _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
17120                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17121                )),
17122            }
17123        }
17124    }
17125
17126    impl serde::ser::Serialize for DataScanJobView {
17127        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17128        where
17129            S: serde::Serializer,
17130        {
17131            match self {
17132                Self::Unspecified => serializer.serialize_i32(0),
17133                Self::Basic => serializer.serialize_i32(1),
17134                Self::Full => serializer.serialize_i32(10),
17135                Self::UnknownValue(u) => u.0.serialize(serializer),
17136            }
17137        }
17138    }
17139
17140    impl<'de> serde::de::Deserialize<'de> for DataScanJobView {
17141        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17142        where
17143            D: serde::Deserializer<'de>,
17144        {
17145            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanJobView>::new(
17146                ".google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView",
17147            ))
17148        }
17149    }
17150}
17151
17152/// List DataScanJobs request.
17153#[derive(Clone, Default, PartialEq)]
17154#[non_exhaustive]
17155pub struct ListDataScanJobsRequest {
17156    /// Required. The resource name of the parent environment:
17157    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
17158    /// where `project` refers to a *project_id* or *project_number* and
17159    /// `location_id` refers to a Google Cloud region.
17160    pub parent: std::string::String,
17161
17162    /// Optional. Maximum number of DataScanJobs to return. The service may return
17163    /// fewer than this value. If unspecified, at most 10 DataScanJobs will be
17164    /// returned. The maximum value is 1000; values above 1000 will be coerced to
17165    /// 1000.
17166    pub page_size: i32,
17167
17168    /// Optional. Page token received from a previous `ListDataScanJobs` call.
17169    /// Provide this to retrieve the subsequent page. When paginating, all other
17170    /// parameters provided to `ListDataScanJobs` must match the call that provided
17171    /// the page token.
17172    pub page_token: std::string::String,
17173
17174    /// Optional. An expression for filtering the results of the ListDataScanJobs
17175    /// request.
17176    ///
17177    /// If unspecified, all datascan jobs will be returned. Multiple filters can be
17178    /// applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
17179    ///
17180    /// Allowed fields are:
17181    ///
17182    /// - `start_time`
17183    /// - `end_time`
17184    ///
17185    /// `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
17186    /// 2018-10-08T18:30:00-07:00).
17187    ///
17188    /// For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
17189    /// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
17190    /// specified start and end times.
17191    pub filter: std::string::String,
17192
17193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17194}
17195
17196impl ListDataScanJobsRequest {
17197    pub fn new() -> Self {
17198        std::default::Default::default()
17199    }
17200
17201    /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
17202    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17203        self.parent = v.into();
17204        self
17205    }
17206
17207    /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
17208    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17209        self.page_size = v.into();
17210        self
17211    }
17212
17213    /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
17214    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17215        self.page_token = v.into();
17216        self
17217    }
17218
17219    /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
17220    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17221        self.filter = v.into();
17222        self
17223    }
17224}
17225
17226impl wkt::message::Message for ListDataScanJobsRequest {
17227    fn typename() -> &'static str {
17228        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsRequest"
17229    }
17230}
17231
17232/// List DataScanJobs response.
17233#[derive(Clone, Default, PartialEq)]
17234#[non_exhaustive]
17235pub struct ListDataScanJobsResponse {
17236    /// DataScanJobs (`BASIC` view only) under a given dataScan.
17237    pub data_scan_jobs: std::vec::Vec<crate::model::DataScanJob>,
17238
17239    /// Token to retrieve the next page of results, or empty if there are no more
17240    /// results in the list.
17241    pub next_page_token: std::string::String,
17242
17243    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17244}
17245
17246impl ListDataScanJobsResponse {
17247    pub fn new() -> Self {
17248        std::default::Default::default()
17249    }
17250
17251    /// Sets the value of [data_scan_jobs][crate::model::ListDataScanJobsResponse::data_scan_jobs].
17252    pub fn set_data_scan_jobs<T, V>(mut self, v: T) -> Self
17253    where
17254        T: std::iter::IntoIterator<Item = V>,
17255        V: std::convert::Into<crate::model::DataScanJob>,
17256    {
17257        use std::iter::Iterator;
17258        self.data_scan_jobs = v.into_iter().map(|i| i.into()).collect();
17259        self
17260    }
17261
17262    /// Sets the value of [next_page_token][crate::model::ListDataScanJobsResponse::next_page_token].
17263    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17264        self.next_page_token = v.into();
17265        self
17266    }
17267}
17268
17269impl wkt::message::Message for ListDataScanJobsResponse {
17270    fn typename() -> &'static str {
17271        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsResponse"
17272    }
17273}
17274
17275#[doc(hidden)]
17276impl gax::paginator::internal::PageableResponse for ListDataScanJobsResponse {
17277    type PageItem = crate::model::DataScanJob;
17278
17279    fn items(self) -> std::vec::Vec<Self::PageItem> {
17280        self.data_scan_jobs
17281    }
17282
17283    fn next_page_token(&self) -> std::string::String {
17284        use std::clone::Clone;
17285        self.next_page_token.clone()
17286    }
17287}
17288
17289/// Request details for generating data quality rule recommendations.
17290#[derive(Clone, Default, PartialEq)]
17291#[non_exhaustive]
17292pub struct GenerateDataQualityRulesRequest {
17293    /// Required. The name must be one of the following:
17294    ///
17295    /// * The name of a data scan with at least one successful, completed data
17296    ///   profiling job
17297    /// * The name of a successful, completed data profiling job (a data scan job
17298    ///   where the job type is data profiling)
17299    pub name: std::string::String,
17300
17301    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17302}
17303
17304impl GenerateDataQualityRulesRequest {
17305    pub fn new() -> Self {
17306        std::default::Default::default()
17307    }
17308
17309    /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
17310    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17311        self.name = v.into();
17312        self
17313    }
17314}
17315
17316impl wkt::message::Message for GenerateDataQualityRulesRequest {
17317    fn typename() -> &'static str {
17318        "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesRequest"
17319    }
17320}
17321
17322/// Response details for data quality rule recommendations.
17323#[derive(Clone, Default, PartialEq)]
17324#[non_exhaustive]
17325pub struct GenerateDataQualityRulesResponse {
17326    /// The data quality rules that Dataplex Universal Catalog generates based on
17327    /// the results of a data profiling scan.
17328    pub rule: std::vec::Vec<crate::model::DataQualityRule>,
17329
17330    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17331}
17332
17333impl GenerateDataQualityRulesResponse {
17334    pub fn new() -> Self {
17335        std::default::Default::default()
17336    }
17337
17338    /// Sets the value of [rule][crate::model::GenerateDataQualityRulesResponse::rule].
17339    pub fn set_rule<T, V>(mut self, v: T) -> Self
17340    where
17341        T: std::iter::IntoIterator<Item = V>,
17342        V: std::convert::Into<crate::model::DataQualityRule>,
17343    {
17344        use std::iter::Iterator;
17345        self.rule = v.into_iter().map(|i| i.into()).collect();
17346        self
17347    }
17348}
17349
17350impl wkt::message::Message for GenerateDataQualityRulesResponse {
17351    fn typename() -> &'static str {
17352        "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesResponse"
17353    }
17354}
17355
17356/// Represents a user-visible job which provides the insights for the related
17357/// data source.
17358///
17359/// For example:
17360///
17361/// * Data quality: generates queries based on the rules and runs against the
17362///   data to get data quality check results. For more information, see [Auto
17363///   data quality
17364///   overview](https://cloud.google.com/dataplex/docs/auto-data-quality-overview).
17365/// * Data profile: analyzes the data in tables and generates insights about
17366///   the structure, content and relationships (such as null percent,
17367///   cardinality, min/max/mean, etc). For more information, see [About data
17368///   profiling](https://cloud.google.com/dataplex/docs/data-profiling-overview).
17369/// * Data discovery: scans data in Cloud Storage buckets to extract and then
17370///   catalog metadata. For more information, see [Discover and catalog Cloud
17371///   Storage data](https://cloud.google.com/bigquery/docs/automatic-discovery).
17372/// * Data documentation: analyzes the table details and generates insights
17373///   including descriptions and sample SQL queries for the table. For more
17374///   information, see [Generate data insights in
17375///   BigQuery](https://cloud.google.com/bigquery/docs/data-insights).
17376#[derive(Clone, Default, PartialEq)]
17377#[non_exhaustive]
17378pub struct DataScan {
17379    /// Output only. Identifier. The relative resource name of the scan, of the
17380    /// form: `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`,
17381    /// where `project` refers to a *project_id* or *project_number* and
17382    /// `location_id` refers to a Google Cloud region.
17383    pub name: std::string::String,
17384
17385    /// Output only. System generated globally unique ID for the scan. This ID will
17386    /// be different if the scan is deleted and re-created with the same name.
17387    pub uid: std::string::String,
17388
17389    /// Optional. Description of the scan.
17390    ///
17391    /// * Must be between 1-1024 characters.
17392    pub description: std::string::String,
17393
17394    /// Optional. User friendly display name.
17395    ///
17396    /// * Must be between 1-256 characters.
17397    pub display_name: std::string::String,
17398
17399    /// Optional. User-defined labels for the scan.
17400    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
17401
17402    /// Output only. Current state of the DataScan.
17403    pub state: crate::model::State,
17404
17405    /// Output only. The time when the scan was created.
17406    pub create_time: std::option::Option<wkt::Timestamp>,
17407
17408    /// Output only. The time when the scan was last updated.
17409    pub update_time: std::option::Option<wkt::Timestamp>,
17410
17411    /// Required. The data source for DataScan.
17412    pub data: std::option::Option<crate::model::DataSource>,
17413
17414    /// Optional. DataScan execution settings.
17415    ///
17416    /// If not specified, the fields in it will use their default values.
17417    pub execution_spec: std::option::Option<crate::model::data_scan::ExecutionSpec>,
17418
17419    /// Output only. Status of the data scan execution.
17420    pub execution_status: std::option::Option<crate::model::data_scan::ExecutionStatus>,
17421
17422    /// Output only. The type of DataScan.
17423    pub r#type: crate::model::DataScanType,
17424
17425    /// Data scan related setting.
17426    /// The settings are required and immutable. After you configure the settings
17427    /// for one type of data scan, you can't change the data scan to a different
17428    /// type of data scan.
17429    pub spec: std::option::Option<crate::model::data_scan::Spec>,
17430
17431    /// The result of the data scan.
17432    pub result: std::option::Option<crate::model::data_scan::Result>,
17433
17434    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17435}
17436
17437impl DataScan {
17438    pub fn new() -> Self {
17439        std::default::Default::default()
17440    }
17441
17442    /// Sets the value of [name][crate::model::DataScan::name].
17443    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17444        self.name = v.into();
17445        self
17446    }
17447
17448    /// Sets the value of [uid][crate::model::DataScan::uid].
17449    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17450        self.uid = v.into();
17451        self
17452    }
17453
17454    /// Sets the value of [description][crate::model::DataScan::description].
17455    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17456        self.description = v.into();
17457        self
17458    }
17459
17460    /// Sets the value of [display_name][crate::model::DataScan::display_name].
17461    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17462        self.display_name = v.into();
17463        self
17464    }
17465
17466    /// Sets the value of [labels][crate::model::DataScan::labels].
17467    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
17468    where
17469        T: std::iter::IntoIterator<Item = (K, V)>,
17470        K: std::convert::Into<std::string::String>,
17471        V: std::convert::Into<std::string::String>,
17472    {
17473        use std::iter::Iterator;
17474        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17475        self
17476    }
17477
17478    /// Sets the value of [state][crate::model::DataScan::state].
17479    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
17480        self.state = v.into();
17481        self
17482    }
17483
17484    /// Sets the value of [create_time][crate::model::DataScan::create_time].
17485    pub fn set_create_time<T>(mut self, v: T) -> Self
17486    where
17487        T: std::convert::Into<wkt::Timestamp>,
17488    {
17489        self.create_time = std::option::Option::Some(v.into());
17490        self
17491    }
17492
17493    /// Sets or clears the value of [create_time][crate::model::DataScan::create_time].
17494    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17495    where
17496        T: std::convert::Into<wkt::Timestamp>,
17497    {
17498        self.create_time = v.map(|x| x.into());
17499        self
17500    }
17501
17502    /// Sets the value of [update_time][crate::model::DataScan::update_time].
17503    pub fn set_update_time<T>(mut self, v: T) -> Self
17504    where
17505        T: std::convert::Into<wkt::Timestamp>,
17506    {
17507        self.update_time = std::option::Option::Some(v.into());
17508        self
17509    }
17510
17511    /// Sets or clears the value of [update_time][crate::model::DataScan::update_time].
17512    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
17513    where
17514        T: std::convert::Into<wkt::Timestamp>,
17515    {
17516        self.update_time = v.map(|x| x.into());
17517        self
17518    }
17519
17520    /// Sets the value of [data][crate::model::DataScan::data].
17521    pub fn set_data<T>(mut self, v: T) -> Self
17522    where
17523        T: std::convert::Into<crate::model::DataSource>,
17524    {
17525        self.data = std::option::Option::Some(v.into());
17526        self
17527    }
17528
17529    /// Sets or clears the value of [data][crate::model::DataScan::data].
17530    pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
17531    where
17532        T: std::convert::Into<crate::model::DataSource>,
17533    {
17534        self.data = v.map(|x| x.into());
17535        self
17536    }
17537
17538    /// Sets the value of [execution_spec][crate::model::DataScan::execution_spec].
17539    pub fn set_execution_spec<T>(mut self, v: T) -> Self
17540    where
17541        T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
17542    {
17543        self.execution_spec = std::option::Option::Some(v.into());
17544        self
17545    }
17546
17547    /// Sets or clears the value of [execution_spec][crate::model::DataScan::execution_spec].
17548    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
17549    where
17550        T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
17551    {
17552        self.execution_spec = v.map(|x| x.into());
17553        self
17554    }
17555
17556    /// Sets the value of [execution_status][crate::model::DataScan::execution_status].
17557    pub fn set_execution_status<T>(mut self, v: T) -> Self
17558    where
17559        T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
17560    {
17561        self.execution_status = std::option::Option::Some(v.into());
17562        self
17563    }
17564
17565    /// Sets or clears the value of [execution_status][crate::model::DataScan::execution_status].
17566    pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
17567    where
17568        T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
17569    {
17570        self.execution_status = v.map(|x| x.into());
17571        self
17572    }
17573
17574    /// Sets the value of [r#type][crate::model::DataScan::type].
17575    pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
17576        self.r#type = v.into();
17577        self
17578    }
17579
17580    /// Sets the value of [spec][crate::model::DataScan::spec].
17581    ///
17582    /// Note that all the setters affecting `spec` are mutually
17583    /// exclusive.
17584    pub fn set_spec<T: std::convert::Into<std::option::Option<crate::model::data_scan::Spec>>>(
17585        mut self,
17586        v: T,
17587    ) -> Self {
17588        self.spec = v.into();
17589        self
17590    }
17591
17592    /// The value of [spec][crate::model::DataScan::spec]
17593    /// if it holds a `DataQualitySpec`, `None` if the field is not set or
17594    /// holds a different branch.
17595    pub fn data_quality_spec(
17596        &self,
17597    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
17598        #[allow(unreachable_patterns)]
17599        self.spec.as_ref().and_then(|v| match v {
17600            crate::model::data_scan::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
17601            _ => std::option::Option::None,
17602        })
17603    }
17604
17605    /// Sets the value of [spec][crate::model::DataScan::spec]
17606    /// to hold a `DataQualitySpec`.
17607    ///
17608    /// Note that all the setters affecting `spec` are
17609    /// mutually exclusive.
17610    pub fn set_data_quality_spec<
17611        T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
17612    >(
17613        mut self,
17614        v: T,
17615    ) -> Self {
17616        self.spec =
17617            std::option::Option::Some(crate::model::data_scan::Spec::DataQualitySpec(v.into()));
17618        self
17619    }
17620
17621    /// The value of [spec][crate::model::DataScan::spec]
17622    /// if it holds a `DataProfileSpec`, `None` if the field is not set or
17623    /// holds a different branch.
17624    pub fn data_profile_spec(
17625        &self,
17626    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
17627        #[allow(unreachable_patterns)]
17628        self.spec.as_ref().and_then(|v| match v {
17629            crate::model::data_scan::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
17630            _ => std::option::Option::None,
17631        })
17632    }
17633
17634    /// Sets the value of [spec][crate::model::DataScan::spec]
17635    /// to hold a `DataProfileSpec`.
17636    ///
17637    /// Note that all the setters affecting `spec` are
17638    /// mutually exclusive.
17639    pub fn set_data_profile_spec<
17640        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
17641    >(
17642        mut self,
17643        v: T,
17644    ) -> Self {
17645        self.spec =
17646            std::option::Option::Some(crate::model::data_scan::Spec::DataProfileSpec(v.into()));
17647        self
17648    }
17649
17650    /// The value of [spec][crate::model::DataScan::spec]
17651    /// if it holds a `DataDiscoverySpec`, `None` if the field is not set or
17652    /// holds a different branch.
17653    pub fn data_discovery_spec(
17654        &self,
17655    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
17656        #[allow(unreachable_patterns)]
17657        self.spec.as_ref().and_then(|v| match v {
17658            crate::model::data_scan::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
17659            _ => std::option::Option::None,
17660        })
17661    }
17662
17663    /// Sets the value of [spec][crate::model::DataScan::spec]
17664    /// to hold a `DataDiscoverySpec`.
17665    ///
17666    /// Note that all the setters affecting `spec` are
17667    /// mutually exclusive.
17668    pub fn set_data_discovery_spec<
17669        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
17670    >(
17671        mut self,
17672        v: T,
17673    ) -> Self {
17674        self.spec =
17675            std::option::Option::Some(crate::model::data_scan::Spec::DataDiscoverySpec(v.into()));
17676        self
17677    }
17678
17679    /// The value of [spec][crate::model::DataScan::spec]
17680    /// if it holds a `DataDocumentationSpec`, `None` if the field is not set or
17681    /// holds a different branch.
17682    pub fn data_documentation_spec(
17683        &self,
17684    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
17685        #[allow(unreachable_patterns)]
17686        self.spec.as_ref().and_then(|v| match v {
17687            crate::model::data_scan::Spec::DataDocumentationSpec(v) => std::option::Option::Some(v),
17688            _ => std::option::Option::None,
17689        })
17690    }
17691
17692    /// Sets the value of [spec][crate::model::DataScan::spec]
17693    /// to hold a `DataDocumentationSpec`.
17694    ///
17695    /// Note that all the setters affecting `spec` are
17696    /// mutually exclusive.
17697    pub fn set_data_documentation_spec<
17698        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
17699    >(
17700        mut self,
17701        v: T,
17702    ) -> Self {
17703        self.spec = std::option::Option::Some(
17704            crate::model::data_scan::Spec::DataDocumentationSpec(v.into()),
17705        );
17706        self
17707    }
17708
17709    /// Sets the value of [result][crate::model::DataScan::result].
17710    ///
17711    /// Note that all the setters affecting `result` are mutually
17712    /// exclusive.
17713    pub fn set_result<
17714        T: std::convert::Into<std::option::Option<crate::model::data_scan::Result>>,
17715    >(
17716        mut self,
17717        v: T,
17718    ) -> Self {
17719        self.result = v.into();
17720        self
17721    }
17722
17723    /// The value of [result][crate::model::DataScan::result]
17724    /// if it holds a `DataQualityResult`, `None` if the field is not set or
17725    /// holds a different branch.
17726    pub fn data_quality_result(
17727        &self,
17728    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
17729        #[allow(unreachable_patterns)]
17730        self.result.as_ref().and_then(|v| match v {
17731            crate::model::data_scan::Result::DataQualityResult(v) => std::option::Option::Some(v),
17732            _ => std::option::Option::None,
17733        })
17734    }
17735
17736    /// Sets the value of [result][crate::model::DataScan::result]
17737    /// to hold a `DataQualityResult`.
17738    ///
17739    /// Note that all the setters affecting `result` are
17740    /// mutually exclusive.
17741    pub fn set_data_quality_result<
17742        T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
17743    >(
17744        mut self,
17745        v: T,
17746    ) -> Self {
17747        self.result =
17748            std::option::Option::Some(crate::model::data_scan::Result::DataQualityResult(v.into()));
17749        self
17750    }
17751
17752    /// The value of [result][crate::model::DataScan::result]
17753    /// if it holds a `DataProfileResult`, `None` if the field is not set or
17754    /// holds a different branch.
17755    pub fn data_profile_result(
17756        &self,
17757    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
17758        #[allow(unreachable_patterns)]
17759        self.result.as_ref().and_then(|v| match v {
17760            crate::model::data_scan::Result::DataProfileResult(v) => std::option::Option::Some(v),
17761            _ => std::option::Option::None,
17762        })
17763    }
17764
17765    /// Sets the value of [result][crate::model::DataScan::result]
17766    /// to hold a `DataProfileResult`.
17767    ///
17768    /// Note that all the setters affecting `result` are
17769    /// mutually exclusive.
17770    pub fn set_data_profile_result<
17771        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
17772    >(
17773        mut self,
17774        v: T,
17775    ) -> Self {
17776        self.result =
17777            std::option::Option::Some(crate::model::data_scan::Result::DataProfileResult(v.into()));
17778        self
17779    }
17780
17781    /// The value of [result][crate::model::DataScan::result]
17782    /// if it holds a `DataDiscoveryResult`, `None` if the field is not set or
17783    /// holds a different branch.
17784    pub fn data_discovery_result(
17785        &self,
17786    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
17787        #[allow(unreachable_patterns)]
17788        self.result.as_ref().and_then(|v| match v {
17789            crate::model::data_scan::Result::DataDiscoveryResult(v) => std::option::Option::Some(v),
17790            _ => std::option::Option::None,
17791        })
17792    }
17793
17794    /// Sets the value of [result][crate::model::DataScan::result]
17795    /// to hold a `DataDiscoveryResult`.
17796    ///
17797    /// Note that all the setters affecting `result` are
17798    /// mutually exclusive.
17799    pub fn set_data_discovery_result<
17800        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
17801    >(
17802        mut self,
17803        v: T,
17804    ) -> Self {
17805        self.result = std::option::Option::Some(
17806            crate::model::data_scan::Result::DataDiscoveryResult(v.into()),
17807        );
17808        self
17809    }
17810
17811    /// The value of [result][crate::model::DataScan::result]
17812    /// if it holds a `DataDocumentationResult`, `None` if the field is not set or
17813    /// holds a different branch.
17814    pub fn data_documentation_result(
17815        &self,
17816    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
17817        #[allow(unreachable_patterns)]
17818        self.result.as_ref().and_then(|v| match v {
17819            crate::model::data_scan::Result::DataDocumentationResult(v) => {
17820                std::option::Option::Some(v)
17821            }
17822            _ => std::option::Option::None,
17823        })
17824    }
17825
17826    /// Sets the value of [result][crate::model::DataScan::result]
17827    /// to hold a `DataDocumentationResult`.
17828    ///
17829    /// Note that all the setters affecting `result` are
17830    /// mutually exclusive.
17831    pub fn set_data_documentation_result<
17832        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
17833    >(
17834        mut self,
17835        v: T,
17836    ) -> Self {
17837        self.result = std::option::Option::Some(
17838            crate::model::data_scan::Result::DataDocumentationResult(v.into()),
17839        );
17840        self
17841    }
17842}
17843
17844impl wkt::message::Message for DataScan {
17845    fn typename() -> &'static str {
17846        "type.googleapis.com/google.cloud.dataplex.v1.DataScan"
17847    }
17848}
17849
17850/// Defines additional types related to [DataScan].
17851pub mod data_scan {
17852    #[allow(unused_imports)]
17853    use super::*;
17854
17855    /// DataScan execution settings.
17856    #[derive(Clone, Default, PartialEq)]
17857    #[non_exhaustive]
17858    pub struct ExecutionSpec {
17859        /// Optional. Spec related to how often and when a scan should be triggered.
17860        ///
17861        /// If not specified, the default is `OnDemand`, which means the scan will
17862        /// not run until the user calls `RunDataScan` API.
17863        pub trigger: std::option::Option<crate::model::Trigger>,
17864
17865        /// Spec related to incremental scan of the data
17866        ///
17867        /// When an option is selected for incremental scan, it cannot be unset or
17868        /// changed. If not specified, a data scan will run for all data in the
17869        /// table.
17870        pub incremental: std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
17871
17872        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17873    }
17874
17875    impl ExecutionSpec {
17876        pub fn new() -> Self {
17877            std::default::Default::default()
17878        }
17879
17880        /// Sets the value of [trigger][crate::model::data_scan::ExecutionSpec::trigger].
17881        pub fn set_trigger<T>(mut self, v: T) -> Self
17882        where
17883            T: std::convert::Into<crate::model::Trigger>,
17884        {
17885            self.trigger = std::option::Option::Some(v.into());
17886            self
17887        }
17888
17889        /// Sets or clears the value of [trigger][crate::model::data_scan::ExecutionSpec::trigger].
17890        pub fn set_or_clear_trigger<T>(mut self, v: std::option::Option<T>) -> Self
17891        where
17892            T: std::convert::Into<crate::model::Trigger>,
17893        {
17894            self.trigger = v.map(|x| x.into());
17895            self
17896        }
17897
17898        /// Sets the value of [incremental][crate::model::data_scan::ExecutionSpec::incremental].
17899        ///
17900        /// Note that all the setters affecting `incremental` are mutually
17901        /// exclusive.
17902        pub fn set_incremental<
17903            T: std::convert::Into<
17904                    std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
17905                >,
17906        >(
17907            mut self,
17908            v: T,
17909        ) -> Self {
17910            self.incremental = v.into();
17911            self
17912        }
17913
17914        /// The value of [incremental][crate::model::data_scan::ExecutionSpec::incremental]
17915        /// if it holds a `Field`, `None` if the field is not set or
17916        /// holds a different branch.
17917        pub fn field(&self) -> std::option::Option<&std::string::String> {
17918            #[allow(unreachable_patterns)]
17919            self.incremental.as_ref().and_then(|v| match v {
17920                crate::model::data_scan::execution_spec::Incremental::Field(v) => {
17921                    std::option::Option::Some(v)
17922                }
17923                _ => std::option::Option::None,
17924            })
17925        }
17926
17927        /// Sets the value of [incremental][crate::model::data_scan::ExecutionSpec::incremental]
17928        /// to hold a `Field`.
17929        ///
17930        /// Note that all the setters affecting `incremental` are
17931        /// mutually exclusive.
17932        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17933            self.incremental = std::option::Option::Some(
17934                crate::model::data_scan::execution_spec::Incremental::Field(v.into()),
17935            );
17936            self
17937        }
17938    }
17939
17940    impl wkt::message::Message for ExecutionSpec {
17941        fn typename() -> &'static str {
17942            "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionSpec"
17943        }
17944    }
17945
17946    /// Defines additional types related to [ExecutionSpec].
17947    pub mod execution_spec {
17948        #[allow(unused_imports)]
17949        use super::*;
17950
17951        /// Spec related to incremental scan of the data
17952        ///
17953        /// When an option is selected for incremental scan, it cannot be unset or
17954        /// changed. If not specified, a data scan will run for all data in the
17955        /// table.
17956        #[derive(Clone, Debug, PartialEq)]
17957        #[non_exhaustive]
17958        pub enum Incremental {
17959            /// Immutable. The unnested field (of type *Date* or *Timestamp*) that
17960            /// contains values which monotonically increase over time.
17961            ///
17962            /// If not specified, a data scan will run for all data in the table.
17963            Field(std::string::String),
17964        }
17965    }
17966
17967    /// Status of the data scan execution.
17968    #[derive(Clone, Default, PartialEq)]
17969    #[non_exhaustive]
17970    pub struct ExecutionStatus {
17971        /// Optional. The time when the latest DataScanJob started.
17972        pub latest_job_start_time: std::option::Option<wkt::Timestamp>,
17973
17974        /// Optional. The time when the latest DataScanJob ended.
17975        pub latest_job_end_time: std::option::Option<wkt::Timestamp>,
17976
17977        /// Optional. The time when the DataScanJob execution was created.
17978        pub latest_job_create_time: std::option::Option<wkt::Timestamp>,
17979
17980        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17981    }
17982
17983    impl ExecutionStatus {
17984        pub fn new() -> Self {
17985            std::default::Default::default()
17986        }
17987
17988        /// Sets the value of [latest_job_start_time][crate::model::data_scan::ExecutionStatus::latest_job_start_time].
17989        pub fn set_latest_job_start_time<T>(mut self, v: T) -> Self
17990        where
17991            T: std::convert::Into<wkt::Timestamp>,
17992        {
17993            self.latest_job_start_time = std::option::Option::Some(v.into());
17994            self
17995        }
17996
17997        /// Sets or clears the value of [latest_job_start_time][crate::model::data_scan::ExecutionStatus::latest_job_start_time].
17998        pub fn set_or_clear_latest_job_start_time<T>(mut self, v: std::option::Option<T>) -> Self
17999        where
18000            T: std::convert::Into<wkt::Timestamp>,
18001        {
18002            self.latest_job_start_time = v.map(|x| x.into());
18003            self
18004        }
18005
18006        /// Sets the value of [latest_job_end_time][crate::model::data_scan::ExecutionStatus::latest_job_end_time].
18007        pub fn set_latest_job_end_time<T>(mut self, v: T) -> Self
18008        where
18009            T: std::convert::Into<wkt::Timestamp>,
18010        {
18011            self.latest_job_end_time = std::option::Option::Some(v.into());
18012            self
18013        }
18014
18015        /// Sets or clears the value of [latest_job_end_time][crate::model::data_scan::ExecutionStatus::latest_job_end_time].
18016        pub fn set_or_clear_latest_job_end_time<T>(mut self, v: std::option::Option<T>) -> Self
18017        where
18018            T: std::convert::Into<wkt::Timestamp>,
18019        {
18020            self.latest_job_end_time = v.map(|x| x.into());
18021            self
18022        }
18023
18024        /// Sets the value of [latest_job_create_time][crate::model::data_scan::ExecutionStatus::latest_job_create_time].
18025        pub fn set_latest_job_create_time<T>(mut self, v: T) -> Self
18026        where
18027            T: std::convert::Into<wkt::Timestamp>,
18028        {
18029            self.latest_job_create_time = std::option::Option::Some(v.into());
18030            self
18031        }
18032
18033        /// Sets or clears the value of [latest_job_create_time][crate::model::data_scan::ExecutionStatus::latest_job_create_time].
18034        pub fn set_or_clear_latest_job_create_time<T>(mut self, v: std::option::Option<T>) -> Self
18035        where
18036            T: std::convert::Into<wkt::Timestamp>,
18037        {
18038            self.latest_job_create_time = v.map(|x| x.into());
18039            self
18040        }
18041    }
18042
18043    impl wkt::message::Message for ExecutionStatus {
18044        fn typename() -> &'static str {
18045            "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionStatus"
18046        }
18047    }
18048
18049    /// Data scan related setting.
18050    /// The settings are required and immutable. After you configure the settings
18051    /// for one type of data scan, you can't change the data scan to a different
18052    /// type of data scan.
18053    #[derive(Clone, Debug, PartialEq)]
18054    #[non_exhaustive]
18055    pub enum Spec {
18056        /// Settings for a data quality scan.
18057        DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
18058        /// Settings for a data profile scan.
18059        DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
18060        /// Settings for a data discovery scan.
18061        DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
18062        /// Settings for a data documentation scan.
18063        DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
18064    }
18065
18066    /// The result of the data scan.
18067    #[derive(Clone, Debug, PartialEq)]
18068    #[non_exhaustive]
18069    pub enum Result {
18070        /// Output only. The result of a data quality scan.
18071        DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
18072        /// Output only. The result of a data profile scan.
18073        DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
18074        /// Output only. The result of a data discovery scan.
18075        DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
18076        /// Output only. The result of a data documentation scan.
18077        DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
18078    }
18079}
18080
18081/// A DataScanJob represents an instance of DataScan execution.
18082#[derive(Clone, Default, PartialEq)]
18083#[non_exhaustive]
18084pub struct DataScanJob {
18085    /// Output only. Identifier. The relative resource name of the DataScanJob, of
18086    /// the form:
18087    /// `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`,
18088    /// where `project` refers to a *project_id* or *project_number* and
18089    /// `location_id` refers to a Google Cloud region.
18090    pub name: std::string::String,
18091
18092    /// Output only. System generated globally unique ID for the DataScanJob.
18093    pub uid: std::string::String,
18094
18095    /// Output only. The time when the DataScanJob was created.
18096    pub create_time: std::option::Option<wkt::Timestamp>,
18097
18098    /// Output only. The time when the DataScanJob was started.
18099    pub start_time: std::option::Option<wkt::Timestamp>,
18100
18101    /// Output only. The time when the DataScanJob ended.
18102    pub end_time: std::option::Option<wkt::Timestamp>,
18103
18104    /// Output only. Execution state for the DataScanJob.
18105    pub state: crate::model::data_scan_job::State,
18106
18107    /// Output only. Additional information about the current state.
18108    pub message: std::string::String,
18109
18110    /// Output only. The type of the parent DataScan.
18111    pub r#type: crate::model::DataScanType,
18112
18113    /// Data scan related setting.
18114    pub spec: std::option::Option<crate::model::data_scan_job::Spec>,
18115
18116    /// The result of the data scan.
18117    pub result: std::option::Option<crate::model::data_scan_job::Result>,
18118
18119    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18120}
18121
18122impl DataScanJob {
18123    pub fn new() -> Self {
18124        std::default::Default::default()
18125    }
18126
18127    /// Sets the value of [name][crate::model::DataScanJob::name].
18128    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18129        self.name = v.into();
18130        self
18131    }
18132
18133    /// Sets the value of [uid][crate::model::DataScanJob::uid].
18134    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18135        self.uid = v.into();
18136        self
18137    }
18138
18139    /// Sets the value of [create_time][crate::model::DataScanJob::create_time].
18140    pub fn set_create_time<T>(mut self, v: T) -> Self
18141    where
18142        T: std::convert::Into<wkt::Timestamp>,
18143    {
18144        self.create_time = std::option::Option::Some(v.into());
18145        self
18146    }
18147
18148    /// Sets or clears the value of [create_time][crate::model::DataScanJob::create_time].
18149    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
18150    where
18151        T: std::convert::Into<wkt::Timestamp>,
18152    {
18153        self.create_time = v.map(|x| x.into());
18154        self
18155    }
18156
18157    /// Sets the value of [start_time][crate::model::DataScanJob::start_time].
18158    pub fn set_start_time<T>(mut self, v: T) -> Self
18159    where
18160        T: std::convert::Into<wkt::Timestamp>,
18161    {
18162        self.start_time = std::option::Option::Some(v.into());
18163        self
18164    }
18165
18166    /// Sets or clears the value of [start_time][crate::model::DataScanJob::start_time].
18167    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
18168    where
18169        T: std::convert::Into<wkt::Timestamp>,
18170    {
18171        self.start_time = v.map(|x| x.into());
18172        self
18173    }
18174
18175    /// Sets the value of [end_time][crate::model::DataScanJob::end_time].
18176    pub fn set_end_time<T>(mut self, v: T) -> Self
18177    where
18178        T: std::convert::Into<wkt::Timestamp>,
18179    {
18180        self.end_time = std::option::Option::Some(v.into());
18181        self
18182    }
18183
18184    /// Sets or clears the value of [end_time][crate::model::DataScanJob::end_time].
18185    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
18186    where
18187        T: std::convert::Into<wkt::Timestamp>,
18188    {
18189        self.end_time = v.map(|x| x.into());
18190        self
18191    }
18192
18193    /// Sets the value of [state][crate::model::DataScanJob::state].
18194    pub fn set_state<T: std::convert::Into<crate::model::data_scan_job::State>>(
18195        mut self,
18196        v: T,
18197    ) -> Self {
18198        self.state = v.into();
18199        self
18200    }
18201
18202    /// Sets the value of [message][crate::model::DataScanJob::message].
18203    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18204        self.message = v.into();
18205        self
18206    }
18207
18208    /// Sets the value of [r#type][crate::model::DataScanJob::type].
18209    pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
18210        self.r#type = v.into();
18211        self
18212    }
18213
18214    /// Sets the value of [spec][crate::model::DataScanJob::spec].
18215    ///
18216    /// Note that all the setters affecting `spec` are mutually
18217    /// exclusive.
18218    pub fn set_spec<
18219        T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Spec>>,
18220    >(
18221        mut self,
18222        v: T,
18223    ) -> Self {
18224        self.spec = v.into();
18225        self
18226    }
18227
18228    /// The value of [spec][crate::model::DataScanJob::spec]
18229    /// if it holds a `DataQualitySpec`, `None` if the field is not set or
18230    /// holds a different branch.
18231    pub fn data_quality_spec(
18232        &self,
18233    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
18234        #[allow(unreachable_patterns)]
18235        self.spec.as_ref().and_then(|v| match v {
18236            crate::model::data_scan_job::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
18237            _ => std::option::Option::None,
18238        })
18239    }
18240
18241    /// Sets the value of [spec][crate::model::DataScanJob::spec]
18242    /// to hold a `DataQualitySpec`.
18243    ///
18244    /// Note that all the setters affecting `spec` are
18245    /// mutually exclusive.
18246    pub fn set_data_quality_spec<
18247        T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
18248    >(
18249        mut self,
18250        v: T,
18251    ) -> Self {
18252        self.spec =
18253            std::option::Option::Some(crate::model::data_scan_job::Spec::DataQualitySpec(v.into()));
18254        self
18255    }
18256
18257    /// The value of [spec][crate::model::DataScanJob::spec]
18258    /// if it holds a `DataProfileSpec`, `None` if the field is not set or
18259    /// holds a different branch.
18260    pub fn data_profile_spec(
18261        &self,
18262    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
18263        #[allow(unreachable_patterns)]
18264        self.spec.as_ref().and_then(|v| match v {
18265            crate::model::data_scan_job::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
18266            _ => std::option::Option::None,
18267        })
18268    }
18269
18270    /// Sets the value of [spec][crate::model::DataScanJob::spec]
18271    /// to hold a `DataProfileSpec`.
18272    ///
18273    /// Note that all the setters affecting `spec` are
18274    /// mutually exclusive.
18275    pub fn set_data_profile_spec<
18276        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
18277    >(
18278        mut self,
18279        v: T,
18280    ) -> Self {
18281        self.spec =
18282            std::option::Option::Some(crate::model::data_scan_job::Spec::DataProfileSpec(v.into()));
18283        self
18284    }
18285
18286    /// The value of [spec][crate::model::DataScanJob::spec]
18287    /// if it holds a `DataDiscoverySpec`, `None` if the field is not set or
18288    /// holds a different branch.
18289    pub fn data_discovery_spec(
18290        &self,
18291    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
18292        #[allow(unreachable_patterns)]
18293        self.spec.as_ref().and_then(|v| match v {
18294            crate::model::data_scan_job::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
18295            _ => std::option::Option::None,
18296        })
18297    }
18298
18299    /// Sets the value of [spec][crate::model::DataScanJob::spec]
18300    /// to hold a `DataDiscoverySpec`.
18301    ///
18302    /// Note that all the setters affecting `spec` are
18303    /// mutually exclusive.
18304    pub fn set_data_discovery_spec<
18305        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
18306    >(
18307        mut self,
18308        v: T,
18309    ) -> Self {
18310        self.spec = std::option::Option::Some(
18311            crate::model::data_scan_job::Spec::DataDiscoverySpec(v.into()),
18312        );
18313        self
18314    }
18315
18316    /// The value of [spec][crate::model::DataScanJob::spec]
18317    /// if it holds a `DataDocumentationSpec`, `None` if the field is not set or
18318    /// holds a different branch.
18319    pub fn data_documentation_spec(
18320        &self,
18321    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
18322        #[allow(unreachable_patterns)]
18323        self.spec.as_ref().and_then(|v| match v {
18324            crate::model::data_scan_job::Spec::DataDocumentationSpec(v) => {
18325                std::option::Option::Some(v)
18326            }
18327            _ => std::option::Option::None,
18328        })
18329    }
18330
18331    /// Sets the value of [spec][crate::model::DataScanJob::spec]
18332    /// to hold a `DataDocumentationSpec`.
18333    ///
18334    /// Note that all the setters affecting `spec` are
18335    /// mutually exclusive.
18336    pub fn set_data_documentation_spec<
18337        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
18338    >(
18339        mut self,
18340        v: T,
18341    ) -> Self {
18342        self.spec = std::option::Option::Some(
18343            crate::model::data_scan_job::Spec::DataDocumentationSpec(v.into()),
18344        );
18345        self
18346    }
18347
18348    /// Sets the value of [result][crate::model::DataScanJob::result].
18349    ///
18350    /// Note that all the setters affecting `result` are mutually
18351    /// exclusive.
18352    pub fn set_result<
18353        T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Result>>,
18354    >(
18355        mut self,
18356        v: T,
18357    ) -> Self {
18358        self.result = v.into();
18359        self
18360    }
18361
18362    /// The value of [result][crate::model::DataScanJob::result]
18363    /// if it holds a `DataQualityResult`, `None` if the field is not set or
18364    /// holds a different branch.
18365    pub fn data_quality_result(
18366        &self,
18367    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
18368        #[allow(unreachable_patterns)]
18369        self.result.as_ref().and_then(|v| match v {
18370            crate::model::data_scan_job::Result::DataQualityResult(v) => {
18371                std::option::Option::Some(v)
18372            }
18373            _ => std::option::Option::None,
18374        })
18375    }
18376
18377    /// Sets the value of [result][crate::model::DataScanJob::result]
18378    /// to hold a `DataQualityResult`.
18379    ///
18380    /// Note that all the setters affecting `result` are
18381    /// mutually exclusive.
18382    pub fn set_data_quality_result<
18383        T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
18384    >(
18385        mut self,
18386        v: T,
18387    ) -> Self {
18388        self.result = std::option::Option::Some(
18389            crate::model::data_scan_job::Result::DataQualityResult(v.into()),
18390        );
18391        self
18392    }
18393
18394    /// The value of [result][crate::model::DataScanJob::result]
18395    /// if it holds a `DataProfileResult`, `None` if the field is not set or
18396    /// holds a different branch.
18397    pub fn data_profile_result(
18398        &self,
18399    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
18400        #[allow(unreachable_patterns)]
18401        self.result.as_ref().and_then(|v| match v {
18402            crate::model::data_scan_job::Result::DataProfileResult(v) => {
18403                std::option::Option::Some(v)
18404            }
18405            _ => std::option::Option::None,
18406        })
18407    }
18408
18409    /// Sets the value of [result][crate::model::DataScanJob::result]
18410    /// to hold a `DataProfileResult`.
18411    ///
18412    /// Note that all the setters affecting `result` are
18413    /// mutually exclusive.
18414    pub fn set_data_profile_result<
18415        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
18416    >(
18417        mut self,
18418        v: T,
18419    ) -> Self {
18420        self.result = std::option::Option::Some(
18421            crate::model::data_scan_job::Result::DataProfileResult(v.into()),
18422        );
18423        self
18424    }
18425
18426    /// The value of [result][crate::model::DataScanJob::result]
18427    /// if it holds a `DataDiscoveryResult`, `None` if the field is not set or
18428    /// holds a different branch.
18429    pub fn data_discovery_result(
18430        &self,
18431    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
18432        #[allow(unreachable_patterns)]
18433        self.result.as_ref().and_then(|v| match v {
18434            crate::model::data_scan_job::Result::DataDiscoveryResult(v) => {
18435                std::option::Option::Some(v)
18436            }
18437            _ => std::option::Option::None,
18438        })
18439    }
18440
18441    /// Sets the value of [result][crate::model::DataScanJob::result]
18442    /// to hold a `DataDiscoveryResult`.
18443    ///
18444    /// Note that all the setters affecting `result` are
18445    /// mutually exclusive.
18446    pub fn set_data_discovery_result<
18447        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
18448    >(
18449        mut self,
18450        v: T,
18451    ) -> Self {
18452        self.result = std::option::Option::Some(
18453            crate::model::data_scan_job::Result::DataDiscoveryResult(v.into()),
18454        );
18455        self
18456    }
18457
18458    /// The value of [result][crate::model::DataScanJob::result]
18459    /// if it holds a `DataDocumentationResult`, `None` if the field is not set or
18460    /// holds a different branch.
18461    pub fn data_documentation_result(
18462        &self,
18463    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
18464        #[allow(unreachable_patterns)]
18465        self.result.as_ref().and_then(|v| match v {
18466            crate::model::data_scan_job::Result::DataDocumentationResult(v) => {
18467                std::option::Option::Some(v)
18468            }
18469            _ => std::option::Option::None,
18470        })
18471    }
18472
18473    /// Sets the value of [result][crate::model::DataScanJob::result]
18474    /// to hold a `DataDocumentationResult`.
18475    ///
18476    /// Note that all the setters affecting `result` are
18477    /// mutually exclusive.
18478    pub fn set_data_documentation_result<
18479        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
18480    >(
18481        mut self,
18482        v: T,
18483    ) -> Self {
18484        self.result = std::option::Option::Some(
18485            crate::model::data_scan_job::Result::DataDocumentationResult(v.into()),
18486        );
18487        self
18488    }
18489}
18490
18491impl wkt::message::Message for DataScanJob {
18492    fn typename() -> &'static str {
18493        "type.googleapis.com/google.cloud.dataplex.v1.DataScanJob"
18494    }
18495}
18496
18497/// Defines additional types related to [DataScanJob].
18498pub mod data_scan_job {
18499    #[allow(unused_imports)]
18500    use super::*;
18501
18502    /// Execution state for the DataScanJob.
18503    ///
18504    /// # Working with unknown values
18505    ///
18506    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18507    /// additional enum variants at any time. Adding new variants is not considered
18508    /// a breaking change. Applications should write their code in anticipation of:
18509    ///
18510    /// - New values appearing in future releases of the client library, **and**
18511    /// - New values received dynamically, without application changes.
18512    ///
18513    /// Please consult the [Working with enums] section in the user guide for some
18514    /// guidelines.
18515    ///
18516    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18517    #[derive(Clone, Debug, PartialEq)]
18518    #[non_exhaustive]
18519    pub enum State {
18520        /// The DataScanJob state is unspecified.
18521        Unspecified,
18522        /// The DataScanJob is running.
18523        Running,
18524        /// The DataScanJob is canceling.
18525        Canceling,
18526        /// The DataScanJob cancellation was successful.
18527        Cancelled,
18528        /// The DataScanJob completed successfully.
18529        Succeeded,
18530        /// The DataScanJob is no longer running due to an error.
18531        Failed,
18532        /// The DataScanJob has been created but not started to run yet.
18533        Pending,
18534        /// If set, the enum was initialized with an unknown value.
18535        ///
18536        /// Applications can examine the value using [State::value] or
18537        /// [State::name].
18538        UnknownValue(state::UnknownValue),
18539    }
18540
18541    #[doc(hidden)]
18542    pub mod state {
18543        #[allow(unused_imports)]
18544        use super::*;
18545        #[derive(Clone, Debug, PartialEq)]
18546        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18547    }
18548
18549    impl State {
18550        /// Gets the enum value.
18551        ///
18552        /// Returns `None` if the enum contains an unknown value deserialized from
18553        /// the string representation of enums.
18554        pub fn value(&self) -> std::option::Option<i32> {
18555            match self {
18556                Self::Unspecified => std::option::Option::Some(0),
18557                Self::Running => std::option::Option::Some(1),
18558                Self::Canceling => std::option::Option::Some(2),
18559                Self::Cancelled => std::option::Option::Some(3),
18560                Self::Succeeded => std::option::Option::Some(4),
18561                Self::Failed => std::option::Option::Some(5),
18562                Self::Pending => std::option::Option::Some(7),
18563                Self::UnknownValue(u) => u.0.value(),
18564            }
18565        }
18566
18567        /// Gets the enum value as a string.
18568        ///
18569        /// Returns `None` if the enum contains an unknown value deserialized from
18570        /// the integer representation of enums.
18571        pub fn name(&self) -> std::option::Option<&str> {
18572            match self {
18573                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18574                Self::Running => std::option::Option::Some("RUNNING"),
18575                Self::Canceling => std::option::Option::Some("CANCELING"),
18576                Self::Cancelled => std::option::Option::Some("CANCELLED"),
18577                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
18578                Self::Failed => std::option::Option::Some("FAILED"),
18579                Self::Pending => std::option::Option::Some("PENDING"),
18580                Self::UnknownValue(u) => u.0.name(),
18581            }
18582        }
18583    }
18584
18585    impl std::default::Default for State {
18586        fn default() -> Self {
18587            use std::convert::From;
18588            Self::from(0)
18589        }
18590    }
18591
18592    impl std::fmt::Display for State {
18593        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18594            wkt::internal::display_enum(f, self.name(), self.value())
18595        }
18596    }
18597
18598    impl std::convert::From<i32> for State {
18599        fn from(value: i32) -> Self {
18600            match value {
18601                0 => Self::Unspecified,
18602                1 => Self::Running,
18603                2 => Self::Canceling,
18604                3 => Self::Cancelled,
18605                4 => Self::Succeeded,
18606                5 => Self::Failed,
18607                7 => Self::Pending,
18608                _ => Self::UnknownValue(state::UnknownValue(
18609                    wkt::internal::UnknownEnumValue::Integer(value),
18610                )),
18611            }
18612        }
18613    }
18614
18615    impl std::convert::From<&str> for State {
18616        fn from(value: &str) -> Self {
18617            use std::string::ToString;
18618            match value {
18619                "STATE_UNSPECIFIED" => Self::Unspecified,
18620                "RUNNING" => Self::Running,
18621                "CANCELING" => Self::Canceling,
18622                "CANCELLED" => Self::Cancelled,
18623                "SUCCEEDED" => Self::Succeeded,
18624                "FAILED" => Self::Failed,
18625                "PENDING" => Self::Pending,
18626                _ => Self::UnknownValue(state::UnknownValue(
18627                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18628                )),
18629            }
18630        }
18631    }
18632
18633    impl serde::ser::Serialize for State {
18634        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18635        where
18636            S: serde::Serializer,
18637        {
18638            match self {
18639                Self::Unspecified => serializer.serialize_i32(0),
18640                Self::Running => serializer.serialize_i32(1),
18641                Self::Canceling => serializer.serialize_i32(2),
18642                Self::Cancelled => serializer.serialize_i32(3),
18643                Self::Succeeded => serializer.serialize_i32(4),
18644                Self::Failed => serializer.serialize_i32(5),
18645                Self::Pending => serializer.serialize_i32(7),
18646                Self::UnknownValue(u) => u.0.serialize(serializer),
18647            }
18648        }
18649    }
18650
18651    impl<'de> serde::de::Deserialize<'de> for State {
18652        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18653        where
18654            D: serde::Deserializer<'de>,
18655        {
18656            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18657                ".google.cloud.dataplex.v1.DataScanJob.State",
18658            ))
18659        }
18660    }
18661
18662    /// Data scan related setting.
18663    #[derive(Clone, Debug, PartialEq)]
18664    #[non_exhaustive]
18665    pub enum Spec {
18666        /// Output only. Settings for a data quality scan.
18667        DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
18668        /// Output only. Settings for a data profile scan.
18669        DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
18670        /// Output only. Settings for a data discovery scan.
18671        DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
18672        /// Output only. Settings for a data documentation scan.
18673        DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
18674    }
18675
18676    /// The result of the data scan.
18677    #[derive(Clone, Debug, PartialEq)]
18678    #[non_exhaustive]
18679    pub enum Result {
18680        /// Output only. The result of a data quality scan.
18681        DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
18682        /// Output only. The result of a data profile scan.
18683        DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
18684        /// Output only. The result of a data discovery scan.
18685        DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
18686        /// Output only. The result of a data documentation scan.
18687        DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
18688    }
18689}
18690
18691/// The status of publishing the data scan result as Dataplex Universal Catalog
18692/// metadata.
18693#[derive(Clone, Default, PartialEq)]
18694#[non_exhaustive]
18695pub struct DataScanCatalogPublishingStatus {
18696    /// Output only. Execution state for catalog publishing.
18697    pub state: crate::model::data_scan_catalog_publishing_status::State,
18698
18699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18700}
18701
18702impl DataScanCatalogPublishingStatus {
18703    pub fn new() -> Self {
18704        std::default::Default::default()
18705    }
18706
18707    /// Sets the value of [state][crate::model::DataScanCatalogPublishingStatus::state].
18708    pub fn set_state<
18709        T: std::convert::Into<crate::model::data_scan_catalog_publishing_status::State>,
18710    >(
18711        mut self,
18712        v: T,
18713    ) -> Self {
18714        self.state = v.into();
18715        self
18716    }
18717}
18718
18719impl wkt::message::Message for DataScanCatalogPublishingStatus {
18720    fn typename() -> &'static str {
18721        "type.googleapis.com/google.cloud.dataplex.v1.DataScanCatalogPublishingStatus"
18722    }
18723}
18724
18725/// Defines additional types related to [DataScanCatalogPublishingStatus].
18726pub mod data_scan_catalog_publishing_status {
18727    #[allow(unused_imports)]
18728    use super::*;
18729
18730    /// Execution state for the publishing.
18731    ///
18732    /// # Working with unknown values
18733    ///
18734    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18735    /// additional enum variants at any time. Adding new variants is not considered
18736    /// a breaking change. Applications should write their code in anticipation of:
18737    ///
18738    /// - New values appearing in future releases of the client library, **and**
18739    /// - New values received dynamically, without application changes.
18740    ///
18741    /// Please consult the [Working with enums] section in the user guide for some
18742    /// guidelines.
18743    ///
18744    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18745    #[derive(Clone, Debug, PartialEq)]
18746    #[non_exhaustive]
18747    pub enum State {
18748        /// The publishing state is unspecified.
18749        Unspecified,
18750        /// Publish to catalog completed successfully.
18751        Succeeded,
18752        /// Publish to catalog failed.
18753        Failed,
18754        /// If set, the enum was initialized with an unknown value.
18755        ///
18756        /// Applications can examine the value using [State::value] or
18757        /// [State::name].
18758        UnknownValue(state::UnknownValue),
18759    }
18760
18761    #[doc(hidden)]
18762    pub mod state {
18763        #[allow(unused_imports)]
18764        use super::*;
18765        #[derive(Clone, Debug, PartialEq)]
18766        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18767    }
18768
18769    impl State {
18770        /// Gets the enum value.
18771        ///
18772        /// Returns `None` if the enum contains an unknown value deserialized from
18773        /// the string representation of enums.
18774        pub fn value(&self) -> std::option::Option<i32> {
18775            match self {
18776                Self::Unspecified => std::option::Option::Some(0),
18777                Self::Succeeded => std::option::Option::Some(1),
18778                Self::Failed => std::option::Option::Some(2),
18779                Self::UnknownValue(u) => u.0.value(),
18780            }
18781        }
18782
18783        /// Gets the enum value as a string.
18784        ///
18785        /// Returns `None` if the enum contains an unknown value deserialized from
18786        /// the integer representation of enums.
18787        pub fn name(&self) -> std::option::Option<&str> {
18788            match self {
18789                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18790                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
18791                Self::Failed => std::option::Option::Some("FAILED"),
18792                Self::UnknownValue(u) => u.0.name(),
18793            }
18794        }
18795    }
18796
18797    impl std::default::Default for State {
18798        fn default() -> Self {
18799            use std::convert::From;
18800            Self::from(0)
18801        }
18802    }
18803
18804    impl std::fmt::Display for State {
18805        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18806            wkt::internal::display_enum(f, self.name(), self.value())
18807        }
18808    }
18809
18810    impl std::convert::From<i32> for State {
18811        fn from(value: i32) -> Self {
18812            match value {
18813                0 => Self::Unspecified,
18814                1 => Self::Succeeded,
18815                2 => Self::Failed,
18816                _ => Self::UnknownValue(state::UnknownValue(
18817                    wkt::internal::UnknownEnumValue::Integer(value),
18818                )),
18819            }
18820        }
18821    }
18822
18823    impl std::convert::From<&str> for State {
18824        fn from(value: &str) -> Self {
18825            use std::string::ToString;
18826            match value {
18827                "STATE_UNSPECIFIED" => Self::Unspecified,
18828                "SUCCEEDED" => Self::Succeeded,
18829                "FAILED" => Self::Failed,
18830                _ => Self::UnknownValue(state::UnknownValue(
18831                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18832                )),
18833            }
18834        }
18835    }
18836
18837    impl serde::ser::Serialize for State {
18838        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18839        where
18840            S: serde::Serializer,
18841        {
18842            match self {
18843                Self::Unspecified => serializer.serialize_i32(0),
18844                Self::Succeeded => serializer.serialize_i32(1),
18845                Self::Failed => serializer.serialize_i32(2),
18846                Self::UnknownValue(u) => u.0.serialize(serializer),
18847            }
18848        }
18849    }
18850
18851    impl<'de> serde::de::Deserialize<'de> for State {
18852        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18853        where
18854            D: serde::Deserializer<'de>,
18855        {
18856            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18857                ".google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.State",
18858            ))
18859        }
18860    }
18861}
18862
18863/// The payload associated with Discovery data processing.
18864#[derive(Clone, Default, PartialEq)]
18865#[non_exhaustive]
18866pub struct DiscoveryEvent {
18867    /// The log message.
18868    pub message: std::string::String,
18869
18870    /// The id of the associated lake.
18871    pub lake_id: std::string::String,
18872
18873    /// The id of the associated zone.
18874    pub zone_id: std::string::String,
18875
18876    /// The id of the associated asset.
18877    pub asset_id: std::string::String,
18878
18879    /// The data location associated with the event.
18880    pub data_location: std::string::String,
18881
18882    /// The id of the associated datascan for standalone discovery.
18883    pub datascan_id: std::string::String,
18884
18885    /// The type of the event being logged.
18886    pub r#type: crate::model::discovery_event::EventType,
18887
18888    /// Additional details about the event.
18889    pub details: std::option::Option<crate::model::discovery_event::Details>,
18890
18891    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18892}
18893
18894impl DiscoveryEvent {
18895    pub fn new() -> Self {
18896        std::default::Default::default()
18897    }
18898
18899    /// Sets the value of [message][crate::model::DiscoveryEvent::message].
18900    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18901        self.message = v.into();
18902        self
18903    }
18904
18905    /// Sets the value of [lake_id][crate::model::DiscoveryEvent::lake_id].
18906    pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18907        self.lake_id = v.into();
18908        self
18909    }
18910
18911    /// Sets the value of [zone_id][crate::model::DiscoveryEvent::zone_id].
18912    pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18913        self.zone_id = v.into();
18914        self
18915    }
18916
18917    /// Sets the value of [asset_id][crate::model::DiscoveryEvent::asset_id].
18918    pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18919        self.asset_id = v.into();
18920        self
18921    }
18922
18923    /// Sets the value of [data_location][crate::model::DiscoveryEvent::data_location].
18924    pub fn set_data_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18925        self.data_location = v.into();
18926        self
18927    }
18928
18929    /// Sets the value of [datascan_id][crate::model::DiscoveryEvent::datascan_id].
18930    pub fn set_datascan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18931        self.datascan_id = v.into();
18932        self
18933    }
18934
18935    /// Sets the value of [r#type][crate::model::DiscoveryEvent::type].
18936    pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EventType>>(
18937        mut self,
18938        v: T,
18939    ) -> Self {
18940        self.r#type = v.into();
18941        self
18942    }
18943
18944    /// Sets the value of [details][crate::model::DiscoveryEvent::details].
18945    ///
18946    /// Note that all the setters affecting `details` are mutually
18947    /// exclusive.
18948    pub fn set_details<
18949        T: std::convert::Into<std::option::Option<crate::model::discovery_event::Details>>,
18950    >(
18951        mut self,
18952        v: T,
18953    ) -> Self {
18954        self.details = v.into();
18955        self
18956    }
18957
18958    /// The value of [details][crate::model::DiscoveryEvent::details]
18959    /// if it holds a `Config`, `None` if the field is not set or
18960    /// holds a different branch.
18961    pub fn config(
18962        &self,
18963    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ConfigDetails>> {
18964        #[allow(unreachable_patterns)]
18965        self.details.as_ref().and_then(|v| match v {
18966            crate::model::discovery_event::Details::Config(v) => std::option::Option::Some(v),
18967            _ => std::option::Option::None,
18968        })
18969    }
18970
18971    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
18972    /// to hold a `Config`.
18973    ///
18974    /// Note that all the setters affecting `details` are
18975    /// mutually exclusive.
18976    pub fn set_config<
18977        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ConfigDetails>>,
18978    >(
18979        mut self,
18980        v: T,
18981    ) -> Self {
18982        self.details =
18983            std::option::Option::Some(crate::model::discovery_event::Details::Config(v.into()));
18984        self
18985    }
18986
18987    /// The value of [details][crate::model::DiscoveryEvent::details]
18988    /// if it holds a `Entity`, `None` if the field is not set or
18989    /// holds a different branch.
18990    pub fn entity(
18991        &self,
18992    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::EntityDetails>> {
18993        #[allow(unreachable_patterns)]
18994        self.details.as_ref().and_then(|v| match v {
18995            crate::model::discovery_event::Details::Entity(v) => std::option::Option::Some(v),
18996            _ => std::option::Option::None,
18997        })
18998    }
18999
19000    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
19001    /// to hold a `Entity`.
19002    ///
19003    /// Note that all the setters affecting `details` are
19004    /// mutually exclusive.
19005    pub fn set_entity<
19006        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::EntityDetails>>,
19007    >(
19008        mut self,
19009        v: T,
19010    ) -> Self {
19011        self.details =
19012            std::option::Option::Some(crate::model::discovery_event::Details::Entity(v.into()));
19013        self
19014    }
19015
19016    /// The value of [details][crate::model::DiscoveryEvent::details]
19017    /// if it holds a `Partition`, `None` if the field is not set or
19018    /// holds a different branch.
19019    pub fn partition(
19020        &self,
19021    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::PartitionDetails>>
19022    {
19023        #[allow(unreachable_patterns)]
19024        self.details.as_ref().and_then(|v| match v {
19025            crate::model::discovery_event::Details::Partition(v) => std::option::Option::Some(v),
19026            _ => std::option::Option::None,
19027        })
19028    }
19029
19030    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
19031    /// to hold a `Partition`.
19032    ///
19033    /// Note that all the setters affecting `details` are
19034    /// mutually exclusive.
19035    pub fn set_partition<
19036        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::PartitionDetails>>,
19037    >(
19038        mut self,
19039        v: T,
19040    ) -> Self {
19041        self.details =
19042            std::option::Option::Some(crate::model::discovery_event::Details::Partition(v.into()));
19043        self
19044    }
19045
19046    /// The value of [details][crate::model::DiscoveryEvent::details]
19047    /// if it holds a `Action`, `None` if the field is not set or
19048    /// holds a different branch.
19049    pub fn action(
19050        &self,
19051    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ActionDetails>> {
19052        #[allow(unreachable_patterns)]
19053        self.details.as_ref().and_then(|v| match v {
19054            crate::model::discovery_event::Details::Action(v) => std::option::Option::Some(v),
19055            _ => std::option::Option::None,
19056        })
19057    }
19058
19059    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
19060    /// to hold a `Action`.
19061    ///
19062    /// Note that all the setters affecting `details` are
19063    /// mutually exclusive.
19064    pub fn set_action<
19065        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ActionDetails>>,
19066    >(
19067        mut self,
19068        v: T,
19069    ) -> Self {
19070        self.details =
19071            std::option::Option::Some(crate::model::discovery_event::Details::Action(v.into()));
19072        self
19073    }
19074
19075    /// The value of [details][crate::model::DiscoveryEvent::details]
19076    /// if it holds a `Table`, `None` if the field is not set or
19077    /// holds a different branch.
19078    pub fn table(
19079        &self,
19080    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::TableDetails>> {
19081        #[allow(unreachable_patterns)]
19082        self.details.as_ref().and_then(|v| match v {
19083            crate::model::discovery_event::Details::Table(v) => std::option::Option::Some(v),
19084            _ => std::option::Option::None,
19085        })
19086    }
19087
19088    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
19089    /// to hold a `Table`.
19090    ///
19091    /// Note that all the setters affecting `details` are
19092    /// mutually exclusive.
19093    pub fn set_table<
19094        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::TableDetails>>,
19095    >(
19096        mut self,
19097        v: T,
19098    ) -> Self {
19099        self.details =
19100            std::option::Option::Some(crate::model::discovery_event::Details::Table(v.into()));
19101        self
19102    }
19103}
19104
19105impl wkt::message::Message for DiscoveryEvent {
19106    fn typename() -> &'static str {
19107        "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent"
19108    }
19109}
19110
19111/// Defines additional types related to [DiscoveryEvent].
19112pub mod discovery_event {
19113    #[allow(unused_imports)]
19114    use super::*;
19115
19116    /// Details about configuration events.
19117    #[derive(Clone, Default, PartialEq)]
19118    #[non_exhaustive]
19119    pub struct ConfigDetails {
19120        /// A list of discovery configuration parameters in effect.
19121        /// The keys are the field paths within DiscoverySpec.
19122        /// Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference,
19123        /// etc.
19124        pub parameters: std::collections::HashMap<std::string::String, std::string::String>,
19125
19126        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19127    }
19128
19129    impl ConfigDetails {
19130        pub fn new() -> Self {
19131            std::default::Default::default()
19132        }
19133
19134        /// Sets the value of [parameters][crate::model::discovery_event::ConfigDetails::parameters].
19135        pub fn set_parameters<T, K, V>(mut self, v: T) -> Self
19136        where
19137            T: std::iter::IntoIterator<Item = (K, V)>,
19138            K: std::convert::Into<std::string::String>,
19139            V: std::convert::Into<std::string::String>,
19140        {
19141            use std::iter::Iterator;
19142            self.parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19143            self
19144        }
19145    }
19146
19147    impl wkt::message::Message for ConfigDetails {
19148        fn typename() -> &'static str {
19149            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"
19150        }
19151    }
19152
19153    /// Details about the entity.
19154    #[derive(Clone, Default, PartialEq)]
19155    #[non_exhaustive]
19156    pub struct EntityDetails {
19157        /// The name of the entity resource.
19158        /// The name is the fully-qualified resource name.
19159        pub entity: std::string::String,
19160
19161        /// The type of the entity resource.
19162        pub r#type: crate::model::discovery_event::EntityType,
19163
19164        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19165    }
19166
19167    impl EntityDetails {
19168        pub fn new() -> Self {
19169            std::default::Default::default()
19170        }
19171
19172        /// Sets the value of [entity][crate::model::discovery_event::EntityDetails::entity].
19173        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19174            self.entity = v.into();
19175            self
19176        }
19177
19178        /// Sets the value of [r#type][crate::model::discovery_event::EntityDetails::type].
19179        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
19180            mut self,
19181            v: T,
19182        ) -> Self {
19183            self.r#type = v.into();
19184            self
19185        }
19186    }
19187
19188    impl wkt::message::Message for EntityDetails {
19189        fn typename() -> &'static str {
19190            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"
19191        }
19192    }
19193
19194    /// Details about the published table.
19195    #[derive(Clone, Default, PartialEq)]
19196    #[non_exhaustive]
19197    pub struct TableDetails {
19198        /// The fully-qualified resource name of the table resource.
19199        pub table: std::string::String,
19200
19201        /// The type of the table resource.
19202        pub r#type: crate::model::discovery_event::TableType,
19203
19204        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19205    }
19206
19207    impl TableDetails {
19208        pub fn new() -> Self {
19209            std::default::Default::default()
19210        }
19211
19212        /// Sets the value of [table][crate::model::discovery_event::TableDetails::table].
19213        pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19214            self.table = v.into();
19215            self
19216        }
19217
19218        /// Sets the value of [r#type][crate::model::discovery_event::TableDetails::type].
19219        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::TableType>>(
19220            mut self,
19221            v: T,
19222        ) -> Self {
19223            self.r#type = v.into();
19224            self
19225        }
19226    }
19227
19228    impl wkt::message::Message for TableDetails {
19229        fn typename() -> &'static str {
19230            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.TableDetails"
19231        }
19232    }
19233
19234    /// Details about the partition.
19235    #[derive(Clone, Default, PartialEq)]
19236    #[non_exhaustive]
19237    pub struct PartitionDetails {
19238        /// The name to the partition resource.
19239        /// The name is the fully-qualified resource name.
19240        pub partition: std::string::String,
19241
19242        /// The name to the containing entity resource.
19243        /// The name is the fully-qualified resource name.
19244        pub entity: std::string::String,
19245
19246        /// The type of the containing entity resource.
19247        pub r#type: crate::model::discovery_event::EntityType,
19248
19249        /// The locations of the data items (e.g., a Cloud Storage objects) sampled
19250        /// for metadata inference.
19251        pub sampled_data_locations: std::vec::Vec<std::string::String>,
19252
19253        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19254    }
19255
19256    impl PartitionDetails {
19257        pub fn new() -> Self {
19258            std::default::Default::default()
19259        }
19260
19261        /// Sets the value of [partition][crate::model::discovery_event::PartitionDetails::partition].
19262        pub fn set_partition<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19263            self.partition = v.into();
19264            self
19265        }
19266
19267        /// Sets the value of [entity][crate::model::discovery_event::PartitionDetails::entity].
19268        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19269            self.entity = v.into();
19270            self
19271        }
19272
19273        /// Sets the value of [r#type][crate::model::discovery_event::PartitionDetails::type].
19274        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
19275            mut self,
19276            v: T,
19277        ) -> Self {
19278            self.r#type = v.into();
19279            self
19280        }
19281
19282        /// Sets the value of [sampled_data_locations][crate::model::discovery_event::PartitionDetails::sampled_data_locations].
19283        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
19284        where
19285            T: std::iter::IntoIterator<Item = V>,
19286            V: std::convert::Into<std::string::String>,
19287        {
19288            use std::iter::Iterator;
19289            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
19290            self
19291        }
19292    }
19293
19294    impl wkt::message::Message for PartitionDetails {
19295        fn typename() -> &'static str {
19296            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"
19297        }
19298    }
19299
19300    /// Details about the action.
19301    #[derive(Clone, Default, PartialEq)]
19302    #[non_exhaustive]
19303    pub struct ActionDetails {
19304        /// The type of action.
19305        /// Eg. IncompatibleDataSchema, InvalidDataFormat
19306        pub r#type: std::string::String,
19307
19308        /// The human readable issue associated with the action.
19309        pub issue: std::string::String,
19310
19311        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19312    }
19313
19314    impl ActionDetails {
19315        pub fn new() -> Self {
19316            std::default::Default::default()
19317        }
19318
19319        /// Sets the value of [r#type][crate::model::discovery_event::ActionDetails::type].
19320        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19321            self.r#type = v.into();
19322            self
19323        }
19324
19325        /// Sets the value of [issue][crate::model::discovery_event::ActionDetails::issue].
19326        pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19327            self.issue = v.into();
19328            self
19329        }
19330    }
19331
19332    impl wkt::message::Message for ActionDetails {
19333        fn typename() -> &'static str {
19334            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"
19335        }
19336    }
19337
19338    /// The type of the event.
19339    ///
19340    /// # Working with unknown values
19341    ///
19342    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19343    /// additional enum variants at any time. Adding new variants is not considered
19344    /// a breaking change. Applications should write their code in anticipation of:
19345    ///
19346    /// - New values appearing in future releases of the client library, **and**
19347    /// - New values received dynamically, without application changes.
19348    ///
19349    /// Please consult the [Working with enums] section in the user guide for some
19350    /// guidelines.
19351    ///
19352    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19353    #[derive(Clone, Debug, PartialEq)]
19354    #[non_exhaustive]
19355    pub enum EventType {
19356        /// An unspecified event type.
19357        Unspecified,
19358        /// An event representing discovery configuration in effect.
19359        Config,
19360        /// An event representing a metadata entity being created.
19361        EntityCreated,
19362        /// An event representing a metadata entity being updated.
19363        EntityUpdated,
19364        /// An event representing a metadata entity being deleted.
19365        EntityDeleted,
19366        /// An event representing a partition being created.
19367        PartitionCreated,
19368        /// An event representing a partition being updated.
19369        PartitionUpdated,
19370        /// An event representing a partition being deleted.
19371        PartitionDeleted,
19372        /// An event representing a table being published.
19373        TablePublished,
19374        /// An event representing a table being updated.
19375        TableUpdated,
19376        /// An event representing a table being skipped in publishing.
19377        TableIgnored,
19378        /// An event representing a table being deleted.
19379        TableDeleted,
19380        /// If set, the enum was initialized with an unknown value.
19381        ///
19382        /// Applications can examine the value using [EventType::value] or
19383        /// [EventType::name].
19384        UnknownValue(event_type::UnknownValue),
19385    }
19386
19387    #[doc(hidden)]
19388    pub mod event_type {
19389        #[allow(unused_imports)]
19390        use super::*;
19391        #[derive(Clone, Debug, PartialEq)]
19392        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19393    }
19394
19395    impl EventType {
19396        /// Gets the enum value.
19397        ///
19398        /// Returns `None` if the enum contains an unknown value deserialized from
19399        /// the string representation of enums.
19400        pub fn value(&self) -> std::option::Option<i32> {
19401            match self {
19402                Self::Unspecified => std::option::Option::Some(0),
19403                Self::Config => std::option::Option::Some(1),
19404                Self::EntityCreated => std::option::Option::Some(2),
19405                Self::EntityUpdated => std::option::Option::Some(3),
19406                Self::EntityDeleted => std::option::Option::Some(4),
19407                Self::PartitionCreated => std::option::Option::Some(5),
19408                Self::PartitionUpdated => std::option::Option::Some(6),
19409                Self::PartitionDeleted => std::option::Option::Some(7),
19410                Self::TablePublished => std::option::Option::Some(10),
19411                Self::TableUpdated => std::option::Option::Some(11),
19412                Self::TableIgnored => std::option::Option::Some(12),
19413                Self::TableDeleted => std::option::Option::Some(13),
19414                Self::UnknownValue(u) => u.0.value(),
19415            }
19416        }
19417
19418        /// Gets the enum value as a string.
19419        ///
19420        /// Returns `None` if the enum contains an unknown value deserialized from
19421        /// the integer representation of enums.
19422        pub fn name(&self) -> std::option::Option<&str> {
19423            match self {
19424                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
19425                Self::Config => std::option::Option::Some("CONFIG"),
19426                Self::EntityCreated => std::option::Option::Some("ENTITY_CREATED"),
19427                Self::EntityUpdated => std::option::Option::Some("ENTITY_UPDATED"),
19428                Self::EntityDeleted => std::option::Option::Some("ENTITY_DELETED"),
19429                Self::PartitionCreated => std::option::Option::Some("PARTITION_CREATED"),
19430                Self::PartitionUpdated => std::option::Option::Some("PARTITION_UPDATED"),
19431                Self::PartitionDeleted => std::option::Option::Some("PARTITION_DELETED"),
19432                Self::TablePublished => std::option::Option::Some("TABLE_PUBLISHED"),
19433                Self::TableUpdated => std::option::Option::Some("TABLE_UPDATED"),
19434                Self::TableIgnored => std::option::Option::Some("TABLE_IGNORED"),
19435                Self::TableDeleted => std::option::Option::Some("TABLE_DELETED"),
19436                Self::UnknownValue(u) => u.0.name(),
19437            }
19438        }
19439    }
19440
19441    impl std::default::Default for EventType {
19442        fn default() -> Self {
19443            use std::convert::From;
19444            Self::from(0)
19445        }
19446    }
19447
19448    impl std::fmt::Display for EventType {
19449        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19450            wkt::internal::display_enum(f, self.name(), self.value())
19451        }
19452    }
19453
19454    impl std::convert::From<i32> for EventType {
19455        fn from(value: i32) -> Self {
19456            match value {
19457                0 => Self::Unspecified,
19458                1 => Self::Config,
19459                2 => Self::EntityCreated,
19460                3 => Self::EntityUpdated,
19461                4 => Self::EntityDeleted,
19462                5 => Self::PartitionCreated,
19463                6 => Self::PartitionUpdated,
19464                7 => Self::PartitionDeleted,
19465                10 => Self::TablePublished,
19466                11 => Self::TableUpdated,
19467                12 => Self::TableIgnored,
19468                13 => Self::TableDeleted,
19469                _ => Self::UnknownValue(event_type::UnknownValue(
19470                    wkt::internal::UnknownEnumValue::Integer(value),
19471                )),
19472            }
19473        }
19474    }
19475
19476    impl std::convert::From<&str> for EventType {
19477        fn from(value: &str) -> Self {
19478            use std::string::ToString;
19479            match value {
19480                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
19481                "CONFIG" => Self::Config,
19482                "ENTITY_CREATED" => Self::EntityCreated,
19483                "ENTITY_UPDATED" => Self::EntityUpdated,
19484                "ENTITY_DELETED" => Self::EntityDeleted,
19485                "PARTITION_CREATED" => Self::PartitionCreated,
19486                "PARTITION_UPDATED" => Self::PartitionUpdated,
19487                "PARTITION_DELETED" => Self::PartitionDeleted,
19488                "TABLE_PUBLISHED" => Self::TablePublished,
19489                "TABLE_UPDATED" => Self::TableUpdated,
19490                "TABLE_IGNORED" => Self::TableIgnored,
19491                "TABLE_DELETED" => Self::TableDeleted,
19492                _ => Self::UnknownValue(event_type::UnknownValue(
19493                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19494                )),
19495            }
19496        }
19497    }
19498
19499    impl serde::ser::Serialize for EventType {
19500        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19501        where
19502            S: serde::Serializer,
19503        {
19504            match self {
19505                Self::Unspecified => serializer.serialize_i32(0),
19506                Self::Config => serializer.serialize_i32(1),
19507                Self::EntityCreated => serializer.serialize_i32(2),
19508                Self::EntityUpdated => serializer.serialize_i32(3),
19509                Self::EntityDeleted => serializer.serialize_i32(4),
19510                Self::PartitionCreated => serializer.serialize_i32(5),
19511                Self::PartitionUpdated => serializer.serialize_i32(6),
19512                Self::PartitionDeleted => serializer.serialize_i32(7),
19513                Self::TablePublished => serializer.serialize_i32(10),
19514                Self::TableUpdated => serializer.serialize_i32(11),
19515                Self::TableIgnored => serializer.serialize_i32(12),
19516                Self::TableDeleted => serializer.serialize_i32(13),
19517                Self::UnknownValue(u) => u.0.serialize(serializer),
19518            }
19519        }
19520    }
19521
19522    impl<'de> serde::de::Deserialize<'de> for EventType {
19523        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19524        where
19525            D: serde::Deserializer<'de>,
19526        {
19527            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
19528                ".google.cloud.dataplex.v1.DiscoveryEvent.EventType",
19529            ))
19530        }
19531    }
19532
19533    /// The type of the entity.
19534    ///
19535    /// # Working with unknown values
19536    ///
19537    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19538    /// additional enum variants at any time. Adding new variants is not considered
19539    /// a breaking change. Applications should write their code in anticipation of:
19540    ///
19541    /// - New values appearing in future releases of the client library, **and**
19542    /// - New values received dynamically, without application changes.
19543    ///
19544    /// Please consult the [Working with enums] section in the user guide for some
19545    /// guidelines.
19546    ///
19547    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19548    #[derive(Clone, Debug, PartialEq)]
19549    #[non_exhaustive]
19550    pub enum EntityType {
19551        /// An unspecified event type.
19552        Unspecified,
19553        /// Entities representing structured data.
19554        Table,
19555        /// Entities representing unstructured data.
19556        Fileset,
19557        /// If set, the enum was initialized with an unknown value.
19558        ///
19559        /// Applications can examine the value using [EntityType::value] or
19560        /// [EntityType::name].
19561        UnknownValue(entity_type::UnknownValue),
19562    }
19563
19564    #[doc(hidden)]
19565    pub mod entity_type {
19566        #[allow(unused_imports)]
19567        use super::*;
19568        #[derive(Clone, Debug, PartialEq)]
19569        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19570    }
19571
19572    impl EntityType {
19573        /// Gets the enum value.
19574        ///
19575        /// Returns `None` if the enum contains an unknown value deserialized from
19576        /// the string representation of enums.
19577        pub fn value(&self) -> std::option::Option<i32> {
19578            match self {
19579                Self::Unspecified => std::option::Option::Some(0),
19580                Self::Table => std::option::Option::Some(1),
19581                Self::Fileset => std::option::Option::Some(2),
19582                Self::UnknownValue(u) => u.0.value(),
19583            }
19584        }
19585
19586        /// Gets the enum value as a string.
19587        ///
19588        /// Returns `None` if the enum contains an unknown value deserialized from
19589        /// the integer representation of enums.
19590        pub fn name(&self) -> std::option::Option<&str> {
19591            match self {
19592                Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
19593                Self::Table => std::option::Option::Some("TABLE"),
19594                Self::Fileset => std::option::Option::Some("FILESET"),
19595                Self::UnknownValue(u) => u.0.name(),
19596            }
19597        }
19598    }
19599
19600    impl std::default::Default for EntityType {
19601        fn default() -> Self {
19602            use std::convert::From;
19603            Self::from(0)
19604        }
19605    }
19606
19607    impl std::fmt::Display for EntityType {
19608        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19609            wkt::internal::display_enum(f, self.name(), self.value())
19610        }
19611    }
19612
19613    impl std::convert::From<i32> for EntityType {
19614        fn from(value: i32) -> Self {
19615            match value {
19616                0 => Self::Unspecified,
19617                1 => Self::Table,
19618                2 => Self::Fileset,
19619                _ => Self::UnknownValue(entity_type::UnknownValue(
19620                    wkt::internal::UnknownEnumValue::Integer(value),
19621                )),
19622            }
19623        }
19624    }
19625
19626    impl std::convert::From<&str> for EntityType {
19627        fn from(value: &str) -> Self {
19628            use std::string::ToString;
19629            match value {
19630                "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
19631                "TABLE" => Self::Table,
19632                "FILESET" => Self::Fileset,
19633                _ => Self::UnknownValue(entity_type::UnknownValue(
19634                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19635                )),
19636            }
19637        }
19638    }
19639
19640    impl serde::ser::Serialize for EntityType {
19641        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19642        where
19643            S: serde::Serializer,
19644        {
19645            match self {
19646                Self::Unspecified => serializer.serialize_i32(0),
19647                Self::Table => serializer.serialize_i32(1),
19648                Self::Fileset => serializer.serialize_i32(2),
19649                Self::UnknownValue(u) => u.0.serialize(serializer),
19650            }
19651        }
19652    }
19653
19654    impl<'de> serde::de::Deserialize<'de> for EntityType {
19655        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19656        where
19657            D: serde::Deserializer<'de>,
19658        {
19659            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
19660                ".google.cloud.dataplex.v1.DiscoveryEvent.EntityType",
19661            ))
19662        }
19663    }
19664
19665    /// The type of the published table.
19666    ///
19667    /// # Working with unknown values
19668    ///
19669    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19670    /// additional enum variants at any time. Adding new variants is not considered
19671    /// a breaking change. Applications should write their code in anticipation of:
19672    ///
19673    /// - New values appearing in future releases of the client library, **and**
19674    /// - New values received dynamically, without application changes.
19675    ///
19676    /// Please consult the [Working with enums] section in the user guide for some
19677    /// guidelines.
19678    ///
19679    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19680    #[derive(Clone, Debug, PartialEq)]
19681    #[non_exhaustive]
19682    pub enum TableType {
19683        /// An unspecified table type.
19684        Unspecified,
19685        /// External table type.
19686        ExternalTable,
19687        /// BigLake table type.
19688        BiglakeTable,
19689        /// Object table type for unstructured data.
19690        ObjectTable,
19691        /// If set, the enum was initialized with an unknown value.
19692        ///
19693        /// Applications can examine the value using [TableType::value] or
19694        /// [TableType::name].
19695        UnknownValue(table_type::UnknownValue),
19696    }
19697
19698    #[doc(hidden)]
19699    pub mod table_type {
19700        #[allow(unused_imports)]
19701        use super::*;
19702        #[derive(Clone, Debug, PartialEq)]
19703        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19704    }
19705
19706    impl TableType {
19707        /// Gets the enum value.
19708        ///
19709        /// Returns `None` if the enum contains an unknown value deserialized from
19710        /// the string representation of enums.
19711        pub fn value(&self) -> std::option::Option<i32> {
19712            match self {
19713                Self::Unspecified => std::option::Option::Some(0),
19714                Self::ExternalTable => std::option::Option::Some(1),
19715                Self::BiglakeTable => std::option::Option::Some(2),
19716                Self::ObjectTable => std::option::Option::Some(3),
19717                Self::UnknownValue(u) => u.0.value(),
19718            }
19719        }
19720
19721        /// Gets the enum value as a string.
19722        ///
19723        /// Returns `None` if the enum contains an unknown value deserialized from
19724        /// the integer representation of enums.
19725        pub fn name(&self) -> std::option::Option<&str> {
19726            match self {
19727                Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
19728                Self::ExternalTable => std::option::Option::Some("EXTERNAL_TABLE"),
19729                Self::BiglakeTable => std::option::Option::Some("BIGLAKE_TABLE"),
19730                Self::ObjectTable => std::option::Option::Some("OBJECT_TABLE"),
19731                Self::UnknownValue(u) => u.0.name(),
19732            }
19733        }
19734    }
19735
19736    impl std::default::Default for TableType {
19737        fn default() -> Self {
19738            use std::convert::From;
19739            Self::from(0)
19740        }
19741    }
19742
19743    impl std::fmt::Display for TableType {
19744        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19745            wkt::internal::display_enum(f, self.name(), self.value())
19746        }
19747    }
19748
19749    impl std::convert::From<i32> for TableType {
19750        fn from(value: i32) -> Self {
19751            match value {
19752                0 => Self::Unspecified,
19753                1 => Self::ExternalTable,
19754                2 => Self::BiglakeTable,
19755                3 => Self::ObjectTable,
19756                _ => Self::UnknownValue(table_type::UnknownValue(
19757                    wkt::internal::UnknownEnumValue::Integer(value),
19758                )),
19759            }
19760        }
19761    }
19762
19763    impl std::convert::From<&str> for TableType {
19764        fn from(value: &str) -> Self {
19765            use std::string::ToString;
19766            match value {
19767                "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
19768                "EXTERNAL_TABLE" => Self::ExternalTable,
19769                "BIGLAKE_TABLE" => Self::BiglakeTable,
19770                "OBJECT_TABLE" => Self::ObjectTable,
19771                _ => Self::UnknownValue(table_type::UnknownValue(
19772                    wkt::internal::UnknownEnumValue::String(value.to_string()),
19773                )),
19774            }
19775        }
19776    }
19777
19778    impl serde::ser::Serialize for TableType {
19779        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19780        where
19781            S: serde::Serializer,
19782        {
19783            match self {
19784                Self::Unspecified => serializer.serialize_i32(0),
19785                Self::ExternalTable => serializer.serialize_i32(1),
19786                Self::BiglakeTable => serializer.serialize_i32(2),
19787                Self::ObjectTable => serializer.serialize_i32(3),
19788                Self::UnknownValue(u) => u.0.serialize(serializer),
19789            }
19790        }
19791    }
19792
19793    impl<'de> serde::de::Deserialize<'de> for TableType {
19794        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19795        where
19796            D: serde::Deserializer<'de>,
19797        {
19798            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
19799                ".google.cloud.dataplex.v1.DiscoveryEvent.TableType",
19800            ))
19801        }
19802    }
19803
19804    /// Additional details about the event.
19805    #[derive(Clone, Debug, PartialEq)]
19806    #[non_exhaustive]
19807    pub enum Details {
19808        /// Details about discovery configuration in effect.
19809        Config(std::boxed::Box<crate::model::discovery_event::ConfigDetails>),
19810        /// Details about the entity associated with the event.
19811        Entity(std::boxed::Box<crate::model::discovery_event::EntityDetails>),
19812        /// Details about the partition associated with the event.
19813        Partition(std::boxed::Box<crate::model::discovery_event::PartitionDetails>),
19814        /// Details about the action associated with the event.
19815        Action(std::boxed::Box<crate::model::discovery_event::ActionDetails>),
19816        /// Details about the BigQuery table publishing associated with the event.
19817        Table(std::boxed::Box<crate::model::discovery_event::TableDetails>),
19818    }
19819}
19820
19821/// The payload associated with Job logs that contains events describing jobs
19822/// that have run within a Lake.
19823#[derive(Clone, Default, PartialEq)]
19824#[non_exhaustive]
19825pub struct JobEvent {
19826    /// The log message.
19827    pub message: std::string::String,
19828
19829    /// The unique id identifying the job.
19830    pub job_id: std::string::String,
19831
19832    /// The time when the job started running.
19833    pub start_time: std::option::Option<wkt::Timestamp>,
19834
19835    /// The time when the job ended running.
19836    pub end_time: std::option::Option<wkt::Timestamp>,
19837
19838    /// The job state on completion.
19839    pub state: crate::model::job_event::State,
19840
19841    /// The number of retries.
19842    pub retries: i32,
19843
19844    /// The type of the job.
19845    pub r#type: crate::model::job_event::Type,
19846
19847    /// The service used to execute the job.
19848    pub service: crate::model::job_event::Service,
19849
19850    /// The reference to the job within the service.
19851    pub service_job: std::string::String,
19852
19853    /// Job execution trigger.
19854    pub execution_trigger: crate::model::job_event::ExecutionTrigger,
19855
19856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19857}
19858
19859impl JobEvent {
19860    pub fn new() -> Self {
19861        std::default::Default::default()
19862    }
19863
19864    /// Sets the value of [message][crate::model::JobEvent::message].
19865    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19866        self.message = v.into();
19867        self
19868    }
19869
19870    /// Sets the value of [job_id][crate::model::JobEvent::job_id].
19871    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19872        self.job_id = v.into();
19873        self
19874    }
19875
19876    /// Sets the value of [start_time][crate::model::JobEvent::start_time].
19877    pub fn set_start_time<T>(mut self, v: T) -> Self
19878    where
19879        T: std::convert::Into<wkt::Timestamp>,
19880    {
19881        self.start_time = std::option::Option::Some(v.into());
19882        self
19883    }
19884
19885    /// Sets or clears the value of [start_time][crate::model::JobEvent::start_time].
19886    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
19887    where
19888        T: std::convert::Into<wkt::Timestamp>,
19889    {
19890        self.start_time = v.map(|x| x.into());
19891        self
19892    }
19893
19894    /// Sets the value of [end_time][crate::model::JobEvent::end_time].
19895    pub fn set_end_time<T>(mut self, v: T) -> Self
19896    where
19897        T: std::convert::Into<wkt::Timestamp>,
19898    {
19899        self.end_time = std::option::Option::Some(v.into());
19900        self
19901    }
19902
19903    /// Sets or clears the value of [end_time][crate::model::JobEvent::end_time].
19904    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
19905    where
19906        T: std::convert::Into<wkt::Timestamp>,
19907    {
19908        self.end_time = v.map(|x| x.into());
19909        self
19910    }
19911
19912    /// Sets the value of [state][crate::model::JobEvent::state].
19913    pub fn set_state<T: std::convert::Into<crate::model::job_event::State>>(
19914        mut self,
19915        v: T,
19916    ) -> Self {
19917        self.state = v.into();
19918        self
19919    }
19920
19921    /// Sets the value of [retries][crate::model::JobEvent::retries].
19922    pub fn set_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19923        self.retries = v.into();
19924        self
19925    }
19926
19927    /// Sets the value of [r#type][crate::model::JobEvent::type].
19928    pub fn set_type<T: std::convert::Into<crate::model::job_event::Type>>(mut self, v: T) -> Self {
19929        self.r#type = v.into();
19930        self
19931    }
19932
19933    /// Sets the value of [service][crate::model::JobEvent::service].
19934    pub fn set_service<T: std::convert::Into<crate::model::job_event::Service>>(
19935        mut self,
19936        v: T,
19937    ) -> Self {
19938        self.service = v.into();
19939        self
19940    }
19941
19942    /// Sets the value of [service_job][crate::model::JobEvent::service_job].
19943    pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19944        self.service_job = v.into();
19945        self
19946    }
19947
19948    /// Sets the value of [execution_trigger][crate::model::JobEvent::execution_trigger].
19949    pub fn set_execution_trigger<
19950        T: std::convert::Into<crate::model::job_event::ExecutionTrigger>,
19951    >(
19952        mut self,
19953        v: T,
19954    ) -> Self {
19955        self.execution_trigger = v.into();
19956        self
19957    }
19958}
19959
19960impl wkt::message::Message for JobEvent {
19961    fn typename() -> &'static str {
19962        "type.googleapis.com/google.cloud.dataplex.v1.JobEvent"
19963    }
19964}
19965
19966/// Defines additional types related to [JobEvent].
19967pub mod job_event {
19968    #[allow(unused_imports)]
19969    use super::*;
19970
19971    /// The type of the job.
19972    ///
19973    /// # Working with unknown values
19974    ///
19975    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19976    /// additional enum variants at any time. Adding new variants is not considered
19977    /// a breaking change. Applications should write their code in anticipation of:
19978    ///
19979    /// - New values appearing in future releases of the client library, **and**
19980    /// - New values received dynamically, without application changes.
19981    ///
19982    /// Please consult the [Working with enums] section in the user guide for some
19983    /// guidelines.
19984    ///
19985    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19986    #[derive(Clone, Debug, PartialEq)]
19987    #[non_exhaustive]
19988    pub enum Type {
19989        /// Unspecified job type.
19990        Unspecified,
19991        /// Spark jobs.
19992        Spark,
19993        /// Notebook jobs.
19994        Notebook,
19995        /// If set, the enum was initialized with an unknown value.
19996        ///
19997        /// Applications can examine the value using [Type::value] or
19998        /// [Type::name].
19999        UnknownValue(r#type::UnknownValue),
20000    }
20001
20002    #[doc(hidden)]
20003    pub mod r#type {
20004        #[allow(unused_imports)]
20005        use super::*;
20006        #[derive(Clone, Debug, PartialEq)]
20007        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20008    }
20009
20010    impl Type {
20011        /// Gets the enum value.
20012        ///
20013        /// Returns `None` if the enum contains an unknown value deserialized from
20014        /// the string representation of enums.
20015        pub fn value(&self) -> std::option::Option<i32> {
20016            match self {
20017                Self::Unspecified => std::option::Option::Some(0),
20018                Self::Spark => std::option::Option::Some(1),
20019                Self::Notebook => std::option::Option::Some(2),
20020                Self::UnknownValue(u) => u.0.value(),
20021            }
20022        }
20023
20024        /// Gets the enum value as a string.
20025        ///
20026        /// Returns `None` if the enum contains an unknown value deserialized from
20027        /// the integer representation of enums.
20028        pub fn name(&self) -> std::option::Option<&str> {
20029            match self {
20030                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
20031                Self::Spark => std::option::Option::Some("SPARK"),
20032                Self::Notebook => std::option::Option::Some("NOTEBOOK"),
20033                Self::UnknownValue(u) => u.0.name(),
20034            }
20035        }
20036    }
20037
20038    impl std::default::Default for Type {
20039        fn default() -> Self {
20040            use std::convert::From;
20041            Self::from(0)
20042        }
20043    }
20044
20045    impl std::fmt::Display for Type {
20046        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20047            wkt::internal::display_enum(f, self.name(), self.value())
20048        }
20049    }
20050
20051    impl std::convert::From<i32> for Type {
20052        fn from(value: i32) -> Self {
20053            match value {
20054                0 => Self::Unspecified,
20055                1 => Self::Spark,
20056                2 => Self::Notebook,
20057                _ => Self::UnknownValue(r#type::UnknownValue(
20058                    wkt::internal::UnknownEnumValue::Integer(value),
20059                )),
20060            }
20061        }
20062    }
20063
20064    impl std::convert::From<&str> for Type {
20065        fn from(value: &str) -> Self {
20066            use std::string::ToString;
20067            match value {
20068                "TYPE_UNSPECIFIED" => Self::Unspecified,
20069                "SPARK" => Self::Spark,
20070                "NOTEBOOK" => Self::Notebook,
20071                _ => Self::UnknownValue(r#type::UnknownValue(
20072                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20073                )),
20074            }
20075        }
20076    }
20077
20078    impl serde::ser::Serialize for Type {
20079        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20080        where
20081            S: serde::Serializer,
20082        {
20083            match self {
20084                Self::Unspecified => serializer.serialize_i32(0),
20085                Self::Spark => serializer.serialize_i32(1),
20086                Self::Notebook => serializer.serialize_i32(2),
20087                Self::UnknownValue(u) => u.0.serialize(serializer),
20088            }
20089        }
20090    }
20091
20092    impl<'de> serde::de::Deserialize<'de> for Type {
20093        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20094        where
20095            D: serde::Deserializer<'de>,
20096        {
20097            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
20098                ".google.cloud.dataplex.v1.JobEvent.Type",
20099            ))
20100        }
20101    }
20102
20103    /// The completion status of the job.
20104    ///
20105    /// # Working with unknown values
20106    ///
20107    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20108    /// additional enum variants at any time. Adding new variants is not considered
20109    /// a breaking change. Applications should write their code in anticipation of:
20110    ///
20111    /// - New values appearing in future releases of the client library, **and**
20112    /// - New values received dynamically, without application changes.
20113    ///
20114    /// Please consult the [Working with enums] section in the user guide for some
20115    /// guidelines.
20116    ///
20117    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20118    #[derive(Clone, Debug, PartialEq)]
20119    #[non_exhaustive]
20120    pub enum State {
20121        /// Unspecified job state.
20122        Unspecified,
20123        /// Job successfully completed.
20124        Succeeded,
20125        /// Job was unsuccessful.
20126        Failed,
20127        /// Job was cancelled by the user.
20128        Cancelled,
20129        /// Job was cancelled or aborted via the service executing the job.
20130        Aborted,
20131        /// If set, the enum was initialized with an unknown value.
20132        ///
20133        /// Applications can examine the value using [State::value] or
20134        /// [State::name].
20135        UnknownValue(state::UnknownValue),
20136    }
20137
20138    #[doc(hidden)]
20139    pub mod state {
20140        #[allow(unused_imports)]
20141        use super::*;
20142        #[derive(Clone, Debug, PartialEq)]
20143        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20144    }
20145
20146    impl State {
20147        /// Gets the enum value.
20148        ///
20149        /// Returns `None` if the enum contains an unknown value deserialized from
20150        /// the string representation of enums.
20151        pub fn value(&self) -> std::option::Option<i32> {
20152            match self {
20153                Self::Unspecified => std::option::Option::Some(0),
20154                Self::Succeeded => std::option::Option::Some(1),
20155                Self::Failed => std::option::Option::Some(2),
20156                Self::Cancelled => std::option::Option::Some(3),
20157                Self::Aborted => std::option::Option::Some(4),
20158                Self::UnknownValue(u) => u.0.value(),
20159            }
20160        }
20161
20162        /// Gets the enum value as a string.
20163        ///
20164        /// Returns `None` if the enum contains an unknown value deserialized from
20165        /// the integer representation of enums.
20166        pub fn name(&self) -> std::option::Option<&str> {
20167            match self {
20168                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
20169                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
20170                Self::Failed => std::option::Option::Some("FAILED"),
20171                Self::Cancelled => std::option::Option::Some("CANCELLED"),
20172                Self::Aborted => std::option::Option::Some("ABORTED"),
20173                Self::UnknownValue(u) => u.0.name(),
20174            }
20175        }
20176    }
20177
20178    impl std::default::Default for State {
20179        fn default() -> Self {
20180            use std::convert::From;
20181            Self::from(0)
20182        }
20183    }
20184
20185    impl std::fmt::Display for State {
20186        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20187            wkt::internal::display_enum(f, self.name(), self.value())
20188        }
20189    }
20190
20191    impl std::convert::From<i32> for State {
20192        fn from(value: i32) -> Self {
20193            match value {
20194                0 => Self::Unspecified,
20195                1 => Self::Succeeded,
20196                2 => Self::Failed,
20197                3 => Self::Cancelled,
20198                4 => Self::Aborted,
20199                _ => Self::UnknownValue(state::UnknownValue(
20200                    wkt::internal::UnknownEnumValue::Integer(value),
20201                )),
20202            }
20203        }
20204    }
20205
20206    impl std::convert::From<&str> for State {
20207        fn from(value: &str) -> Self {
20208            use std::string::ToString;
20209            match value {
20210                "STATE_UNSPECIFIED" => Self::Unspecified,
20211                "SUCCEEDED" => Self::Succeeded,
20212                "FAILED" => Self::Failed,
20213                "CANCELLED" => Self::Cancelled,
20214                "ABORTED" => Self::Aborted,
20215                _ => Self::UnknownValue(state::UnknownValue(
20216                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20217                )),
20218            }
20219        }
20220    }
20221
20222    impl serde::ser::Serialize for State {
20223        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20224        where
20225            S: serde::Serializer,
20226        {
20227            match self {
20228                Self::Unspecified => serializer.serialize_i32(0),
20229                Self::Succeeded => serializer.serialize_i32(1),
20230                Self::Failed => serializer.serialize_i32(2),
20231                Self::Cancelled => serializer.serialize_i32(3),
20232                Self::Aborted => serializer.serialize_i32(4),
20233                Self::UnknownValue(u) => u.0.serialize(serializer),
20234            }
20235        }
20236    }
20237
20238    impl<'de> serde::de::Deserialize<'de> for State {
20239        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20240        where
20241            D: serde::Deserializer<'de>,
20242        {
20243            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
20244                ".google.cloud.dataplex.v1.JobEvent.State",
20245            ))
20246        }
20247    }
20248
20249    /// The service used to execute the job.
20250    ///
20251    /// # Working with unknown values
20252    ///
20253    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20254    /// additional enum variants at any time. Adding new variants is not considered
20255    /// a breaking change. Applications should write their code in anticipation of:
20256    ///
20257    /// - New values appearing in future releases of the client library, **and**
20258    /// - New values received dynamically, without application changes.
20259    ///
20260    /// Please consult the [Working with enums] section in the user guide for some
20261    /// guidelines.
20262    ///
20263    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20264    #[derive(Clone, Debug, PartialEq)]
20265    #[non_exhaustive]
20266    pub enum Service {
20267        /// Unspecified service.
20268        Unspecified,
20269        /// Cloud Dataproc.
20270        Dataproc,
20271        /// If set, the enum was initialized with an unknown value.
20272        ///
20273        /// Applications can examine the value using [Service::value] or
20274        /// [Service::name].
20275        UnknownValue(service::UnknownValue),
20276    }
20277
20278    #[doc(hidden)]
20279    pub mod service {
20280        #[allow(unused_imports)]
20281        use super::*;
20282        #[derive(Clone, Debug, PartialEq)]
20283        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20284    }
20285
20286    impl Service {
20287        /// Gets the enum value.
20288        ///
20289        /// Returns `None` if the enum contains an unknown value deserialized from
20290        /// the string representation of enums.
20291        pub fn value(&self) -> std::option::Option<i32> {
20292            match self {
20293                Self::Unspecified => std::option::Option::Some(0),
20294                Self::Dataproc => std::option::Option::Some(1),
20295                Self::UnknownValue(u) => u.0.value(),
20296            }
20297        }
20298
20299        /// Gets the enum value as a string.
20300        ///
20301        /// Returns `None` if the enum contains an unknown value deserialized from
20302        /// the integer representation of enums.
20303        pub fn name(&self) -> std::option::Option<&str> {
20304            match self {
20305                Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
20306                Self::Dataproc => std::option::Option::Some("DATAPROC"),
20307                Self::UnknownValue(u) => u.0.name(),
20308            }
20309        }
20310    }
20311
20312    impl std::default::Default for Service {
20313        fn default() -> Self {
20314            use std::convert::From;
20315            Self::from(0)
20316        }
20317    }
20318
20319    impl std::fmt::Display for Service {
20320        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20321            wkt::internal::display_enum(f, self.name(), self.value())
20322        }
20323    }
20324
20325    impl std::convert::From<i32> for Service {
20326        fn from(value: i32) -> Self {
20327            match value {
20328                0 => Self::Unspecified,
20329                1 => Self::Dataproc,
20330                _ => Self::UnknownValue(service::UnknownValue(
20331                    wkt::internal::UnknownEnumValue::Integer(value),
20332                )),
20333            }
20334        }
20335    }
20336
20337    impl std::convert::From<&str> for Service {
20338        fn from(value: &str) -> Self {
20339            use std::string::ToString;
20340            match value {
20341                "SERVICE_UNSPECIFIED" => Self::Unspecified,
20342                "DATAPROC" => Self::Dataproc,
20343                _ => Self::UnknownValue(service::UnknownValue(
20344                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20345                )),
20346            }
20347        }
20348    }
20349
20350    impl serde::ser::Serialize for Service {
20351        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20352        where
20353            S: serde::Serializer,
20354        {
20355            match self {
20356                Self::Unspecified => serializer.serialize_i32(0),
20357                Self::Dataproc => serializer.serialize_i32(1),
20358                Self::UnknownValue(u) => u.0.serialize(serializer),
20359            }
20360        }
20361    }
20362
20363    impl<'de> serde::de::Deserialize<'de> for Service {
20364        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20365        where
20366            D: serde::Deserializer<'de>,
20367        {
20368            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
20369                ".google.cloud.dataplex.v1.JobEvent.Service",
20370            ))
20371        }
20372    }
20373
20374    /// Job Execution trigger.
20375    ///
20376    /// # Working with unknown values
20377    ///
20378    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20379    /// additional enum variants at any time. Adding new variants is not considered
20380    /// a breaking change. Applications should write their code in anticipation of:
20381    ///
20382    /// - New values appearing in future releases of the client library, **and**
20383    /// - New values received dynamically, without application changes.
20384    ///
20385    /// Please consult the [Working with enums] section in the user guide for some
20386    /// guidelines.
20387    ///
20388    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20389    #[derive(Clone, Debug, PartialEq)]
20390    #[non_exhaustive]
20391    pub enum ExecutionTrigger {
20392        /// The job execution trigger is unspecified.
20393        Unspecified,
20394        /// The job was triggered by Dataplex Universal Catalog based on trigger spec
20395        /// from task definition.
20396        TaskConfig,
20397        /// The job was triggered by the explicit call of Task API.
20398        RunRequest,
20399        /// If set, the enum was initialized with an unknown value.
20400        ///
20401        /// Applications can examine the value using [ExecutionTrigger::value] or
20402        /// [ExecutionTrigger::name].
20403        UnknownValue(execution_trigger::UnknownValue),
20404    }
20405
20406    #[doc(hidden)]
20407    pub mod execution_trigger {
20408        #[allow(unused_imports)]
20409        use super::*;
20410        #[derive(Clone, Debug, PartialEq)]
20411        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20412    }
20413
20414    impl ExecutionTrigger {
20415        /// Gets the enum value.
20416        ///
20417        /// Returns `None` if the enum contains an unknown value deserialized from
20418        /// the string representation of enums.
20419        pub fn value(&self) -> std::option::Option<i32> {
20420            match self {
20421                Self::Unspecified => std::option::Option::Some(0),
20422                Self::TaskConfig => std::option::Option::Some(1),
20423                Self::RunRequest => std::option::Option::Some(2),
20424                Self::UnknownValue(u) => u.0.value(),
20425            }
20426        }
20427
20428        /// Gets the enum value as a string.
20429        ///
20430        /// Returns `None` if the enum contains an unknown value deserialized from
20431        /// the integer representation of enums.
20432        pub fn name(&self) -> std::option::Option<&str> {
20433            match self {
20434                Self::Unspecified => std::option::Option::Some("EXECUTION_TRIGGER_UNSPECIFIED"),
20435                Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
20436                Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
20437                Self::UnknownValue(u) => u.0.name(),
20438            }
20439        }
20440    }
20441
20442    impl std::default::Default for ExecutionTrigger {
20443        fn default() -> Self {
20444            use std::convert::From;
20445            Self::from(0)
20446        }
20447    }
20448
20449    impl std::fmt::Display for ExecutionTrigger {
20450        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20451            wkt::internal::display_enum(f, self.name(), self.value())
20452        }
20453    }
20454
20455    impl std::convert::From<i32> for ExecutionTrigger {
20456        fn from(value: i32) -> Self {
20457            match value {
20458                0 => Self::Unspecified,
20459                1 => Self::TaskConfig,
20460                2 => Self::RunRequest,
20461                _ => Self::UnknownValue(execution_trigger::UnknownValue(
20462                    wkt::internal::UnknownEnumValue::Integer(value),
20463                )),
20464            }
20465        }
20466    }
20467
20468    impl std::convert::From<&str> for ExecutionTrigger {
20469        fn from(value: &str) -> Self {
20470            use std::string::ToString;
20471            match value {
20472                "EXECUTION_TRIGGER_UNSPECIFIED" => Self::Unspecified,
20473                "TASK_CONFIG" => Self::TaskConfig,
20474                "RUN_REQUEST" => Self::RunRequest,
20475                _ => Self::UnknownValue(execution_trigger::UnknownValue(
20476                    wkt::internal::UnknownEnumValue::String(value.to_string()),
20477                )),
20478            }
20479        }
20480    }
20481
20482    impl serde::ser::Serialize for ExecutionTrigger {
20483        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20484        where
20485            S: serde::Serializer,
20486        {
20487            match self {
20488                Self::Unspecified => serializer.serialize_i32(0),
20489                Self::TaskConfig => serializer.serialize_i32(1),
20490                Self::RunRequest => serializer.serialize_i32(2),
20491                Self::UnknownValue(u) => u.0.serialize(serializer),
20492            }
20493        }
20494    }
20495
20496    impl<'de> serde::de::Deserialize<'de> for ExecutionTrigger {
20497        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20498        where
20499            D: serde::Deserializer<'de>,
20500        {
20501            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExecutionTrigger>::new(
20502                ".google.cloud.dataplex.v1.JobEvent.ExecutionTrigger",
20503            ))
20504        }
20505    }
20506}
20507
20508/// These messages contain information about sessions within an environment.
20509/// The monitored resource is 'Environment'.
20510#[derive(Clone, Default, PartialEq)]
20511#[non_exhaustive]
20512pub struct SessionEvent {
20513    /// The log message.
20514    pub message: std::string::String,
20515
20516    /// The information about the user that created the session. It will be the
20517    /// email address of the user.
20518    pub user_id: std::string::String,
20519
20520    /// Unique identifier for the session.
20521    pub session_id: std::string::String,
20522
20523    /// The type of the event.
20524    pub r#type: crate::model::session_event::EventType,
20525
20526    /// The status of the event.
20527    pub event_succeeded: bool,
20528
20529    /// If the session is associated with an environment with fast startup enabled,
20530    /// and was created before being assigned to a user.
20531    pub fast_startup_enabled: bool,
20532
20533    /// The idle duration of a warm pooled session before it is assigned to user.
20534    pub unassigned_duration: std::option::Option<wkt::Duration>,
20535
20536    /// Additional information about the Query metadata.
20537    pub detail: std::option::Option<crate::model::session_event::Detail>,
20538
20539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20540}
20541
20542impl SessionEvent {
20543    pub fn new() -> Self {
20544        std::default::Default::default()
20545    }
20546
20547    /// Sets the value of [message][crate::model::SessionEvent::message].
20548    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20549        self.message = v.into();
20550        self
20551    }
20552
20553    /// Sets the value of [user_id][crate::model::SessionEvent::user_id].
20554    pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20555        self.user_id = v.into();
20556        self
20557    }
20558
20559    /// Sets the value of [session_id][crate::model::SessionEvent::session_id].
20560    pub fn set_session_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20561        self.session_id = v.into();
20562        self
20563    }
20564
20565    /// Sets the value of [r#type][crate::model::SessionEvent::type].
20566    pub fn set_type<T: std::convert::Into<crate::model::session_event::EventType>>(
20567        mut self,
20568        v: T,
20569    ) -> Self {
20570        self.r#type = v.into();
20571        self
20572    }
20573
20574    /// Sets the value of [event_succeeded][crate::model::SessionEvent::event_succeeded].
20575    pub fn set_event_succeeded<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20576        self.event_succeeded = v.into();
20577        self
20578    }
20579
20580    /// Sets the value of [fast_startup_enabled][crate::model::SessionEvent::fast_startup_enabled].
20581    pub fn set_fast_startup_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20582        self.fast_startup_enabled = v.into();
20583        self
20584    }
20585
20586    /// Sets the value of [unassigned_duration][crate::model::SessionEvent::unassigned_duration].
20587    pub fn set_unassigned_duration<T>(mut self, v: T) -> Self
20588    where
20589        T: std::convert::Into<wkt::Duration>,
20590    {
20591        self.unassigned_duration = std::option::Option::Some(v.into());
20592        self
20593    }
20594
20595    /// Sets or clears the value of [unassigned_duration][crate::model::SessionEvent::unassigned_duration].
20596    pub fn set_or_clear_unassigned_duration<T>(mut self, v: std::option::Option<T>) -> Self
20597    where
20598        T: std::convert::Into<wkt::Duration>,
20599    {
20600        self.unassigned_duration = v.map(|x| x.into());
20601        self
20602    }
20603
20604    /// Sets the value of [detail][crate::model::SessionEvent::detail].
20605    ///
20606    /// Note that all the setters affecting `detail` are mutually
20607    /// exclusive.
20608    pub fn set_detail<
20609        T: std::convert::Into<std::option::Option<crate::model::session_event::Detail>>,
20610    >(
20611        mut self,
20612        v: T,
20613    ) -> Self {
20614        self.detail = v.into();
20615        self
20616    }
20617
20618    /// The value of [detail][crate::model::SessionEvent::detail]
20619    /// if it holds a `Query`, `None` if the field is not set or
20620    /// holds a different branch.
20621    pub fn query(
20622        &self,
20623    ) -> std::option::Option<&std::boxed::Box<crate::model::session_event::QueryDetail>> {
20624        #[allow(unreachable_patterns)]
20625        self.detail.as_ref().and_then(|v| match v {
20626            crate::model::session_event::Detail::Query(v) => std::option::Option::Some(v),
20627            _ => std::option::Option::None,
20628        })
20629    }
20630
20631    /// Sets the value of [detail][crate::model::SessionEvent::detail]
20632    /// to hold a `Query`.
20633    ///
20634    /// Note that all the setters affecting `detail` are
20635    /// mutually exclusive.
20636    pub fn set_query<
20637        T: std::convert::Into<std::boxed::Box<crate::model::session_event::QueryDetail>>,
20638    >(
20639        mut self,
20640        v: T,
20641    ) -> Self {
20642        self.detail =
20643            std::option::Option::Some(crate::model::session_event::Detail::Query(v.into()));
20644        self
20645    }
20646}
20647
20648impl wkt::message::Message for SessionEvent {
20649    fn typename() -> &'static str {
20650        "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent"
20651    }
20652}
20653
20654/// Defines additional types related to [SessionEvent].
20655pub mod session_event {
20656    #[allow(unused_imports)]
20657    use super::*;
20658
20659    /// Execution details of the query.
20660    #[derive(Clone, Default, PartialEq)]
20661    #[non_exhaustive]
20662    pub struct QueryDetail {
20663        /// The unique Query id identifying the query.
20664        pub query_id: std::string::String,
20665
20666        /// The query text executed.
20667        pub query_text: std::string::String,
20668
20669        /// Query Execution engine.
20670        pub engine: crate::model::session_event::query_detail::Engine,
20671
20672        /// Time taken for execution of the query.
20673        pub duration: std::option::Option<wkt::Duration>,
20674
20675        /// The size of results the query produced.
20676        pub result_size_bytes: i64,
20677
20678        /// The data processed by the query.
20679        pub data_processed_bytes: i64,
20680
20681        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20682    }
20683
20684    impl QueryDetail {
20685        pub fn new() -> Self {
20686            std::default::Default::default()
20687        }
20688
20689        /// Sets the value of [query_id][crate::model::session_event::QueryDetail::query_id].
20690        pub fn set_query_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20691            self.query_id = v.into();
20692            self
20693        }
20694
20695        /// Sets the value of [query_text][crate::model::session_event::QueryDetail::query_text].
20696        pub fn set_query_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20697            self.query_text = v.into();
20698            self
20699        }
20700
20701        /// Sets the value of [engine][crate::model::session_event::QueryDetail::engine].
20702        pub fn set_engine<
20703            T: std::convert::Into<crate::model::session_event::query_detail::Engine>,
20704        >(
20705            mut self,
20706            v: T,
20707        ) -> Self {
20708            self.engine = v.into();
20709            self
20710        }
20711
20712        /// Sets the value of [duration][crate::model::session_event::QueryDetail::duration].
20713        pub fn set_duration<T>(mut self, v: T) -> Self
20714        where
20715            T: std::convert::Into<wkt::Duration>,
20716        {
20717            self.duration = std::option::Option::Some(v.into());
20718            self
20719        }
20720
20721        /// Sets or clears the value of [duration][crate::model::session_event::QueryDetail::duration].
20722        pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
20723        where
20724            T: std::convert::Into<wkt::Duration>,
20725        {
20726            self.duration = v.map(|x| x.into());
20727            self
20728        }
20729
20730        /// Sets the value of [result_size_bytes][crate::model::session_event::QueryDetail::result_size_bytes].
20731        pub fn set_result_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20732            self.result_size_bytes = v.into();
20733            self
20734        }
20735
20736        /// Sets the value of [data_processed_bytes][crate::model::session_event::QueryDetail::data_processed_bytes].
20737        pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20738            self.data_processed_bytes = v.into();
20739            self
20740        }
20741    }
20742
20743    impl wkt::message::Message for QueryDetail {
20744        fn typename() -> &'static str {
20745            "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent.QueryDetail"
20746        }
20747    }
20748
20749    /// Defines additional types related to [QueryDetail].
20750    pub mod query_detail {
20751        #[allow(unused_imports)]
20752        use super::*;
20753
20754        /// Query Execution engine.
20755        ///
20756        /// # Working with unknown values
20757        ///
20758        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20759        /// additional enum variants at any time. Adding new variants is not considered
20760        /// a breaking change. Applications should write their code in anticipation of:
20761        ///
20762        /// - New values appearing in future releases of the client library, **and**
20763        /// - New values received dynamically, without application changes.
20764        ///
20765        /// Please consult the [Working with enums] section in the user guide for some
20766        /// guidelines.
20767        ///
20768        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20769        #[derive(Clone, Debug, PartialEq)]
20770        #[non_exhaustive]
20771        pub enum Engine {
20772            /// An unspecified Engine type.
20773            Unspecified,
20774            /// Spark-sql engine is specified in Query.
20775            SparkSql,
20776            /// BigQuery engine is specified in Query.
20777            Bigquery,
20778            /// If set, the enum was initialized with an unknown value.
20779            ///
20780            /// Applications can examine the value using [Engine::value] or
20781            /// [Engine::name].
20782            UnknownValue(engine::UnknownValue),
20783        }
20784
20785        #[doc(hidden)]
20786        pub mod engine {
20787            #[allow(unused_imports)]
20788            use super::*;
20789            #[derive(Clone, Debug, PartialEq)]
20790            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20791        }
20792
20793        impl Engine {
20794            /// Gets the enum value.
20795            ///
20796            /// Returns `None` if the enum contains an unknown value deserialized from
20797            /// the string representation of enums.
20798            pub fn value(&self) -> std::option::Option<i32> {
20799                match self {
20800                    Self::Unspecified => std::option::Option::Some(0),
20801                    Self::SparkSql => std::option::Option::Some(1),
20802                    Self::Bigquery => std::option::Option::Some(2),
20803                    Self::UnknownValue(u) => u.0.value(),
20804                }
20805            }
20806
20807            /// Gets the enum value as a string.
20808            ///
20809            /// Returns `None` if the enum contains an unknown value deserialized from
20810            /// the integer representation of enums.
20811            pub fn name(&self) -> std::option::Option<&str> {
20812                match self {
20813                    Self::Unspecified => std::option::Option::Some("ENGINE_UNSPECIFIED"),
20814                    Self::SparkSql => std::option::Option::Some("SPARK_SQL"),
20815                    Self::Bigquery => std::option::Option::Some("BIGQUERY"),
20816                    Self::UnknownValue(u) => u.0.name(),
20817                }
20818            }
20819        }
20820
20821        impl std::default::Default for Engine {
20822            fn default() -> Self {
20823                use std::convert::From;
20824                Self::from(0)
20825            }
20826        }
20827
20828        impl std::fmt::Display for Engine {
20829            fn fmt(
20830                &self,
20831                f: &mut std::fmt::Formatter<'_>,
20832            ) -> std::result::Result<(), std::fmt::Error> {
20833                wkt::internal::display_enum(f, self.name(), self.value())
20834            }
20835        }
20836
20837        impl std::convert::From<i32> for Engine {
20838            fn from(value: i32) -> Self {
20839                match value {
20840                    0 => Self::Unspecified,
20841                    1 => Self::SparkSql,
20842                    2 => Self::Bigquery,
20843                    _ => Self::UnknownValue(engine::UnknownValue(
20844                        wkt::internal::UnknownEnumValue::Integer(value),
20845                    )),
20846                }
20847            }
20848        }
20849
20850        impl std::convert::From<&str> for Engine {
20851            fn from(value: &str) -> Self {
20852                use std::string::ToString;
20853                match value {
20854                    "ENGINE_UNSPECIFIED" => Self::Unspecified,
20855                    "SPARK_SQL" => Self::SparkSql,
20856                    "BIGQUERY" => Self::Bigquery,
20857                    _ => Self::UnknownValue(engine::UnknownValue(
20858                        wkt::internal::UnknownEnumValue::String(value.to_string()),
20859                    )),
20860                }
20861            }
20862        }
20863
20864        impl serde::ser::Serialize for Engine {
20865            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20866            where
20867                S: serde::Serializer,
20868            {
20869                match self {
20870                    Self::Unspecified => serializer.serialize_i32(0),
20871                    Self::SparkSql => serializer.serialize_i32(1),
20872                    Self::Bigquery => serializer.serialize_i32(2),
20873                    Self::UnknownValue(u) => u.0.serialize(serializer),
20874                }
20875            }
20876        }
20877
20878        impl<'de> serde::de::Deserialize<'de> for Engine {
20879            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20880            where
20881                D: serde::Deserializer<'de>,
20882            {
20883                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Engine>::new(
20884                    ".google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine",
20885                ))
20886            }
20887        }
20888    }
20889
20890    /// The type of the event.
20891    ///
20892    /// # Working with unknown values
20893    ///
20894    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20895    /// additional enum variants at any time. Adding new variants is not considered
20896    /// a breaking change. Applications should write their code in anticipation of:
20897    ///
20898    /// - New values appearing in future releases of the client library, **and**
20899    /// - New values received dynamically, without application changes.
20900    ///
20901    /// Please consult the [Working with enums] section in the user guide for some
20902    /// guidelines.
20903    ///
20904    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
20905    #[derive(Clone, Debug, PartialEq)]
20906    #[non_exhaustive]
20907    pub enum EventType {
20908        /// An unspecified event type.
20909        Unspecified,
20910        /// Event when the session is assigned to a user.
20911        Start,
20912        /// Event for stop of a session.
20913        Stop,
20914        /// Query events in the session.
20915        Query,
20916        /// Event for creation of a cluster. It is not yet assigned to a user.
20917        /// This comes before START in the sequence
20918        Create,
20919        /// If set, the enum was initialized with an unknown value.
20920        ///
20921        /// Applications can examine the value using [EventType::value] or
20922        /// [EventType::name].
20923        UnknownValue(event_type::UnknownValue),
20924    }
20925
20926    #[doc(hidden)]
20927    pub mod event_type {
20928        #[allow(unused_imports)]
20929        use super::*;
20930        #[derive(Clone, Debug, PartialEq)]
20931        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20932    }
20933
20934    impl EventType {
20935        /// Gets the enum value.
20936        ///
20937        /// Returns `None` if the enum contains an unknown value deserialized from
20938        /// the string representation of enums.
20939        pub fn value(&self) -> std::option::Option<i32> {
20940            match self {
20941                Self::Unspecified => std::option::Option::Some(0),
20942                Self::Start => std::option::Option::Some(1),
20943                Self::Stop => std::option::Option::Some(2),
20944                Self::Query => std::option::Option::Some(3),
20945                Self::Create => std::option::Option::Some(4),
20946                Self::UnknownValue(u) => u.0.value(),
20947            }
20948        }
20949
20950        /// Gets the enum value as a string.
20951        ///
20952        /// Returns `None` if the enum contains an unknown value deserialized from
20953        /// the integer representation of enums.
20954        pub fn name(&self) -> std::option::Option<&str> {
20955            match self {
20956                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
20957                Self::Start => std::option::Option::Some("START"),
20958                Self::Stop => std::option::Option::Some("STOP"),
20959                Self::Query => std::option::Option::Some("QUERY"),
20960                Self::Create => std::option::Option::Some("CREATE"),
20961                Self::UnknownValue(u) => u.0.name(),
20962            }
20963        }
20964    }
20965
20966    impl std::default::Default for EventType {
20967        fn default() -> Self {
20968            use std::convert::From;
20969            Self::from(0)
20970        }
20971    }
20972
20973    impl std::fmt::Display for EventType {
20974        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20975            wkt::internal::display_enum(f, self.name(), self.value())
20976        }
20977    }
20978
20979    impl std::convert::From<i32> for EventType {
20980        fn from(value: i32) -> Self {
20981            match value {
20982                0 => Self::Unspecified,
20983                1 => Self::Start,
20984                2 => Self::Stop,
20985                3 => Self::Query,
20986                4 => Self::Create,
20987                _ => Self::UnknownValue(event_type::UnknownValue(
20988                    wkt::internal::UnknownEnumValue::Integer(value),
20989                )),
20990            }
20991        }
20992    }
20993
20994    impl std::convert::From<&str> for EventType {
20995        fn from(value: &str) -> Self {
20996            use std::string::ToString;
20997            match value {
20998                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
20999                "START" => Self::Start,
21000                "STOP" => Self::Stop,
21001                "QUERY" => Self::Query,
21002                "CREATE" => Self::Create,
21003                _ => Self::UnknownValue(event_type::UnknownValue(
21004                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21005                )),
21006            }
21007        }
21008    }
21009
21010    impl serde::ser::Serialize for EventType {
21011        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21012        where
21013            S: serde::Serializer,
21014        {
21015            match self {
21016                Self::Unspecified => serializer.serialize_i32(0),
21017                Self::Start => serializer.serialize_i32(1),
21018                Self::Stop => serializer.serialize_i32(2),
21019                Self::Query => serializer.serialize_i32(3),
21020                Self::Create => serializer.serialize_i32(4),
21021                Self::UnknownValue(u) => u.0.serialize(serializer),
21022            }
21023        }
21024    }
21025
21026    impl<'de> serde::de::Deserialize<'de> for EventType {
21027        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21028        where
21029            D: serde::Deserializer<'de>,
21030        {
21031            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
21032                ".google.cloud.dataplex.v1.SessionEvent.EventType",
21033            ))
21034        }
21035    }
21036
21037    /// Additional information about the Query metadata.
21038    #[derive(Clone, Debug, PartialEq)]
21039    #[non_exhaustive]
21040    pub enum Detail {
21041        /// The execution details of the query.
21042        Query(std::boxed::Box<crate::model::session_event::QueryDetail>),
21043    }
21044}
21045
21046/// Payload associated with Governance related log events.
21047#[derive(Clone, Default, PartialEq)]
21048#[non_exhaustive]
21049pub struct GovernanceEvent {
21050    /// The log message.
21051    pub message: std::string::String,
21052
21053    /// The type of the event.
21054    pub event_type: crate::model::governance_event::EventType,
21055
21056    /// Entity resource information if the log event is associated with a
21057    /// specific entity.
21058    pub entity: std::option::Option<crate::model::governance_event::Entity>,
21059
21060    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21061}
21062
21063impl GovernanceEvent {
21064    pub fn new() -> Self {
21065        std::default::Default::default()
21066    }
21067
21068    /// Sets the value of [message][crate::model::GovernanceEvent::message].
21069    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21070        self.message = v.into();
21071        self
21072    }
21073
21074    /// Sets the value of [event_type][crate::model::GovernanceEvent::event_type].
21075    pub fn set_event_type<T: std::convert::Into<crate::model::governance_event::EventType>>(
21076        mut self,
21077        v: T,
21078    ) -> Self {
21079        self.event_type = v.into();
21080        self
21081    }
21082
21083    /// Sets the value of [entity][crate::model::GovernanceEvent::entity].
21084    pub fn set_entity<T>(mut self, v: T) -> Self
21085    where
21086        T: std::convert::Into<crate::model::governance_event::Entity>,
21087    {
21088        self.entity = std::option::Option::Some(v.into());
21089        self
21090    }
21091
21092    /// Sets or clears the value of [entity][crate::model::GovernanceEvent::entity].
21093    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
21094    where
21095        T: std::convert::Into<crate::model::governance_event::Entity>,
21096    {
21097        self.entity = v.map(|x| x.into());
21098        self
21099    }
21100}
21101
21102impl wkt::message::Message for GovernanceEvent {
21103    fn typename() -> &'static str {
21104        "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent"
21105    }
21106}
21107
21108/// Defines additional types related to [GovernanceEvent].
21109pub mod governance_event {
21110    #[allow(unused_imports)]
21111    use super::*;
21112
21113    /// Information about Entity resource that the log event is associated with.
21114    #[derive(Clone, Default, PartialEq)]
21115    #[non_exhaustive]
21116    pub struct Entity {
21117        /// The Entity resource the log event is associated with.
21118        /// Format:
21119        /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`
21120        pub entity: std::string::String,
21121
21122        /// Type of entity.
21123        pub entity_type: crate::model::governance_event::entity::EntityType,
21124
21125        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21126    }
21127
21128    impl Entity {
21129        pub fn new() -> Self {
21130            std::default::Default::default()
21131        }
21132
21133        /// Sets the value of [entity][crate::model::governance_event::Entity::entity].
21134        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21135            self.entity = v.into();
21136            self
21137        }
21138
21139        /// Sets the value of [entity_type][crate::model::governance_event::Entity::entity_type].
21140        pub fn set_entity_type<
21141            T: std::convert::Into<crate::model::governance_event::entity::EntityType>,
21142        >(
21143            mut self,
21144            v: T,
21145        ) -> Self {
21146            self.entity_type = v.into();
21147            self
21148        }
21149    }
21150
21151    impl wkt::message::Message for Entity {
21152        fn typename() -> &'static str {
21153            "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent.Entity"
21154        }
21155    }
21156
21157    /// Defines additional types related to [Entity].
21158    pub mod entity {
21159        #[allow(unused_imports)]
21160        use super::*;
21161
21162        /// Type of entity.
21163        ///
21164        /// # Working with unknown values
21165        ///
21166        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21167        /// additional enum variants at any time. Adding new variants is not considered
21168        /// a breaking change. Applications should write their code in anticipation of:
21169        ///
21170        /// - New values appearing in future releases of the client library, **and**
21171        /// - New values received dynamically, without application changes.
21172        ///
21173        /// Please consult the [Working with enums] section in the user guide for some
21174        /// guidelines.
21175        ///
21176        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21177        #[derive(Clone, Debug, PartialEq)]
21178        #[non_exhaustive]
21179        pub enum EntityType {
21180            /// An unspecified Entity type.
21181            Unspecified,
21182            /// Table entity type.
21183            Table,
21184            /// Fileset entity type.
21185            Fileset,
21186            /// If set, the enum was initialized with an unknown value.
21187            ///
21188            /// Applications can examine the value using [EntityType::value] or
21189            /// [EntityType::name].
21190            UnknownValue(entity_type::UnknownValue),
21191        }
21192
21193        #[doc(hidden)]
21194        pub mod entity_type {
21195            #[allow(unused_imports)]
21196            use super::*;
21197            #[derive(Clone, Debug, PartialEq)]
21198            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21199        }
21200
21201        impl EntityType {
21202            /// Gets the enum value.
21203            ///
21204            /// Returns `None` if the enum contains an unknown value deserialized from
21205            /// the string representation of enums.
21206            pub fn value(&self) -> std::option::Option<i32> {
21207                match self {
21208                    Self::Unspecified => std::option::Option::Some(0),
21209                    Self::Table => std::option::Option::Some(1),
21210                    Self::Fileset => std::option::Option::Some(2),
21211                    Self::UnknownValue(u) => u.0.value(),
21212                }
21213            }
21214
21215            /// Gets the enum value as a string.
21216            ///
21217            /// Returns `None` if the enum contains an unknown value deserialized from
21218            /// the integer representation of enums.
21219            pub fn name(&self) -> std::option::Option<&str> {
21220                match self {
21221                    Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
21222                    Self::Table => std::option::Option::Some("TABLE"),
21223                    Self::Fileset => std::option::Option::Some("FILESET"),
21224                    Self::UnknownValue(u) => u.0.name(),
21225                }
21226            }
21227        }
21228
21229        impl std::default::Default for EntityType {
21230            fn default() -> Self {
21231                use std::convert::From;
21232                Self::from(0)
21233            }
21234        }
21235
21236        impl std::fmt::Display for EntityType {
21237            fn fmt(
21238                &self,
21239                f: &mut std::fmt::Formatter<'_>,
21240            ) -> std::result::Result<(), std::fmt::Error> {
21241                wkt::internal::display_enum(f, self.name(), self.value())
21242            }
21243        }
21244
21245        impl std::convert::From<i32> for EntityType {
21246            fn from(value: i32) -> Self {
21247                match value {
21248                    0 => Self::Unspecified,
21249                    1 => Self::Table,
21250                    2 => Self::Fileset,
21251                    _ => Self::UnknownValue(entity_type::UnknownValue(
21252                        wkt::internal::UnknownEnumValue::Integer(value),
21253                    )),
21254                }
21255            }
21256        }
21257
21258        impl std::convert::From<&str> for EntityType {
21259            fn from(value: &str) -> Self {
21260                use std::string::ToString;
21261                match value {
21262                    "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
21263                    "TABLE" => Self::Table,
21264                    "FILESET" => Self::Fileset,
21265                    _ => Self::UnknownValue(entity_type::UnknownValue(
21266                        wkt::internal::UnknownEnumValue::String(value.to_string()),
21267                    )),
21268                }
21269            }
21270        }
21271
21272        impl serde::ser::Serialize for EntityType {
21273            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21274            where
21275                S: serde::Serializer,
21276            {
21277                match self {
21278                    Self::Unspecified => serializer.serialize_i32(0),
21279                    Self::Table => serializer.serialize_i32(1),
21280                    Self::Fileset => serializer.serialize_i32(2),
21281                    Self::UnknownValue(u) => u.0.serialize(serializer),
21282                }
21283            }
21284        }
21285
21286        impl<'de> serde::de::Deserialize<'de> for EntityType {
21287            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21288            where
21289                D: serde::Deserializer<'de>,
21290            {
21291                deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
21292                    ".google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType",
21293                ))
21294            }
21295        }
21296    }
21297
21298    /// Type of governance log event.
21299    ///
21300    /// # Working with unknown values
21301    ///
21302    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
21303    /// additional enum variants at any time. Adding new variants is not considered
21304    /// a breaking change. Applications should write their code in anticipation of:
21305    ///
21306    /// - New values appearing in future releases of the client library, **and**
21307    /// - New values received dynamically, without application changes.
21308    ///
21309    /// Please consult the [Working with enums] section in the user guide for some
21310    /// guidelines.
21311    ///
21312    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
21313    #[derive(Clone, Debug, PartialEq)]
21314    #[non_exhaustive]
21315    pub enum EventType {
21316        /// An unspecified event type.
21317        Unspecified,
21318        /// Resource IAM policy update event.
21319        ResourceIamPolicyUpdate,
21320        /// BigQuery table create event.
21321        BigqueryTableCreate,
21322        /// BigQuery table update event.
21323        BigqueryTableUpdate,
21324        /// BigQuery table delete event.
21325        BigqueryTableDelete,
21326        /// BigQuery connection create event.
21327        BigqueryConnectionCreate,
21328        /// BigQuery connection update event.
21329        BigqueryConnectionUpdate,
21330        /// BigQuery connection delete event.
21331        BigqueryConnectionDelete,
21332        /// BigQuery taxonomy created.
21333        BigqueryTaxonomyCreate,
21334        /// BigQuery policy tag created.
21335        BigqueryPolicyTagCreate,
21336        /// BigQuery policy tag deleted.
21337        BigqueryPolicyTagDelete,
21338        /// BigQuery set iam policy for policy tag.
21339        BigqueryPolicyTagSetIamPolicy,
21340        /// Access policy update event.
21341        AccessPolicyUpdate,
21342        /// Number of resources matched with particular Query.
21343        GovernanceRuleMatchedResources,
21344        /// Rule processing exceeds the allowed limit.
21345        GovernanceRuleSearchLimitExceeds,
21346        /// Rule processing errors.
21347        GovernanceRuleErrors,
21348        /// Governance rule processing Event.
21349        GovernanceRuleProcessing,
21350        /// If set, the enum was initialized with an unknown value.
21351        ///
21352        /// Applications can examine the value using [EventType::value] or
21353        /// [EventType::name].
21354        UnknownValue(event_type::UnknownValue),
21355    }
21356
21357    #[doc(hidden)]
21358    pub mod event_type {
21359        #[allow(unused_imports)]
21360        use super::*;
21361        #[derive(Clone, Debug, PartialEq)]
21362        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21363    }
21364
21365    impl EventType {
21366        /// Gets the enum value.
21367        ///
21368        /// Returns `None` if the enum contains an unknown value deserialized from
21369        /// the string representation of enums.
21370        pub fn value(&self) -> std::option::Option<i32> {
21371            match self {
21372                Self::Unspecified => std::option::Option::Some(0),
21373                Self::ResourceIamPolicyUpdate => std::option::Option::Some(1),
21374                Self::BigqueryTableCreate => std::option::Option::Some(2),
21375                Self::BigqueryTableUpdate => std::option::Option::Some(3),
21376                Self::BigqueryTableDelete => std::option::Option::Some(4),
21377                Self::BigqueryConnectionCreate => std::option::Option::Some(5),
21378                Self::BigqueryConnectionUpdate => std::option::Option::Some(6),
21379                Self::BigqueryConnectionDelete => std::option::Option::Some(7),
21380                Self::BigqueryTaxonomyCreate => std::option::Option::Some(10),
21381                Self::BigqueryPolicyTagCreate => std::option::Option::Some(11),
21382                Self::BigqueryPolicyTagDelete => std::option::Option::Some(12),
21383                Self::BigqueryPolicyTagSetIamPolicy => std::option::Option::Some(13),
21384                Self::AccessPolicyUpdate => std::option::Option::Some(14),
21385                Self::GovernanceRuleMatchedResources => std::option::Option::Some(15),
21386                Self::GovernanceRuleSearchLimitExceeds => std::option::Option::Some(16),
21387                Self::GovernanceRuleErrors => std::option::Option::Some(17),
21388                Self::GovernanceRuleProcessing => std::option::Option::Some(18),
21389                Self::UnknownValue(u) => u.0.value(),
21390            }
21391        }
21392
21393        /// Gets the enum value as a string.
21394        ///
21395        /// Returns `None` if the enum contains an unknown value deserialized from
21396        /// the integer representation of enums.
21397        pub fn name(&self) -> std::option::Option<&str> {
21398            match self {
21399                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
21400                Self::ResourceIamPolicyUpdate => {
21401                    std::option::Option::Some("RESOURCE_IAM_POLICY_UPDATE")
21402                }
21403                Self::BigqueryTableCreate => std::option::Option::Some("BIGQUERY_TABLE_CREATE"),
21404                Self::BigqueryTableUpdate => std::option::Option::Some("BIGQUERY_TABLE_UPDATE"),
21405                Self::BigqueryTableDelete => std::option::Option::Some("BIGQUERY_TABLE_DELETE"),
21406                Self::BigqueryConnectionCreate => {
21407                    std::option::Option::Some("BIGQUERY_CONNECTION_CREATE")
21408                }
21409                Self::BigqueryConnectionUpdate => {
21410                    std::option::Option::Some("BIGQUERY_CONNECTION_UPDATE")
21411                }
21412                Self::BigqueryConnectionDelete => {
21413                    std::option::Option::Some("BIGQUERY_CONNECTION_DELETE")
21414                }
21415                Self::BigqueryTaxonomyCreate => {
21416                    std::option::Option::Some("BIGQUERY_TAXONOMY_CREATE")
21417                }
21418                Self::BigqueryPolicyTagCreate => {
21419                    std::option::Option::Some("BIGQUERY_POLICY_TAG_CREATE")
21420                }
21421                Self::BigqueryPolicyTagDelete => {
21422                    std::option::Option::Some("BIGQUERY_POLICY_TAG_DELETE")
21423                }
21424                Self::BigqueryPolicyTagSetIamPolicy => {
21425                    std::option::Option::Some("BIGQUERY_POLICY_TAG_SET_IAM_POLICY")
21426                }
21427                Self::AccessPolicyUpdate => std::option::Option::Some("ACCESS_POLICY_UPDATE"),
21428                Self::GovernanceRuleMatchedResources => {
21429                    std::option::Option::Some("GOVERNANCE_RULE_MATCHED_RESOURCES")
21430                }
21431                Self::GovernanceRuleSearchLimitExceeds => {
21432                    std::option::Option::Some("GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS")
21433                }
21434                Self::GovernanceRuleErrors => std::option::Option::Some("GOVERNANCE_RULE_ERRORS"),
21435                Self::GovernanceRuleProcessing => {
21436                    std::option::Option::Some("GOVERNANCE_RULE_PROCESSING")
21437                }
21438                Self::UnknownValue(u) => u.0.name(),
21439            }
21440        }
21441    }
21442
21443    impl std::default::Default for EventType {
21444        fn default() -> Self {
21445            use std::convert::From;
21446            Self::from(0)
21447        }
21448    }
21449
21450    impl std::fmt::Display for EventType {
21451        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21452            wkt::internal::display_enum(f, self.name(), self.value())
21453        }
21454    }
21455
21456    impl std::convert::From<i32> for EventType {
21457        fn from(value: i32) -> Self {
21458            match value {
21459                0 => Self::Unspecified,
21460                1 => Self::ResourceIamPolicyUpdate,
21461                2 => Self::BigqueryTableCreate,
21462                3 => Self::BigqueryTableUpdate,
21463                4 => Self::BigqueryTableDelete,
21464                5 => Self::BigqueryConnectionCreate,
21465                6 => Self::BigqueryConnectionUpdate,
21466                7 => Self::BigqueryConnectionDelete,
21467                10 => Self::BigqueryTaxonomyCreate,
21468                11 => Self::BigqueryPolicyTagCreate,
21469                12 => Self::BigqueryPolicyTagDelete,
21470                13 => Self::BigqueryPolicyTagSetIamPolicy,
21471                14 => Self::AccessPolicyUpdate,
21472                15 => Self::GovernanceRuleMatchedResources,
21473                16 => Self::GovernanceRuleSearchLimitExceeds,
21474                17 => Self::GovernanceRuleErrors,
21475                18 => Self::GovernanceRuleProcessing,
21476                _ => Self::UnknownValue(event_type::UnknownValue(
21477                    wkt::internal::UnknownEnumValue::Integer(value),
21478                )),
21479            }
21480        }
21481    }
21482
21483    impl std::convert::From<&str> for EventType {
21484        fn from(value: &str) -> Self {
21485            use std::string::ToString;
21486            match value {
21487                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
21488                "RESOURCE_IAM_POLICY_UPDATE" => Self::ResourceIamPolicyUpdate,
21489                "BIGQUERY_TABLE_CREATE" => Self::BigqueryTableCreate,
21490                "BIGQUERY_TABLE_UPDATE" => Self::BigqueryTableUpdate,
21491                "BIGQUERY_TABLE_DELETE" => Self::BigqueryTableDelete,
21492                "BIGQUERY_CONNECTION_CREATE" => Self::BigqueryConnectionCreate,
21493                "BIGQUERY_CONNECTION_UPDATE" => Self::BigqueryConnectionUpdate,
21494                "BIGQUERY_CONNECTION_DELETE" => Self::BigqueryConnectionDelete,
21495                "BIGQUERY_TAXONOMY_CREATE" => Self::BigqueryTaxonomyCreate,
21496                "BIGQUERY_POLICY_TAG_CREATE" => Self::BigqueryPolicyTagCreate,
21497                "BIGQUERY_POLICY_TAG_DELETE" => Self::BigqueryPolicyTagDelete,
21498                "BIGQUERY_POLICY_TAG_SET_IAM_POLICY" => Self::BigqueryPolicyTagSetIamPolicy,
21499                "ACCESS_POLICY_UPDATE" => Self::AccessPolicyUpdate,
21500                "GOVERNANCE_RULE_MATCHED_RESOURCES" => Self::GovernanceRuleMatchedResources,
21501                "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS" => Self::GovernanceRuleSearchLimitExceeds,
21502                "GOVERNANCE_RULE_ERRORS" => Self::GovernanceRuleErrors,
21503                "GOVERNANCE_RULE_PROCESSING" => Self::GovernanceRuleProcessing,
21504                _ => Self::UnknownValue(event_type::UnknownValue(
21505                    wkt::internal::UnknownEnumValue::String(value.to_string()),
21506                )),
21507            }
21508        }
21509    }
21510
21511    impl serde::ser::Serialize for EventType {
21512        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21513        where
21514            S: serde::Serializer,
21515        {
21516            match self {
21517                Self::Unspecified => serializer.serialize_i32(0),
21518                Self::ResourceIamPolicyUpdate => serializer.serialize_i32(1),
21519                Self::BigqueryTableCreate => serializer.serialize_i32(2),
21520                Self::BigqueryTableUpdate => serializer.serialize_i32(3),
21521                Self::BigqueryTableDelete => serializer.serialize_i32(4),
21522                Self::BigqueryConnectionCreate => serializer.serialize_i32(5),
21523                Self::BigqueryConnectionUpdate => serializer.serialize_i32(6),
21524                Self::BigqueryConnectionDelete => serializer.serialize_i32(7),
21525                Self::BigqueryTaxonomyCreate => serializer.serialize_i32(10),
21526                Self::BigqueryPolicyTagCreate => serializer.serialize_i32(11),
21527                Self::BigqueryPolicyTagDelete => serializer.serialize_i32(12),
21528                Self::BigqueryPolicyTagSetIamPolicy => serializer.serialize_i32(13),
21529                Self::AccessPolicyUpdate => serializer.serialize_i32(14),
21530                Self::GovernanceRuleMatchedResources => serializer.serialize_i32(15),
21531                Self::GovernanceRuleSearchLimitExceeds => serializer.serialize_i32(16),
21532                Self::GovernanceRuleErrors => serializer.serialize_i32(17),
21533                Self::GovernanceRuleProcessing => serializer.serialize_i32(18),
21534                Self::UnknownValue(u) => u.0.serialize(serializer),
21535            }
21536        }
21537    }
21538
21539    impl<'de> serde::de::Deserialize<'de> for EventType {
21540        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21541        where
21542            D: serde::Deserializer<'de>,
21543        {
21544            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
21545                ".google.cloud.dataplex.v1.GovernanceEvent.EventType",
21546            ))
21547        }
21548    }
21549}
21550
21551/// These messages contain information about the execution of a datascan.
21552/// The monitored resource is 'DataScan'
21553#[derive(Clone, Default, PartialEq)]
21554#[non_exhaustive]
21555pub struct DataScanEvent {
21556    /// The data source of the data scan
21557    pub data_source: std::string::String,
21558
21559    /// The identifier of the specific data scan job this log entry is for.
21560    pub job_id: std::string::String,
21561
21562    /// The time when the data scan job was created.
21563    pub create_time: std::option::Option<wkt::Timestamp>,
21564
21565    /// The time when the data scan job started to run.
21566    pub start_time: std::option::Option<wkt::Timestamp>,
21567
21568    /// The time when the data scan job finished.
21569    pub end_time: std::option::Option<wkt::Timestamp>,
21570
21571    /// The type of the data scan.
21572    pub r#type: crate::model::data_scan_event::ScanType,
21573
21574    /// The status of the data scan job.
21575    pub state: crate::model::data_scan_event::State,
21576
21577    /// The message describing the data scan job event.
21578    pub message: std::string::String,
21579
21580    /// A version identifier of the spec which was used to execute this job.
21581    pub spec_version: std::string::String,
21582
21583    /// The trigger type of the data scan job.
21584    pub trigger: crate::model::data_scan_event::Trigger,
21585
21586    /// The scope of the data scan (e.g. full, incremental).
21587    pub scope: crate::model::data_scan_event::Scope,
21588
21589    /// The result of post scan actions.
21590    pub post_scan_actions_result:
21591        std::option::Option<crate::model::data_scan_event::PostScanActionsResult>,
21592
21593    /// The status of publishing the data scan as Dataplex Universal Catalog
21594    /// metadata.
21595    pub catalog_publishing_status:
21596        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
21597
21598    /// The result of the data scan job.
21599    pub result: std::option::Option<crate::model::data_scan_event::Result>,
21600
21601    /// The applied configs in the data scan job.
21602    pub applied_configs: std::option::Option<crate::model::data_scan_event::AppliedConfigs>,
21603
21604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21605}
21606
21607impl DataScanEvent {
21608    pub fn new() -> Self {
21609        std::default::Default::default()
21610    }
21611
21612    /// Sets the value of [data_source][crate::model::DataScanEvent::data_source].
21613    pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21614        self.data_source = v.into();
21615        self
21616    }
21617
21618    /// Sets the value of [job_id][crate::model::DataScanEvent::job_id].
21619    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21620        self.job_id = v.into();
21621        self
21622    }
21623
21624    /// Sets the value of [create_time][crate::model::DataScanEvent::create_time].
21625    pub fn set_create_time<T>(mut self, v: T) -> Self
21626    where
21627        T: std::convert::Into<wkt::Timestamp>,
21628    {
21629        self.create_time = std::option::Option::Some(v.into());
21630        self
21631    }
21632
21633    /// Sets or clears the value of [create_time][crate::model::DataScanEvent::create_time].
21634    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
21635    where
21636        T: std::convert::Into<wkt::Timestamp>,
21637    {
21638        self.create_time = v.map(|x| x.into());
21639        self
21640    }
21641
21642    /// Sets the value of [start_time][crate::model::DataScanEvent::start_time].
21643    pub fn set_start_time<T>(mut self, v: T) -> Self
21644    where
21645        T: std::convert::Into<wkt::Timestamp>,
21646    {
21647        self.start_time = std::option::Option::Some(v.into());
21648        self
21649    }
21650
21651    /// Sets or clears the value of [start_time][crate::model::DataScanEvent::start_time].
21652    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
21653    where
21654        T: std::convert::Into<wkt::Timestamp>,
21655    {
21656        self.start_time = v.map(|x| x.into());
21657        self
21658    }
21659
21660    /// Sets the value of [end_time][crate::model::DataScanEvent::end_time].
21661    pub fn set_end_time<T>(mut self, v: T) -> Self
21662    where
21663        T: std::convert::Into<wkt::Timestamp>,
21664    {
21665        self.end_time = std::option::Option::Some(v.into());
21666        self
21667    }
21668
21669    /// Sets or clears the value of [end_time][crate::model::DataScanEvent::end_time].
21670    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
21671    where
21672        T: std::convert::Into<wkt::Timestamp>,
21673    {
21674        self.end_time = v.map(|x| x.into());
21675        self
21676    }
21677
21678    /// Sets the value of [r#type][crate::model::DataScanEvent::type].
21679    pub fn set_type<T: std::convert::Into<crate::model::data_scan_event::ScanType>>(
21680        mut self,
21681        v: T,
21682    ) -> Self {
21683        self.r#type = v.into();
21684        self
21685    }
21686
21687    /// Sets the value of [state][crate::model::DataScanEvent::state].
21688    pub fn set_state<T: std::convert::Into<crate::model::data_scan_event::State>>(
21689        mut self,
21690        v: T,
21691    ) -> Self {
21692        self.state = v.into();
21693        self
21694    }
21695
21696    /// Sets the value of [message][crate::model::DataScanEvent::message].
21697    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21698        self.message = v.into();
21699        self
21700    }
21701
21702    /// Sets the value of [spec_version][crate::model::DataScanEvent::spec_version].
21703    pub fn set_spec_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21704        self.spec_version = v.into();
21705        self
21706    }
21707
21708    /// Sets the value of [trigger][crate::model::DataScanEvent::trigger].
21709    pub fn set_trigger<T: std::convert::Into<crate::model::data_scan_event::Trigger>>(
21710        mut self,
21711        v: T,
21712    ) -> Self {
21713        self.trigger = v.into();
21714        self
21715    }
21716
21717    /// Sets the value of [scope][crate::model::DataScanEvent::scope].
21718    pub fn set_scope<T: std::convert::Into<crate::model::data_scan_event::Scope>>(
21719        mut self,
21720        v: T,
21721    ) -> Self {
21722        self.scope = v.into();
21723        self
21724    }
21725
21726    /// Sets the value of [post_scan_actions_result][crate::model::DataScanEvent::post_scan_actions_result].
21727    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
21728    where
21729        T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
21730    {
21731        self.post_scan_actions_result = std::option::Option::Some(v.into());
21732        self
21733    }
21734
21735    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataScanEvent::post_scan_actions_result].
21736    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
21737    where
21738        T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
21739    {
21740        self.post_scan_actions_result = v.map(|x| x.into());
21741        self
21742    }
21743
21744    /// Sets the value of [catalog_publishing_status][crate::model::DataScanEvent::catalog_publishing_status].
21745    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
21746    where
21747        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
21748    {
21749        self.catalog_publishing_status = std::option::Option::Some(v.into());
21750        self
21751    }
21752
21753    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataScanEvent::catalog_publishing_status].
21754    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
21755    where
21756        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
21757    {
21758        self.catalog_publishing_status = v.map(|x| x.into());
21759        self
21760    }
21761
21762    /// Sets the value of [result][crate::model::DataScanEvent::result].
21763    ///
21764    /// Note that all the setters affecting `result` are mutually
21765    /// exclusive.
21766    pub fn set_result<
21767        T: std::convert::Into<std::option::Option<crate::model::data_scan_event::Result>>,
21768    >(
21769        mut self,
21770        v: T,
21771    ) -> Self {
21772        self.result = v.into();
21773        self
21774    }
21775
21776    /// The value of [result][crate::model::DataScanEvent::result]
21777    /// if it holds a `DataProfile`, `None` if the field is not set or
21778    /// holds a different branch.
21779    pub fn data_profile(
21780        &self,
21781    ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>
21782    {
21783        #[allow(unreachable_patterns)]
21784        self.result.as_ref().and_then(|v| match v {
21785            crate::model::data_scan_event::Result::DataProfile(v) => std::option::Option::Some(v),
21786            _ => std::option::Option::None,
21787        })
21788    }
21789
21790    /// Sets the value of [result][crate::model::DataScanEvent::result]
21791    /// to hold a `DataProfile`.
21792    ///
21793    /// Note that all the setters affecting `result` are
21794    /// mutually exclusive.
21795    pub fn set_data_profile<
21796        T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>,
21797    >(
21798        mut self,
21799        v: T,
21800    ) -> Self {
21801        self.result =
21802            std::option::Option::Some(crate::model::data_scan_event::Result::DataProfile(v.into()));
21803        self
21804    }
21805
21806    /// The value of [result][crate::model::DataScanEvent::result]
21807    /// if it holds a `DataQuality`, `None` if the field is not set or
21808    /// holds a different branch.
21809    pub fn data_quality(
21810        &self,
21811    ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>
21812    {
21813        #[allow(unreachable_patterns)]
21814        self.result.as_ref().and_then(|v| match v {
21815            crate::model::data_scan_event::Result::DataQuality(v) => std::option::Option::Some(v),
21816            _ => std::option::Option::None,
21817        })
21818    }
21819
21820    /// Sets the value of [result][crate::model::DataScanEvent::result]
21821    /// to hold a `DataQuality`.
21822    ///
21823    /// Note that all the setters affecting `result` are
21824    /// mutually exclusive.
21825    pub fn set_data_quality<
21826        T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>,
21827    >(
21828        mut self,
21829        v: T,
21830    ) -> Self {
21831        self.result =
21832            std::option::Option::Some(crate::model::data_scan_event::Result::DataQuality(v.into()));
21833        self
21834    }
21835
21836    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs].
21837    ///
21838    /// Note that all the setters affecting `applied_configs` are mutually
21839    /// exclusive.
21840    pub fn set_applied_configs<
21841        T: std::convert::Into<std::option::Option<crate::model::data_scan_event::AppliedConfigs>>,
21842    >(
21843        mut self,
21844        v: T,
21845    ) -> Self {
21846        self.applied_configs = v.into();
21847        self
21848    }
21849
21850    /// The value of [applied_configs][crate::model::DataScanEvent::applied_configs]
21851    /// if it holds a `DataProfileConfigs`, `None` if the field is not set or
21852    /// holds a different branch.
21853    pub fn data_profile_configs(
21854        &self,
21855    ) -> std::option::Option<
21856        &std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
21857    > {
21858        #[allow(unreachable_patterns)]
21859        self.applied_configs.as_ref().and_then(|v| match v {
21860            crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v) => {
21861                std::option::Option::Some(v)
21862            }
21863            _ => std::option::Option::None,
21864        })
21865    }
21866
21867    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs]
21868    /// to hold a `DataProfileConfigs`.
21869    ///
21870    /// Note that all the setters affecting `applied_configs` are
21871    /// mutually exclusive.
21872    pub fn set_data_profile_configs<
21873        T: std::convert::Into<
21874                std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
21875            >,
21876    >(
21877        mut self,
21878        v: T,
21879    ) -> Self {
21880        self.applied_configs = std::option::Option::Some(
21881            crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v.into()),
21882        );
21883        self
21884    }
21885
21886    /// The value of [applied_configs][crate::model::DataScanEvent::applied_configs]
21887    /// if it holds a `DataQualityConfigs`, `None` if the field is not set or
21888    /// holds a different branch.
21889    pub fn data_quality_configs(
21890        &self,
21891    ) -> std::option::Option<
21892        &std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
21893    > {
21894        #[allow(unreachable_patterns)]
21895        self.applied_configs.as_ref().and_then(|v| match v {
21896            crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v) => {
21897                std::option::Option::Some(v)
21898            }
21899            _ => std::option::Option::None,
21900        })
21901    }
21902
21903    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs]
21904    /// to hold a `DataQualityConfigs`.
21905    ///
21906    /// Note that all the setters affecting `applied_configs` are
21907    /// mutually exclusive.
21908    pub fn set_data_quality_configs<
21909        T: std::convert::Into<
21910                std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
21911            >,
21912    >(
21913        mut self,
21914        v: T,
21915    ) -> Self {
21916        self.applied_configs = std::option::Option::Some(
21917            crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v.into()),
21918        );
21919        self
21920    }
21921}
21922
21923impl wkt::message::Message for DataScanEvent {
21924    fn typename() -> &'static str {
21925        "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent"
21926    }
21927}
21928
21929/// Defines additional types related to [DataScanEvent].
21930pub mod data_scan_event {
21931    #[allow(unused_imports)]
21932    use super::*;
21933
21934    /// Data profile result for data scan job.
21935    #[derive(Clone, Default, PartialEq)]
21936    #[non_exhaustive]
21937    pub struct DataProfileResult {
21938        /// The count of rows processed in the data scan job.
21939        pub row_count: i64,
21940
21941        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21942    }
21943
21944    impl DataProfileResult {
21945        pub fn new() -> Self {
21946            std::default::Default::default()
21947        }
21948
21949        /// Sets the value of [row_count][crate::model::data_scan_event::DataProfileResult::row_count].
21950        pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
21951            self.row_count = v.into();
21952            self
21953        }
21954    }
21955
21956    impl wkt::message::Message for DataProfileResult {
21957        fn typename() -> &'static str {
21958            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"
21959        }
21960    }
21961
21962    /// Data quality result for data scan job.
21963    #[derive(Clone, Default, PartialEq)]
21964    #[non_exhaustive]
21965    pub struct DataQualityResult {
21966        /// The count of rows processed in the data scan job.
21967        pub row_count: i64,
21968
21969        /// Whether the data quality result was `pass` or not.
21970        pub passed: bool,
21971
21972        /// The result of each dimension for data quality result.
21973        /// The key of the map is the name of the dimension.
21974        /// The value is the bool value depicting whether the dimension result was
21975        /// `pass` or not.
21976        pub dimension_passed: std::collections::HashMap<std::string::String, bool>,
21977
21978        /// The table-level data quality score for the data scan job.
21979        ///
21980        /// The data quality score ranges between [0, 100] (up to two decimal
21981        /// points).
21982        pub score: f32,
21983
21984        /// The score of each dimension for data quality result.
21985        /// The key of the map is the name of the dimension.
21986        /// The value is the data quality score for the dimension.
21987        ///
21988        /// The score ranges between [0, 100] (up to two decimal
21989        /// points).
21990        pub dimension_score: std::collections::HashMap<std::string::String, f32>,
21991
21992        /// The score of each column scanned in the data scan job.
21993        /// The key of the map is the name of the column.
21994        /// The value is the data quality score for the column.
21995        ///
21996        /// The score ranges between [0, 100] (up to two decimal
21997        /// points).
21998        pub column_score: std::collections::HashMap<std::string::String, f32>,
21999
22000        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22001    }
22002
22003    impl DataQualityResult {
22004        pub fn new() -> Self {
22005            std::default::Default::default()
22006        }
22007
22008        /// Sets the value of [row_count][crate::model::data_scan_event::DataQualityResult::row_count].
22009        pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
22010            self.row_count = v.into();
22011            self
22012        }
22013
22014        /// Sets the value of [passed][crate::model::data_scan_event::DataQualityResult::passed].
22015        pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22016            self.passed = v.into();
22017            self
22018        }
22019
22020        /// Sets the value of [dimension_passed][crate::model::data_scan_event::DataQualityResult::dimension_passed].
22021        pub fn set_dimension_passed<T, K, V>(mut self, v: T) -> Self
22022        where
22023            T: std::iter::IntoIterator<Item = (K, V)>,
22024            K: std::convert::Into<std::string::String>,
22025            V: std::convert::Into<bool>,
22026        {
22027            use std::iter::Iterator;
22028            self.dimension_passed = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22029            self
22030        }
22031
22032        /// Sets the value of [score][crate::model::data_scan_event::DataQualityResult::score].
22033        pub fn set_score<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
22034            self.score = v.into();
22035            self
22036        }
22037
22038        /// Sets the value of [dimension_score][crate::model::data_scan_event::DataQualityResult::dimension_score].
22039        pub fn set_dimension_score<T, K, V>(mut self, v: T) -> Self
22040        where
22041            T: std::iter::IntoIterator<Item = (K, V)>,
22042            K: std::convert::Into<std::string::String>,
22043            V: std::convert::Into<f32>,
22044        {
22045            use std::iter::Iterator;
22046            self.dimension_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22047            self
22048        }
22049
22050        /// Sets the value of [column_score][crate::model::data_scan_event::DataQualityResult::column_score].
22051        pub fn set_column_score<T, K, V>(mut self, v: T) -> Self
22052        where
22053            T: std::iter::IntoIterator<Item = (K, V)>,
22054            K: std::convert::Into<std::string::String>,
22055            V: std::convert::Into<f32>,
22056        {
22057            use std::iter::Iterator;
22058            self.column_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22059            self
22060        }
22061    }
22062
22063    impl wkt::message::Message for DataQualityResult {
22064        fn typename() -> &'static str {
22065            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"
22066        }
22067    }
22068
22069    /// Applied configs for data profile type data scan job.
22070    #[derive(Clone, Default, PartialEq)]
22071    #[non_exhaustive]
22072    pub struct DataProfileAppliedConfigs {
22073        /// The percentage of the records selected from the dataset for DataScan.
22074        ///
22075        /// * Value ranges between 0.0 and 100.0.
22076        /// * Value 0.0 or 100.0 imply that sampling was not applied.
22077        pub sampling_percent: f32,
22078
22079        /// Boolean indicating whether a row filter was applied in the DataScan job.
22080        pub row_filter_applied: bool,
22081
22082        /// Boolean indicating whether a column filter was applied in the DataScan
22083        /// job.
22084        pub column_filter_applied: bool,
22085
22086        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22087    }
22088
22089    impl DataProfileAppliedConfigs {
22090        pub fn new() -> Self {
22091            std::default::Default::default()
22092        }
22093
22094        /// Sets the value of [sampling_percent][crate::model::data_scan_event::DataProfileAppliedConfigs::sampling_percent].
22095        pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
22096            self.sampling_percent = v.into();
22097            self
22098        }
22099
22100        /// Sets the value of [row_filter_applied][crate::model::data_scan_event::DataProfileAppliedConfigs::row_filter_applied].
22101        pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22102            self.row_filter_applied = v.into();
22103            self
22104        }
22105
22106        /// Sets the value of [column_filter_applied][crate::model::data_scan_event::DataProfileAppliedConfigs::column_filter_applied].
22107        pub fn set_column_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22108            self.column_filter_applied = v.into();
22109            self
22110        }
22111    }
22112
22113    impl wkt::message::Message for DataProfileAppliedConfigs {
22114        fn typename() -> &'static str {
22115            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs"
22116        }
22117    }
22118
22119    /// Applied configs for data quality type data scan job.
22120    #[derive(Clone, Default, PartialEq)]
22121    #[non_exhaustive]
22122    pub struct DataQualityAppliedConfigs {
22123        /// The percentage of the records selected from the dataset for DataScan.
22124        ///
22125        /// * Value ranges between 0.0 and 100.0.
22126        /// * Value 0.0 or 100.0 imply that sampling was not applied.
22127        pub sampling_percent: f32,
22128
22129        /// Boolean indicating whether a row filter was applied in the DataScan job.
22130        pub row_filter_applied: bool,
22131
22132        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22133    }
22134
22135    impl DataQualityAppliedConfigs {
22136        pub fn new() -> Self {
22137            std::default::Default::default()
22138        }
22139
22140        /// Sets the value of [sampling_percent][crate::model::data_scan_event::DataQualityAppliedConfigs::sampling_percent].
22141        pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
22142            self.sampling_percent = v.into();
22143            self
22144        }
22145
22146        /// Sets the value of [row_filter_applied][crate::model::data_scan_event::DataQualityAppliedConfigs::row_filter_applied].
22147        pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22148            self.row_filter_applied = v.into();
22149            self
22150        }
22151    }
22152
22153    impl wkt::message::Message for DataQualityAppliedConfigs {
22154        fn typename() -> &'static str {
22155            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs"
22156        }
22157    }
22158
22159    /// Post scan actions result for data scan job.
22160    #[derive(Clone, Default, PartialEq)]
22161    #[non_exhaustive]
22162    pub struct PostScanActionsResult {
22163        /// The result of BigQuery export post scan action.
22164        pub bigquery_export_result: std::option::Option<
22165            crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
22166        >,
22167
22168        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22169    }
22170
22171    impl PostScanActionsResult {
22172        pub fn new() -> Self {
22173            std::default::Default::default()
22174        }
22175
22176        /// Sets the value of [bigquery_export_result][crate::model::data_scan_event::PostScanActionsResult::bigquery_export_result].
22177        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
22178        where
22179            T: std::convert::Into<
22180                    crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
22181                >,
22182        {
22183            self.bigquery_export_result = std::option::Option::Some(v.into());
22184            self
22185        }
22186
22187        /// Sets or clears the value of [bigquery_export_result][crate::model::data_scan_event::PostScanActionsResult::bigquery_export_result].
22188        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
22189        where
22190            T: std::convert::Into<
22191                    crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
22192                >,
22193        {
22194            self.bigquery_export_result = v.map(|x| x.into());
22195            self
22196        }
22197    }
22198
22199    impl wkt::message::Message for PostScanActionsResult {
22200        fn typename() -> &'static str {
22201            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult"
22202        }
22203    }
22204
22205    /// Defines additional types related to [PostScanActionsResult].
22206    pub mod post_scan_actions_result {
22207        #[allow(unused_imports)]
22208        use super::*;
22209
22210        /// The result of BigQuery export post scan action.
22211        #[derive(Clone, Default, PartialEq)]
22212        #[non_exhaustive]
22213        pub struct BigQueryExportResult {
22214
22215            /// Execution state for the BigQuery exporting.
22216            pub state: crate::model::data_scan_event::post_scan_actions_result::big_query_export_result::State,
22217
22218            /// Additional information about the BigQuery exporting.
22219            pub message: std::string::String,
22220
22221            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22222        }
22223
22224        impl BigQueryExportResult {
22225            pub fn new() -> Self {
22226                std::default::Default::default()
22227            }
22228
22229            /// Sets the value of [state][crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult::state].
22230            pub fn set_state<T: std::convert::Into<crate::model::data_scan_event::post_scan_actions_result::big_query_export_result::State>>(mut self, v: T) -> Self{
22231                self.state = v.into();
22232                self
22233            }
22234
22235            /// Sets the value of [message][crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult::message].
22236            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22237                self.message = v.into();
22238                self
22239            }
22240        }
22241
22242        impl wkt::message::Message for BigQueryExportResult {
22243            fn typename() -> &'static str {
22244                "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult"
22245            }
22246        }
22247
22248        /// Defines additional types related to [BigQueryExportResult].
22249        pub mod big_query_export_result {
22250            #[allow(unused_imports)]
22251            use super::*;
22252
22253            /// Execution state for the exporting.
22254            ///
22255            /// # Working with unknown values
22256            ///
22257            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22258            /// additional enum variants at any time. Adding new variants is not considered
22259            /// a breaking change. Applications should write their code in anticipation of:
22260            ///
22261            /// - New values appearing in future releases of the client library, **and**
22262            /// - New values received dynamically, without application changes.
22263            ///
22264            /// Please consult the [Working with enums] section in the user guide for some
22265            /// guidelines.
22266            ///
22267            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22268            #[derive(Clone, Debug, PartialEq)]
22269            #[non_exhaustive]
22270            pub enum State {
22271                /// The exporting state is unspecified.
22272                Unspecified,
22273                /// The exporting completed successfully.
22274                Succeeded,
22275                /// The exporting is no longer running due to an error.
22276                Failed,
22277                /// The exporting is skipped due to no valid scan result to export
22278                /// (usually caused by scan failed).
22279                Skipped,
22280                /// If set, the enum was initialized with an unknown value.
22281                ///
22282                /// Applications can examine the value using [State::value] or
22283                /// [State::name].
22284                UnknownValue(state::UnknownValue),
22285            }
22286
22287            #[doc(hidden)]
22288            pub mod state {
22289                #[allow(unused_imports)]
22290                use super::*;
22291                #[derive(Clone, Debug, PartialEq)]
22292                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22293            }
22294
22295            impl State {
22296                /// Gets the enum value.
22297                ///
22298                /// Returns `None` if the enum contains an unknown value deserialized from
22299                /// the string representation of enums.
22300                pub fn value(&self) -> std::option::Option<i32> {
22301                    match self {
22302                        Self::Unspecified => std::option::Option::Some(0),
22303                        Self::Succeeded => std::option::Option::Some(1),
22304                        Self::Failed => std::option::Option::Some(2),
22305                        Self::Skipped => std::option::Option::Some(3),
22306                        Self::UnknownValue(u) => u.0.value(),
22307                    }
22308                }
22309
22310                /// Gets the enum value as a string.
22311                ///
22312                /// Returns `None` if the enum contains an unknown value deserialized from
22313                /// the integer representation of enums.
22314                pub fn name(&self) -> std::option::Option<&str> {
22315                    match self {
22316                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
22317                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
22318                        Self::Failed => std::option::Option::Some("FAILED"),
22319                        Self::Skipped => std::option::Option::Some("SKIPPED"),
22320                        Self::UnknownValue(u) => u.0.name(),
22321                    }
22322                }
22323            }
22324
22325            impl std::default::Default for State {
22326                fn default() -> Self {
22327                    use std::convert::From;
22328                    Self::from(0)
22329                }
22330            }
22331
22332            impl std::fmt::Display for State {
22333                fn fmt(
22334                    &self,
22335                    f: &mut std::fmt::Formatter<'_>,
22336                ) -> std::result::Result<(), std::fmt::Error> {
22337                    wkt::internal::display_enum(f, self.name(), self.value())
22338                }
22339            }
22340
22341            impl std::convert::From<i32> for State {
22342                fn from(value: i32) -> Self {
22343                    match value {
22344                        0 => Self::Unspecified,
22345                        1 => Self::Succeeded,
22346                        2 => Self::Failed,
22347                        3 => Self::Skipped,
22348                        _ => Self::UnknownValue(state::UnknownValue(
22349                            wkt::internal::UnknownEnumValue::Integer(value),
22350                        )),
22351                    }
22352                }
22353            }
22354
22355            impl std::convert::From<&str> for State {
22356                fn from(value: &str) -> Self {
22357                    use std::string::ToString;
22358                    match value {
22359                        "STATE_UNSPECIFIED" => Self::Unspecified,
22360                        "SUCCEEDED" => Self::Succeeded,
22361                        "FAILED" => Self::Failed,
22362                        "SKIPPED" => Self::Skipped,
22363                        _ => Self::UnknownValue(state::UnknownValue(
22364                            wkt::internal::UnknownEnumValue::String(value.to_string()),
22365                        )),
22366                    }
22367                }
22368            }
22369
22370            impl serde::ser::Serialize for State {
22371                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22372                where
22373                    S: serde::Serializer,
22374                {
22375                    match self {
22376                        Self::Unspecified => serializer.serialize_i32(0),
22377                        Self::Succeeded => serializer.serialize_i32(1),
22378                        Self::Failed => serializer.serialize_i32(2),
22379                        Self::Skipped => serializer.serialize_i32(3),
22380                        Self::UnknownValue(u) => u.0.serialize(serializer),
22381                    }
22382                }
22383            }
22384
22385            impl<'de> serde::de::Deserialize<'de> for State {
22386                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22387                where
22388                    D: serde::Deserializer<'de>,
22389                {
22390                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
22391                        ".google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State"))
22392                }
22393            }
22394        }
22395    }
22396
22397    /// The type of the data scan.
22398    ///
22399    /// # Working with unknown values
22400    ///
22401    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22402    /// additional enum variants at any time. Adding new variants is not considered
22403    /// a breaking change. Applications should write their code in anticipation of:
22404    ///
22405    /// - New values appearing in future releases of the client library, **and**
22406    /// - New values received dynamically, without application changes.
22407    ///
22408    /// Please consult the [Working with enums] section in the user guide for some
22409    /// guidelines.
22410    ///
22411    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22412    #[derive(Clone, Debug, PartialEq)]
22413    #[non_exhaustive]
22414    pub enum ScanType {
22415        /// An unspecified data scan type.
22416        Unspecified,
22417        /// Data scan for data profile.
22418        DataProfile,
22419        /// Data scan for data quality.
22420        DataQuality,
22421        /// Data scan for data discovery.
22422        DataDiscovery,
22423        /// If set, the enum was initialized with an unknown value.
22424        ///
22425        /// Applications can examine the value using [ScanType::value] or
22426        /// [ScanType::name].
22427        UnknownValue(scan_type::UnknownValue),
22428    }
22429
22430    #[doc(hidden)]
22431    pub mod scan_type {
22432        #[allow(unused_imports)]
22433        use super::*;
22434        #[derive(Clone, Debug, PartialEq)]
22435        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22436    }
22437
22438    impl ScanType {
22439        /// Gets the enum value.
22440        ///
22441        /// Returns `None` if the enum contains an unknown value deserialized from
22442        /// the string representation of enums.
22443        pub fn value(&self) -> std::option::Option<i32> {
22444            match self {
22445                Self::Unspecified => std::option::Option::Some(0),
22446                Self::DataProfile => std::option::Option::Some(1),
22447                Self::DataQuality => std::option::Option::Some(2),
22448                Self::DataDiscovery => std::option::Option::Some(4),
22449                Self::UnknownValue(u) => u.0.value(),
22450            }
22451        }
22452
22453        /// Gets the enum value as a string.
22454        ///
22455        /// Returns `None` if the enum contains an unknown value deserialized from
22456        /// the integer representation of enums.
22457        pub fn name(&self) -> std::option::Option<&str> {
22458            match self {
22459                Self::Unspecified => std::option::Option::Some("SCAN_TYPE_UNSPECIFIED"),
22460                Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
22461                Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
22462                Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
22463                Self::UnknownValue(u) => u.0.name(),
22464            }
22465        }
22466    }
22467
22468    impl std::default::Default for ScanType {
22469        fn default() -> Self {
22470            use std::convert::From;
22471            Self::from(0)
22472        }
22473    }
22474
22475    impl std::fmt::Display for ScanType {
22476        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22477            wkt::internal::display_enum(f, self.name(), self.value())
22478        }
22479    }
22480
22481    impl std::convert::From<i32> for ScanType {
22482        fn from(value: i32) -> Self {
22483            match value {
22484                0 => Self::Unspecified,
22485                1 => Self::DataProfile,
22486                2 => Self::DataQuality,
22487                4 => Self::DataDiscovery,
22488                _ => Self::UnknownValue(scan_type::UnknownValue(
22489                    wkt::internal::UnknownEnumValue::Integer(value),
22490                )),
22491            }
22492        }
22493    }
22494
22495    impl std::convert::From<&str> for ScanType {
22496        fn from(value: &str) -> Self {
22497            use std::string::ToString;
22498            match value {
22499                "SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
22500                "DATA_PROFILE" => Self::DataProfile,
22501                "DATA_QUALITY" => Self::DataQuality,
22502                "DATA_DISCOVERY" => Self::DataDiscovery,
22503                _ => Self::UnknownValue(scan_type::UnknownValue(
22504                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22505                )),
22506            }
22507        }
22508    }
22509
22510    impl serde::ser::Serialize for ScanType {
22511        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22512        where
22513            S: serde::Serializer,
22514        {
22515            match self {
22516                Self::Unspecified => serializer.serialize_i32(0),
22517                Self::DataProfile => serializer.serialize_i32(1),
22518                Self::DataQuality => serializer.serialize_i32(2),
22519                Self::DataDiscovery => serializer.serialize_i32(4),
22520                Self::UnknownValue(u) => u.0.serialize(serializer),
22521            }
22522        }
22523    }
22524
22525    impl<'de> serde::de::Deserialize<'de> for ScanType {
22526        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22527        where
22528            D: serde::Deserializer<'de>,
22529        {
22530            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ScanType>::new(
22531                ".google.cloud.dataplex.v1.DataScanEvent.ScanType",
22532            ))
22533        }
22534    }
22535
22536    /// The job state of the data scan.
22537    ///
22538    /// # Working with unknown values
22539    ///
22540    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22541    /// additional enum variants at any time. Adding new variants is not considered
22542    /// a breaking change. Applications should write their code in anticipation of:
22543    ///
22544    /// - New values appearing in future releases of the client library, **and**
22545    /// - New values received dynamically, without application changes.
22546    ///
22547    /// Please consult the [Working with enums] section in the user guide for some
22548    /// guidelines.
22549    ///
22550    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22551    #[derive(Clone, Debug, PartialEq)]
22552    #[non_exhaustive]
22553    pub enum State {
22554        /// Unspecified job state.
22555        Unspecified,
22556        /// Data scan job started.
22557        Started,
22558        /// Data scan job successfully completed.
22559        Succeeded,
22560        /// Data scan job was unsuccessful.
22561        Failed,
22562        /// Data scan job was cancelled.
22563        Cancelled,
22564        /// Data scan job was created.
22565        Created,
22566        /// If set, the enum was initialized with an unknown value.
22567        ///
22568        /// Applications can examine the value using [State::value] or
22569        /// [State::name].
22570        UnknownValue(state::UnknownValue),
22571    }
22572
22573    #[doc(hidden)]
22574    pub mod state {
22575        #[allow(unused_imports)]
22576        use super::*;
22577        #[derive(Clone, Debug, PartialEq)]
22578        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22579    }
22580
22581    impl State {
22582        /// Gets the enum value.
22583        ///
22584        /// Returns `None` if the enum contains an unknown value deserialized from
22585        /// the string representation of enums.
22586        pub fn value(&self) -> std::option::Option<i32> {
22587            match self {
22588                Self::Unspecified => std::option::Option::Some(0),
22589                Self::Started => std::option::Option::Some(1),
22590                Self::Succeeded => std::option::Option::Some(2),
22591                Self::Failed => std::option::Option::Some(3),
22592                Self::Cancelled => std::option::Option::Some(4),
22593                Self::Created => std::option::Option::Some(5),
22594                Self::UnknownValue(u) => u.0.value(),
22595            }
22596        }
22597
22598        /// Gets the enum value as a string.
22599        ///
22600        /// Returns `None` if the enum contains an unknown value deserialized from
22601        /// the integer representation of enums.
22602        pub fn name(&self) -> std::option::Option<&str> {
22603            match self {
22604                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
22605                Self::Started => std::option::Option::Some("STARTED"),
22606                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
22607                Self::Failed => std::option::Option::Some("FAILED"),
22608                Self::Cancelled => std::option::Option::Some("CANCELLED"),
22609                Self::Created => std::option::Option::Some("CREATED"),
22610                Self::UnknownValue(u) => u.0.name(),
22611            }
22612        }
22613    }
22614
22615    impl std::default::Default for State {
22616        fn default() -> Self {
22617            use std::convert::From;
22618            Self::from(0)
22619        }
22620    }
22621
22622    impl std::fmt::Display for State {
22623        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22624            wkt::internal::display_enum(f, self.name(), self.value())
22625        }
22626    }
22627
22628    impl std::convert::From<i32> for State {
22629        fn from(value: i32) -> Self {
22630            match value {
22631                0 => Self::Unspecified,
22632                1 => Self::Started,
22633                2 => Self::Succeeded,
22634                3 => Self::Failed,
22635                4 => Self::Cancelled,
22636                5 => Self::Created,
22637                _ => Self::UnknownValue(state::UnknownValue(
22638                    wkt::internal::UnknownEnumValue::Integer(value),
22639                )),
22640            }
22641        }
22642    }
22643
22644    impl std::convert::From<&str> for State {
22645        fn from(value: &str) -> Self {
22646            use std::string::ToString;
22647            match value {
22648                "STATE_UNSPECIFIED" => Self::Unspecified,
22649                "STARTED" => Self::Started,
22650                "SUCCEEDED" => Self::Succeeded,
22651                "FAILED" => Self::Failed,
22652                "CANCELLED" => Self::Cancelled,
22653                "CREATED" => Self::Created,
22654                _ => Self::UnknownValue(state::UnknownValue(
22655                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22656                )),
22657            }
22658        }
22659    }
22660
22661    impl serde::ser::Serialize for State {
22662        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22663        where
22664            S: serde::Serializer,
22665        {
22666            match self {
22667                Self::Unspecified => serializer.serialize_i32(0),
22668                Self::Started => serializer.serialize_i32(1),
22669                Self::Succeeded => serializer.serialize_i32(2),
22670                Self::Failed => serializer.serialize_i32(3),
22671                Self::Cancelled => serializer.serialize_i32(4),
22672                Self::Created => serializer.serialize_i32(5),
22673                Self::UnknownValue(u) => u.0.serialize(serializer),
22674            }
22675        }
22676    }
22677
22678    impl<'de> serde::de::Deserialize<'de> for State {
22679        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22680        where
22681            D: serde::Deserializer<'de>,
22682        {
22683            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
22684                ".google.cloud.dataplex.v1.DataScanEvent.State",
22685            ))
22686        }
22687    }
22688
22689    /// The trigger type for the data scan.
22690    ///
22691    /// # Working with unknown values
22692    ///
22693    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22694    /// additional enum variants at any time. Adding new variants is not considered
22695    /// a breaking change. Applications should write their code in anticipation of:
22696    ///
22697    /// - New values appearing in future releases of the client library, **and**
22698    /// - New values received dynamically, without application changes.
22699    ///
22700    /// Please consult the [Working with enums] section in the user guide for some
22701    /// guidelines.
22702    ///
22703    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22704    #[derive(Clone, Debug, PartialEq)]
22705    #[non_exhaustive]
22706    pub enum Trigger {
22707        /// An unspecified trigger type.
22708        Unspecified,
22709        /// Data scan triggers on demand.
22710        OnDemand,
22711        /// Data scan triggers as per schedule.
22712        Schedule,
22713        /// If set, the enum was initialized with an unknown value.
22714        ///
22715        /// Applications can examine the value using [Trigger::value] or
22716        /// [Trigger::name].
22717        UnknownValue(trigger::UnknownValue),
22718    }
22719
22720    #[doc(hidden)]
22721    pub mod trigger {
22722        #[allow(unused_imports)]
22723        use super::*;
22724        #[derive(Clone, Debug, PartialEq)]
22725        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22726    }
22727
22728    impl Trigger {
22729        /// Gets the enum value.
22730        ///
22731        /// Returns `None` if the enum contains an unknown value deserialized from
22732        /// the string representation of enums.
22733        pub fn value(&self) -> std::option::Option<i32> {
22734            match self {
22735                Self::Unspecified => std::option::Option::Some(0),
22736                Self::OnDemand => std::option::Option::Some(1),
22737                Self::Schedule => std::option::Option::Some(2),
22738                Self::UnknownValue(u) => u.0.value(),
22739            }
22740        }
22741
22742        /// Gets the enum value as a string.
22743        ///
22744        /// Returns `None` if the enum contains an unknown value deserialized from
22745        /// the integer representation of enums.
22746        pub fn name(&self) -> std::option::Option<&str> {
22747            match self {
22748                Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
22749                Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
22750                Self::Schedule => std::option::Option::Some("SCHEDULE"),
22751                Self::UnknownValue(u) => u.0.name(),
22752            }
22753        }
22754    }
22755
22756    impl std::default::Default for Trigger {
22757        fn default() -> Self {
22758            use std::convert::From;
22759            Self::from(0)
22760        }
22761    }
22762
22763    impl std::fmt::Display for Trigger {
22764        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22765            wkt::internal::display_enum(f, self.name(), self.value())
22766        }
22767    }
22768
22769    impl std::convert::From<i32> for Trigger {
22770        fn from(value: i32) -> Self {
22771            match value {
22772                0 => Self::Unspecified,
22773                1 => Self::OnDemand,
22774                2 => Self::Schedule,
22775                _ => Self::UnknownValue(trigger::UnknownValue(
22776                    wkt::internal::UnknownEnumValue::Integer(value),
22777                )),
22778            }
22779        }
22780    }
22781
22782    impl std::convert::From<&str> for Trigger {
22783        fn from(value: &str) -> Self {
22784            use std::string::ToString;
22785            match value {
22786                "TRIGGER_UNSPECIFIED" => Self::Unspecified,
22787                "ON_DEMAND" => Self::OnDemand,
22788                "SCHEDULE" => Self::Schedule,
22789                _ => Self::UnknownValue(trigger::UnknownValue(
22790                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22791                )),
22792            }
22793        }
22794    }
22795
22796    impl serde::ser::Serialize for Trigger {
22797        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22798        where
22799            S: serde::Serializer,
22800        {
22801            match self {
22802                Self::Unspecified => serializer.serialize_i32(0),
22803                Self::OnDemand => serializer.serialize_i32(1),
22804                Self::Schedule => serializer.serialize_i32(2),
22805                Self::UnknownValue(u) => u.0.serialize(serializer),
22806            }
22807        }
22808    }
22809
22810    impl<'de> serde::de::Deserialize<'de> for Trigger {
22811        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22812        where
22813            D: serde::Deserializer<'de>,
22814        {
22815            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
22816                ".google.cloud.dataplex.v1.DataScanEvent.Trigger",
22817            ))
22818        }
22819    }
22820
22821    /// The scope of job for the data scan.
22822    ///
22823    /// # Working with unknown values
22824    ///
22825    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22826    /// additional enum variants at any time. Adding new variants is not considered
22827    /// a breaking change. Applications should write their code in anticipation of:
22828    ///
22829    /// - New values appearing in future releases of the client library, **and**
22830    /// - New values received dynamically, without application changes.
22831    ///
22832    /// Please consult the [Working with enums] section in the user guide for some
22833    /// guidelines.
22834    ///
22835    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22836    #[derive(Clone, Debug, PartialEq)]
22837    #[non_exhaustive]
22838    pub enum Scope {
22839        /// An unspecified scope type.
22840        Unspecified,
22841        /// Data scan runs on all of the data.
22842        Full,
22843        /// Data scan runs on incremental data.
22844        Incremental,
22845        /// If set, the enum was initialized with an unknown value.
22846        ///
22847        /// Applications can examine the value using [Scope::value] or
22848        /// [Scope::name].
22849        UnknownValue(scope::UnknownValue),
22850    }
22851
22852    #[doc(hidden)]
22853    pub mod scope {
22854        #[allow(unused_imports)]
22855        use super::*;
22856        #[derive(Clone, Debug, PartialEq)]
22857        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22858    }
22859
22860    impl Scope {
22861        /// Gets the enum value.
22862        ///
22863        /// Returns `None` if the enum contains an unknown value deserialized from
22864        /// the string representation of enums.
22865        pub fn value(&self) -> std::option::Option<i32> {
22866            match self {
22867                Self::Unspecified => std::option::Option::Some(0),
22868                Self::Full => std::option::Option::Some(1),
22869                Self::Incremental => std::option::Option::Some(2),
22870                Self::UnknownValue(u) => u.0.value(),
22871            }
22872        }
22873
22874        /// Gets the enum value as a string.
22875        ///
22876        /// Returns `None` if the enum contains an unknown value deserialized from
22877        /// the integer representation of enums.
22878        pub fn name(&self) -> std::option::Option<&str> {
22879            match self {
22880                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
22881                Self::Full => std::option::Option::Some("FULL"),
22882                Self::Incremental => std::option::Option::Some("INCREMENTAL"),
22883                Self::UnknownValue(u) => u.0.name(),
22884            }
22885        }
22886    }
22887
22888    impl std::default::Default for Scope {
22889        fn default() -> Self {
22890            use std::convert::From;
22891            Self::from(0)
22892        }
22893    }
22894
22895    impl std::fmt::Display for Scope {
22896        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22897            wkt::internal::display_enum(f, self.name(), self.value())
22898        }
22899    }
22900
22901    impl std::convert::From<i32> for Scope {
22902        fn from(value: i32) -> Self {
22903            match value {
22904                0 => Self::Unspecified,
22905                1 => Self::Full,
22906                2 => Self::Incremental,
22907                _ => Self::UnknownValue(scope::UnknownValue(
22908                    wkt::internal::UnknownEnumValue::Integer(value),
22909                )),
22910            }
22911        }
22912    }
22913
22914    impl std::convert::From<&str> for Scope {
22915        fn from(value: &str) -> Self {
22916            use std::string::ToString;
22917            match value {
22918                "SCOPE_UNSPECIFIED" => Self::Unspecified,
22919                "FULL" => Self::Full,
22920                "INCREMENTAL" => Self::Incremental,
22921                _ => Self::UnknownValue(scope::UnknownValue(
22922                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22923                )),
22924            }
22925        }
22926    }
22927
22928    impl serde::ser::Serialize for Scope {
22929        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22930        where
22931            S: serde::Serializer,
22932        {
22933            match self {
22934                Self::Unspecified => serializer.serialize_i32(0),
22935                Self::Full => serializer.serialize_i32(1),
22936                Self::Incremental => serializer.serialize_i32(2),
22937                Self::UnknownValue(u) => u.0.serialize(serializer),
22938            }
22939        }
22940    }
22941
22942    impl<'de> serde::de::Deserialize<'de> for Scope {
22943        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22944        where
22945            D: serde::Deserializer<'de>,
22946        {
22947            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
22948                ".google.cloud.dataplex.v1.DataScanEvent.Scope",
22949            ))
22950        }
22951    }
22952
22953    /// The result of the data scan job.
22954    #[derive(Clone, Debug, PartialEq)]
22955    #[non_exhaustive]
22956    pub enum Result {
22957        /// Data profile result for data profile type data scan.
22958        DataProfile(std::boxed::Box<crate::model::data_scan_event::DataProfileResult>),
22959        /// Data quality result for data quality type data scan.
22960        DataQuality(std::boxed::Box<crate::model::data_scan_event::DataQualityResult>),
22961    }
22962
22963    /// The applied configs in the data scan job.
22964    #[derive(Clone, Debug, PartialEq)]
22965    #[non_exhaustive]
22966    pub enum AppliedConfigs {
22967        /// Applied configs for data profile type data scan.
22968        DataProfileConfigs(
22969            std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
22970        ),
22971        /// Applied configs for data quality type data scan.
22972        DataQualityConfigs(
22973            std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
22974        ),
22975    }
22976}
22977
22978/// Information about the result of a data quality rule for data quality scan.
22979/// The monitored resource is 'DataScan'.
22980#[derive(Clone, Default, PartialEq)]
22981#[non_exhaustive]
22982pub struct DataQualityScanRuleResult {
22983    /// Identifier of the specific data scan job this log entry is for.
22984    pub job_id: std::string::String,
22985
22986    /// The data source of the data scan (e.g. BigQuery table name).
22987    pub data_source: std::string::String,
22988
22989    /// The column which this rule is evaluated against.
22990    pub column: std::string::String,
22991
22992    /// The name of the data quality rule.
22993    pub rule_name: std::string::String,
22994
22995    /// The type of the data quality rule.
22996    pub rule_type: crate::model::data_quality_scan_rule_result::RuleType,
22997
22998    /// The evaluation type of the data quality rule.
22999    pub evalution_type: crate::model::data_quality_scan_rule_result::EvaluationType,
23000
23001    /// The dimension of the data quality rule.
23002    pub rule_dimension: std::string::String,
23003
23004    /// The passing threshold ([0.0, 100.0]) of the data quality rule.
23005    pub threshold_percent: f64,
23006
23007    /// The result of the data quality rule.
23008    pub result: crate::model::data_quality_scan_rule_result::Result,
23009
23010    /// The number of rows evaluated against the data quality rule.
23011    /// This field is only valid for rules of PER_ROW evaluation type.
23012    pub evaluated_row_count: i64,
23013
23014    /// The number of rows which passed a rule evaluation.
23015    /// This field is only valid for rules of PER_ROW evaluation type.
23016    pub passed_row_count: i64,
23017
23018    /// The number of rows with null values in the specified column.
23019    pub null_row_count: i64,
23020
23021    /// The number of rows returned by the SQL statement in a SQL assertion rule.
23022    /// This field is only valid for SQL assertion rules.
23023    pub assertion_row_count: i64,
23024
23025    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23026}
23027
23028impl DataQualityScanRuleResult {
23029    pub fn new() -> Self {
23030        std::default::Default::default()
23031    }
23032
23033    /// Sets the value of [job_id][crate::model::DataQualityScanRuleResult::job_id].
23034    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23035        self.job_id = v.into();
23036        self
23037    }
23038
23039    /// Sets the value of [data_source][crate::model::DataQualityScanRuleResult::data_source].
23040    pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23041        self.data_source = v.into();
23042        self
23043    }
23044
23045    /// Sets the value of [column][crate::model::DataQualityScanRuleResult::column].
23046    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23047        self.column = v.into();
23048        self
23049    }
23050
23051    /// Sets the value of [rule_name][crate::model::DataQualityScanRuleResult::rule_name].
23052    pub fn set_rule_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23053        self.rule_name = v.into();
23054        self
23055    }
23056
23057    /// Sets the value of [rule_type][crate::model::DataQualityScanRuleResult::rule_type].
23058    pub fn set_rule_type<
23059        T: std::convert::Into<crate::model::data_quality_scan_rule_result::RuleType>,
23060    >(
23061        mut self,
23062        v: T,
23063    ) -> Self {
23064        self.rule_type = v.into();
23065        self
23066    }
23067
23068    /// Sets the value of [evalution_type][crate::model::DataQualityScanRuleResult::evalution_type].
23069    pub fn set_evalution_type<
23070        T: std::convert::Into<crate::model::data_quality_scan_rule_result::EvaluationType>,
23071    >(
23072        mut self,
23073        v: T,
23074    ) -> Self {
23075        self.evalution_type = v.into();
23076        self
23077    }
23078
23079    /// Sets the value of [rule_dimension][crate::model::DataQualityScanRuleResult::rule_dimension].
23080    pub fn set_rule_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23081        self.rule_dimension = v.into();
23082        self
23083    }
23084
23085    /// Sets the value of [threshold_percent][crate::model::DataQualityScanRuleResult::threshold_percent].
23086    pub fn set_threshold_percent<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
23087        self.threshold_percent = v.into();
23088        self
23089    }
23090
23091    /// Sets the value of [result][crate::model::DataQualityScanRuleResult::result].
23092    pub fn set_result<
23093        T: std::convert::Into<crate::model::data_quality_scan_rule_result::Result>,
23094    >(
23095        mut self,
23096        v: T,
23097    ) -> Self {
23098        self.result = v.into();
23099        self
23100    }
23101
23102    /// Sets the value of [evaluated_row_count][crate::model::DataQualityScanRuleResult::evaluated_row_count].
23103    pub fn set_evaluated_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23104        self.evaluated_row_count = v.into();
23105        self
23106    }
23107
23108    /// Sets the value of [passed_row_count][crate::model::DataQualityScanRuleResult::passed_row_count].
23109    pub fn set_passed_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23110        self.passed_row_count = v.into();
23111        self
23112    }
23113
23114    /// Sets the value of [null_row_count][crate::model::DataQualityScanRuleResult::null_row_count].
23115    pub fn set_null_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23116        self.null_row_count = v.into();
23117        self
23118    }
23119
23120    /// Sets the value of [assertion_row_count][crate::model::DataQualityScanRuleResult::assertion_row_count].
23121    pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23122        self.assertion_row_count = v.into();
23123        self
23124    }
23125}
23126
23127impl wkt::message::Message for DataQualityScanRuleResult {
23128    fn typename() -> &'static str {
23129        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityScanRuleResult"
23130    }
23131}
23132
23133/// Defines additional types related to [DataQualityScanRuleResult].
23134pub mod data_quality_scan_rule_result {
23135    #[allow(unused_imports)]
23136    use super::*;
23137
23138    /// The type of the data quality rule.
23139    ///
23140    /// # Working with unknown values
23141    ///
23142    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23143    /// additional enum variants at any time. Adding new variants is not considered
23144    /// a breaking change. Applications should write their code in anticipation of:
23145    ///
23146    /// - New values appearing in future releases of the client library, **and**
23147    /// - New values received dynamically, without application changes.
23148    ///
23149    /// Please consult the [Working with enums] section in the user guide for some
23150    /// guidelines.
23151    ///
23152    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23153    #[derive(Clone, Debug, PartialEq)]
23154    #[non_exhaustive]
23155    pub enum RuleType {
23156        /// An unspecified rule type.
23157        Unspecified,
23158        /// See
23159        /// [DataQualityRule.NonNullExpectation][google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation].
23160        ///
23161        /// [google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation]: crate::model::data_quality_rule::NonNullExpectation
23162        NonNullExpectation,
23163        /// See
23164        /// [DataQualityRule.RangeExpectation][google.cloud.dataplex.v1.DataQualityRule.RangeExpectation].
23165        ///
23166        /// [google.cloud.dataplex.v1.DataQualityRule.RangeExpectation]: crate::model::data_quality_rule::RangeExpectation
23167        RangeExpectation,
23168        /// See
23169        /// [DataQualityRule.RegexExpectation][google.cloud.dataplex.v1.DataQualityRule.RegexExpectation].
23170        ///
23171        /// [google.cloud.dataplex.v1.DataQualityRule.RegexExpectation]: crate::model::data_quality_rule::RegexExpectation
23172        RegexExpectation,
23173        /// See
23174        /// [DataQualityRule.RowConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation].
23175        ///
23176        /// [google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation]: crate::model::data_quality_rule::RowConditionExpectation
23177        RowConditionExpectation,
23178        /// See
23179        /// [DataQualityRule.SetExpectation][google.cloud.dataplex.v1.DataQualityRule.SetExpectation].
23180        ///
23181        /// [google.cloud.dataplex.v1.DataQualityRule.SetExpectation]: crate::model::data_quality_rule::SetExpectation
23182        SetExpectation,
23183        /// See
23184        /// [DataQualityRule.StatisticRangeExpectation][google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation].
23185        ///
23186        /// [google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation]: crate::model::data_quality_rule::StatisticRangeExpectation
23187        StatisticRangeExpectation,
23188        /// See
23189        /// [DataQualityRule.TableConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation].
23190        ///
23191        /// [google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation]: crate::model::data_quality_rule::TableConditionExpectation
23192        TableConditionExpectation,
23193        /// See
23194        /// [DataQualityRule.UniquenessExpectation][google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation].
23195        ///
23196        /// [google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation]: crate::model::data_quality_rule::UniquenessExpectation
23197        UniquenessExpectation,
23198        /// See
23199        /// [DataQualityRule.SqlAssertion][google.cloud.dataplex.v1.DataQualityRule.SqlAssertion].
23200        ///
23201        /// [google.cloud.dataplex.v1.DataQualityRule.SqlAssertion]: crate::model::data_quality_rule::SqlAssertion
23202        SqlAssertion,
23203        /// If set, the enum was initialized with an unknown value.
23204        ///
23205        /// Applications can examine the value using [RuleType::value] or
23206        /// [RuleType::name].
23207        UnknownValue(rule_type::UnknownValue),
23208    }
23209
23210    #[doc(hidden)]
23211    pub mod rule_type {
23212        #[allow(unused_imports)]
23213        use super::*;
23214        #[derive(Clone, Debug, PartialEq)]
23215        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23216    }
23217
23218    impl RuleType {
23219        /// Gets the enum value.
23220        ///
23221        /// Returns `None` if the enum contains an unknown value deserialized from
23222        /// the string representation of enums.
23223        pub fn value(&self) -> std::option::Option<i32> {
23224            match self {
23225                Self::Unspecified => std::option::Option::Some(0),
23226                Self::NonNullExpectation => std::option::Option::Some(1),
23227                Self::RangeExpectation => std::option::Option::Some(2),
23228                Self::RegexExpectation => std::option::Option::Some(3),
23229                Self::RowConditionExpectation => std::option::Option::Some(4),
23230                Self::SetExpectation => std::option::Option::Some(5),
23231                Self::StatisticRangeExpectation => std::option::Option::Some(6),
23232                Self::TableConditionExpectation => std::option::Option::Some(7),
23233                Self::UniquenessExpectation => std::option::Option::Some(8),
23234                Self::SqlAssertion => std::option::Option::Some(9),
23235                Self::UnknownValue(u) => u.0.value(),
23236            }
23237        }
23238
23239        /// Gets the enum value as a string.
23240        ///
23241        /// Returns `None` if the enum contains an unknown value deserialized from
23242        /// the integer representation of enums.
23243        pub fn name(&self) -> std::option::Option<&str> {
23244            match self {
23245                Self::Unspecified => std::option::Option::Some("RULE_TYPE_UNSPECIFIED"),
23246                Self::NonNullExpectation => std::option::Option::Some("NON_NULL_EXPECTATION"),
23247                Self::RangeExpectation => std::option::Option::Some("RANGE_EXPECTATION"),
23248                Self::RegexExpectation => std::option::Option::Some("REGEX_EXPECTATION"),
23249                Self::RowConditionExpectation => {
23250                    std::option::Option::Some("ROW_CONDITION_EXPECTATION")
23251                }
23252                Self::SetExpectation => std::option::Option::Some("SET_EXPECTATION"),
23253                Self::StatisticRangeExpectation => {
23254                    std::option::Option::Some("STATISTIC_RANGE_EXPECTATION")
23255                }
23256                Self::TableConditionExpectation => {
23257                    std::option::Option::Some("TABLE_CONDITION_EXPECTATION")
23258                }
23259                Self::UniquenessExpectation => std::option::Option::Some("UNIQUENESS_EXPECTATION"),
23260                Self::SqlAssertion => std::option::Option::Some("SQL_ASSERTION"),
23261                Self::UnknownValue(u) => u.0.name(),
23262            }
23263        }
23264    }
23265
23266    impl std::default::Default for RuleType {
23267        fn default() -> Self {
23268            use std::convert::From;
23269            Self::from(0)
23270        }
23271    }
23272
23273    impl std::fmt::Display for RuleType {
23274        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23275            wkt::internal::display_enum(f, self.name(), self.value())
23276        }
23277    }
23278
23279    impl std::convert::From<i32> for RuleType {
23280        fn from(value: i32) -> Self {
23281            match value {
23282                0 => Self::Unspecified,
23283                1 => Self::NonNullExpectation,
23284                2 => Self::RangeExpectation,
23285                3 => Self::RegexExpectation,
23286                4 => Self::RowConditionExpectation,
23287                5 => Self::SetExpectation,
23288                6 => Self::StatisticRangeExpectation,
23289                7 => Self::TableConditionExpectation,
23290                8 => Self::UniquenessExpectation,
23291                9 => Self::SqlAssertion,
23292                _ => Self::UnknownValue(rule_type::UnknownValue(
23293                    wkt::internal::UnknownEnumValue::Integer(value),
23294                )),
23295            }
23296        }
23297    }
23298
23299    impl std::convert::From<&str> for RuleType {
23300        fn from(value: &str) -> Self {
23301            use std::string::ToString;
23302            match value {
23303                "RULE_TYPE_UNSPECIFIED" => Self::Unspecified,
23304                "NON_NULL_EXPECTATION" => Self::NonNullExpectation,
23305                "RANGE_EXPECTATION" => Self::RangeExpectation,
23306                "REGEX_EXPECTATION" => Self::RegexExpectation,
23307                "ROW_CONDITION_EXPECTATION" => Self::RowConditionExpectation,
23308                "SET_EXPECTATION" => Self::SetExpectation,
23309                "STATISTIC_RANGE_EXPECTATION" => Self::StatisticRangeExpectation,
23310                "TABLE_CONDITION_EXPECTATION" => Self::TableConditionExpectation,
23311                "UNIQUENESS_EXPECTATION" => Self::UniquenessExpectation,
23312                "SQL_ASSERTION" => Self::SqlAssertion,
23313                _ => Self::UnknownValue(rule_type::UnknownValue(
23314                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23315                )),
23316            }
23317        }
23318    }
23319
23320    impl serde::ser::Serialize for RuleType {
23321        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23322        where
23323            S: serde::Serializer,
23324        {
23325            match self {
23326                Self::Unspecified => serializer.serialize_i32(0),
23327                Self::NonNullExpectation => serializer.serialize_i32(1),
23328                Self::RangeExpectation => serializer.serialize_i32(2),
23329                Self::RegexExpectation => serializer.serialize_i32(3),
23330                Self::RowConditionExpectation => serializer.serialize_i32(4),
23331                Self::SetExpectation => serializer.serialize_i32(5),
23332                Self::StatisticRangeExpectation => serializer.serialize_i32(6),
23333                Self::TableConditionExpectation => serializer.serialize_i32(7),
23334                Self::UniquenessExpectation => serializer.serialize_i32(8),
23335                Self::SqlAssertion => serializer.serialize_i32(9),
23336                Self::UnknownValue(u) => u.0.serialize(serializer),
23337            }
23338        }
23339    }
23340
23341    impl<'de> serde::de::Deserialize<'de> for RuleType {
23342        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23343        where
23344            D: serde::Deserializer<'de>,
23345        {
23346            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleType>::new(
23347                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType",
23348            ))
23349        }
23350    }
23351
23352    /// The evaluation type of the data quality rule.
23353    ///
23354    /// # Working with unknown values
23355    ///
23356    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23357    /// additional enum variants at any time. Adding new variants is not considered
23358    /// a breaking change. Applications should write their code in anticipation of:
23359    ///
23360    /// - New values appearing in future releases of the client library, **and**
23361    /// - New values received dynamically, without application changes.
23362    ///
23363    /// Please consult the [Working with enums] section in the user guide for some
23364    /// guidelines.
23365    ///
23366    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23367    #[derive(Clone, Debug, PartialEq)]
23368    #[non_exhaustive]
23369    pub enum EvaluationType {
23370        /// An unspecified evaluation type.
23371        Unspecified,
23372        /// The rule evaluation is done at per row level.
23373        PerRow,
23374        /// The rule evaluation is done for an aggregate of rows.
23375        Aggregate,
23376        /// If set, the enum was initialized with an unknown value.
23377        ///
23378        /// Applications can examine the value using [EvaluationType::value] or
23379        /// [EvaluationType::name].
23380        UnknownValue(evaluation_type::UnknownValue),
23381    }
23382
23383    #[doc(hidden)]
23384    pub mod evaluation_type {
23385        #[allow(unused_imports)]
23386        use super::*;
23387        #[derive(Clone, Debug, PartialEq)]
23388        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23389    }
23390
23391    impl EvaluationType {
23392        /// Gets the enum value.
23393        ///
23394        /// Returns `None` if the enum contains an unknown value deserialized from
23395        /// the string representation of enums.
23396        pub fn value(&self) -> std::option::Option<i32> {
23397            match self {
23398                Self::Unspecified => std::option::Option::Some(0),
23399                Self::PerRow => std::option::Option::Some(1),
23400                Self::Aggregate => std::option::Option::Some(2),
23401                Self::UnknownValue(u) => u.0.value(),
23402            }
23403        }
23404
23405        /// Gets the enum value as a string.
23406        ///
23407        /// Returns `None` if the enum contains an unknown value deserialized from
23408        /// the integer representation of enums.
23409        pub fn name(&self) -> std::option::Option<&str> {
23410            match self {
23411                Self::Unspecified => std::option::Option::Some("EVALUATION_TYPE_UNSPECIFIED"),
23412                Self::PerRow => std::option::Option::Some("PER_ROW"),
23413                Self::Aggregate => std::option::Option::Some("AGGREGATE"),
23414                Self::UnknownValue(u) => u.0.name(),
23415            }
23416        }
23417    }
23418
23419    impl std::default::Default for EvaluationType {
23420        fn default() -> Self {
23421            use std::convert::From;
23422            Self::from(0)
23423        }
23424    }
23425
23426    impl std::fmt::Display for EvaluationType {
23427        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23428            wkt::internal::display_enum(f, self.name(), self.value())
23429        }
23430    }
23431
23432    impl std::convert::From<i32> for EvaluationType {
23433        fn from(value: i32) -> Self {
23434            match value {
23435                0 => Self::Unspecified,
23436                1 => Self::PerRow,
23437                2 => Self::Aggregate,
23438                _ => Self::UnknownValue(evaluation_type::UnknownValue(
23439                    wkt::internal::UnknownEnumValue::Integer(value),
23440                )),
23441            }
23442        }
23443    }
23444
23445    impl std::convert::From<&str> for EvaluationType {
23446        fn from(value: &str) -> Self {
23447            use std::string::ToString;
23448            match value {
23449                "EVALUATION_TYPE_UNSPECIFIED" => Self::Unspecified,
23450                "PER_ROW" => Self::PerRow,
23451                "AGGREGATE" => Self::Aggregate,
23452                _ => Self::UnknownValue(evaluation_type::UnknownValue(
23453                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23454                )),
23455            }
23456        }
23457    }
23458
23459    impl serde::ser::Serialize for EvaluationType {
23460        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23461        where
23462            S: serde::Serializer,
23463        {
23464            match self {
23465                Self::Unspecified => serializer.serialize_i32(0),
23466                Self::PerRow => serializer.serialize_i32(1),
23467                Self::Aggregate => serializer.serialize_i32(2),
23468                Self::UnknownValue(u) => u.0.serialize(serializer),
23469            }
23470        }
23471    }
23472
23473    impl<'de> serde::de::Deserialize<'de> for EvaluationType {
23474        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23475        where
23476            D: serde::Deserializer<'de>,
23477        {
23478            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationType>::new(
23479                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType",
23480            ))
23481        }
23482    }
23483
23484    /// Whether the data quality rule passed or failed.
23485    ///
23486    /// # Working with unknown values
23487    ///
23488    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23489    /// additional enum variants at any time. Adding new variants is not considered
23490    /// a breaking change. Applications should write their code in anticipation of:
23491    ///
23492    /// - New values appearing in future releases of the client library, **and**
23493    /// - New values received dynamically, without application changes.
23494    ///
23495    /// Please consult the [Working with enums] section in the user guide for some
23496    /// guidelines.
23497    ///
23498    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23499    #[derive(Clone, Debug, PartialEq)]
23500    #[non_exhaustive]
23501    pub enum Result {
23502        /// An unspecified result.
23503        Unspecified,
23504        /// The data quality rule passed.
23505        Passed,
23506        /// The data quality rule failed.
23507        Failed,
23508        /// If set, the enum was initialized with an unknown value.
23509        ///
23510        /// Applications can examine the value using [Result::value] or
23511        /// [Result::name].
23512        UnknownValue(result::UnknownValue),
23513    }
23514
23515    #[doc(hidden)]
23516    pub mod result {
23517        #[allow(unused_imports)]
23518        use super::*;
23519        #[derive(Clone, Debug, PartialEq)]
23520        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23521    }
23522
23523    impl Result {
23524        /// Gets the enum value.
23525        ///
23526        /// Returns `None` if the enum contains an unknown value deserialized from
23527        /// the string representation of enums.
23528        pub fn value(&self) -> std::option::Option<i32> {
23529            match self {
23530                Self::Unspecified => std::option::Option::Some(0),
23531                Self::Passed => std::option::Option::Some(1),
23532                Self::Failed => std::option::Option::Some(2),
23533                Self::UnknownValue(u) => u.0.value(),
23534            }
23535        }
23536
23537        /// Gets the enum value as a string.
23538        ///
23539        /// Returns `None` if the enum contains an unknown value deserialized from
23540        /// the integer representation of enums.
23541        pub fn name(&self) -> std::option::Option<&str> {
23542            match self {
23543                Self::Unspecified => std::option::Option::Some("RESULT_UNSPECIFIED"),
23544                Self::Passed => std::option::Option::Some("PASSED"),
23545                Self::Failed => std::option::Option::Some("FAILED"),
23546                Self::UnknownValue(u) => u.0.name(),
23547            }
23548        }
23549    }
23550
23551    impl std::default::Default for Result {
23552        fn default() -> Self {
23553            use std::convert::From;
23554            Self::from(0)
23555        }
23556    }
23557
23558    impl std::fmt::Display for Result {
23559        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23560            wkt::internal::display_enum(f, self.name(), self.value())
23561        }
23562    }
23563
23564    impl std::convert::From<i32> for Result {
23565        fn from(value: i32) -> Self {
23566            match value {
23567                0 => Self::Unspecified,
23568                1 => Self::Passed,
23569                2 => Self::Failed,
23570                _ => Self::UnknownValue(result::UnknownValue(
23571                    wkt::internal::UnknownEnumValue::Integer(value),
23572                )),
23573            }
23574        }
23575    }
23576
23577    impl std::convert::From<&str> for Result {
23578        fn from(value: &str) -> Self {
23579            use std::string::ToString;
23580            match value {
23581                "RESULT_UNSPECIFIED" => Self::Unspecified,
23582                "PASSED" => Self::Passed,
23583                "FAILED" => Self::Failed,
23584                _ => Self::UnknownValue(result::UnknownValue(
23585                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23586                )),
23587            }
23588        }
23589    }
23590
23591    impl serde::ser::Serialize for Result {
23592        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23593        where
23594            S: serde::Serializer,
23595        {
23596            match self {
23597                Self::Unspecified => serializer.serialize_i32(0),
23598                Self::Passed => serializer.serialize_i32(1),
23599                Self::Failed => serializer.serialize_i32(2),
23600                Self::UnknownValue(u) => u.0.serialize(serializer),
23601            }
23602        }
23603    }
23604
23605    impl<'de> serde::de::Deserialize<'de> for Result {
23606        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23607        where
23608            D: serde::Deserializer<'de>,
23609        {
23610            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Result>::new(
23611                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.Result",
23612            ))
23613        }
23614    }
23615}
23616
23617/// Payload associated with Business Glossary related log events.
23618#[derive(Clone, Default, PartialEq)]
23619#[non_exhaustive]
23620pub struct BusinessGlossaryEvent {
23621    /// The log message.
23622    pub message: std::string::String,
23623
23624    /// The type of the event.
23625    pub event_type: crate::model::business_glossary_event::EventType,
23626
23627    /// Name of the resource.
23628    pub resource: std::string::String,
23629
23630    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23631}
23632
23633impl BusinessGlossaryEvent {
23634    pub fn new() -> Self {
23635        std::default::Default::default()
23636    }
23637
23638    /// Sets the value of [message][crate::model::BusinessGlossaryEvent::message].
23639    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23640        self.message = v.into();
23641        self
23642    }
23643
23644    /// Sets the value of [event_type][crate::model::BusinessGlossaryEvent::event_type].
23645    pub fn set_event_type<
23646        T: std::convert::Into<crate::model::business_glossary_event::EventType>,
23647    >(
23648        mut self,
23649        v: T,
23650    ) -> Self {
23651        self.event_type = v.into();
23652        self
23653    }
23654
23655    /// Sets the value of [resource][crate::model::BusinessGlossaryEvent::resource].
23656    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23657        self.resource = v.into();
23658        self
23659    }
23660}
23661
23662impl wkt::message::Message for BusinessGlossaryEvent {
23663    fn typename() -> &'static str {
23664        "type.googleapis.com/google.cloud.dataplex.v1.BusinessGlossaryEvent"
23665    }
23666}
23667
23668/// Defines additional types related to [BusinessGlossaryEvent].
23669pub mod business_glossary_event {
23670    #[allow(unused_imports)]
23671    use super::*;
23672
23673    /// Type of glossary log event.
23674    ///
23675    /// # Working with unknown values
23676    ///
23677    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23678    /// additional enum variants at any time. Adding new variants is not considered
23679    /// a breaking change. Applications should write their code in anticipation of:
23680    ///
23681    /// - New values appearing in future releases of the client library, **and**
23682    /// - New values received dynamically, without application changes.
23683    ///
23684    /// Please consult the [Working with enums] section in the user guide for some
23685    /// guidelines.
23686    ///
23687    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23688    #[derive(Clone, Debug, PartialEq)]
23689    #[non_exhaustive]
23690    pub enum EventType {
23691        /// An unspecified event type.
23692        Unspecified,
23693        /// Glossary create event.
23694        GlossaryCreate,
23695        /// Glossary update event.
23696        GlossaryUpdate,
23697        /// Glossary delete event.
23698        GlossaryDelete,
23699        /// Glossary category create event.
23700        GlossaryCategoryCreate,
23701        /// Glossary category update event.
23702        GlossaryCategoryUpdate,
23703        /// Glossary category delete event.
23704        GlossaryCategoryDelete,
23705        /// Glossary term create event.
23706        GlossaryTermCreate,
23707        /// Glossary term update event.
23708        GlossaryTermUpdate,
23709        /// Glossary term delete event.
23710        GlossaryTermDelete,
23711        /// If set, the enum was initialized with an unknown value.
23712        ///
23713        /// Applications can examine the value using [EventType::value] or
23714        /// [EventType::name].
23715        UnknownValue(event_type::UnknownValue),
23716    }
23717
23718    #[doc(hidden)]
23719    pub mod event_type {
23720        #[allow(unused_imports)]
23721        use super::*;
23722        #[derive(Clone, Debug, PartialEq)]
23723        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23724    }
23725
23726    impl EventType {
23727        /// Gets the enum value.
23728        ///
23729        /// Returns `None` if the enum contains an unknown value deserialized from
23730        /// the string representation of enums.
23731        pub fn value(&self) -> std::option::Option<i32> {
23732            match self {
23733                Self::Unspecified => std::option::Option::Some(0),
23734                Self::GlossaryCreate => std::option::Option::Some(1),
23735                Self::GlossaryUpdate => std::option::Option::Some(2),
23736                Self::GlossaryDelete => std::option::Option::Some(3),
23737                Self::GlossaryCategoryCreate => std::option::Option::Some(4),
23738                Self::GlossaryCategoryUpdate => std::option::Option::Some(5),
23739                Self::GlossaryCategoryDelete => std::option::Option::Some(6),
23740                Self::GlossaryTermCreate => std::option::Option::Some(7),
23741                Self::GlossaryTermUpdate => std::option::Option::Some(8),
23742                Self::GlossaryTermDelete => std::option::Option::Some(9),
23743                Self::UnknownValue(u) => u.0.value(),
23744            }
23745        }
23746
23747        /// Gets the enum value as a string.
23748        ///
23749        /// Returns `None` if the enum contains an unknown value deserialized from
23750        /// the integer representation of enums.
23751        pub fn name(&self) -> std::option::Option<&str> {
23752            match self {
23753                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
23754                Self::GlossaryCreate => std::option::Option::Some("GLOSSARY_CREATE"),
23755                Self::GlossaryUpdate => std::option::Option::Some("GLOSSARY_UPDATE"),
23756                Self::GlossaryDelete => std::option::Option::Some("GLOSSARY_DELETE"),
23757                Self::GlossaryCategoryCreate => {
23758                    std::option::Option::Some("GLOSSARY_CATEGORY_CREATE")
23759                }
23760                Self::GlossaryCategoryUpdate => {
23761                    std::option::Option::Some("GLOSSARY_CATEGORY_UPDATE")
23762                }
23763                Self::GlossaryCategoryDelete => {
23764                    std::option::Option::Some("GLOSSARY_CATEGORY_DELETE")
23765                }
23766                Self::GlossaryTermCreate => std::option::Option::Some("GLOSSARY_TERM_CREATE"),
23767                Self::GlossaryTermUpdate => std::option::Option::Some("GLOSSARY_TERM_UPDATE"),
23768                Self::GlossaryTermDelete => std::option::Option::Some("GLOSSARY_TERM_DELETE"),
23769                Self::UnknownValue(u) => u.0.name(),
23770            }
23771        }
23772    }
23773
23774    impl std::default::Default for EventType {
23775        fn default() -> Self {
23776            use std::convert::From;
23777            Self::from(0)
23778        }
23779    }
23780
23781    impl std::fmt::Display for EventType {
23782        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23783            wkt::internal::display_enum(f, self.name(), self.value())
23784        }
23785    }
23786
23787    impl std::convert::From<i32> for EventType {
23788        fn from(value: i32) -> Self {
23789            match value {
23790                0 => Self::Unspecified,
23791                1 => Self::GlossaryCreate,
23792                2 => Self::GlossaryUpdate,
23793                3 => Self::GlossaryDelete,
23794                4 => Self::GlossaryCategoryCreate,
23795                5 => Self::GlossaryCategoryUpdate,
23796                6 => Self::GlossaryCategoryDelete,
23797                7 => Self::GlossaryTermCreate,
23798                8 => Self::GlossaryTermUpdate,
23799                9 => Self::GlossaryTermDelete,
23800                _ => Self::UnknownValue(event_type::UnknownValue(
23801                    wkt::internal::UnknownEnumValue::Integer(value),
23802                )),
23803            }
23804        }
23805    }
23806
23807    impl std::convert::From<&str> for EventType {
23808        fn from(value: &str) -> Self {
23809            use std::string::ToString;
23810            match value {
23811                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
23812                "GLOSSARY_CREATE" => Self::GlossaryCreate,
23813                "GLOSSARY_UPDATE" => Self::GlossaryUpdate,
23814                "GLOSSARY_DELETE" => Self::GlossaryDelete,
23815                "GLOSSARY_CATEGORY_CREATE" => Self::GlossaryCategoryCreate,
23816                "GLOSSARY_CATEGORY_UPDATE" => Self::GlossaryCategoryUpdate,
23817                "GLOSSARY_CATEGORY_DELETE" => Self::GlossaryCategoryDelete,
23818                "GLOSSARY_TERM_CREATE" => Self::GlossaryTermCreate,
23819                "GLOSSARY_TERM_UPDATE" => Self::GlossaryTermUpdate,
23820                "GLOSSARY_TERM_DELETE" => Self::GlossaryTermDelete,
23821                _ => Self::UnknownValue(event_type::UnknownValue(
23822                    wkt::internal::UnknownEnumValue::String(value.to_string()),
23823                )),
23824            }
23825        }
23826    }
23827
23828    impl serde::ser::Serialize for EventType {
23829        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23830        where
23831            S: serde::Serializer,
23832        {
23833            match self {
23834                Self::Unspecified => serializer.serialize_i32(0),
23835                Self::GlossaryCreate => serializer.serialize_i32(1),
23836                Self::GlossaryUpdate => serializer.serialize_i32(2),
23837                Self::GlossaryDelete => serializer.serialize_i32(3),
23838                Self::GlossaryCategoryCreate => serializer.serialize_i32(4),
23839                Self::GlossaryCategoryUpdate => serializer.serialize_i32(5),
23840                Self::GlossaryCategoryDelete => serializer.serialize_i32(6),
23841                Self::GlossaryTermCreate => serializer.serialize_i32(7),
23842                Self::GlossaryTermUpdate => serializer.serialize_i32(8),
23843                Self::GlossaryTermDelete => serializer.serialize_i32(9),
23844                Self::UnknownValue(u) => u.0.serialize(serializer),
23845            }
23846        }
23847    }
23848
23849    impl<'de> serde::de::Deserialize<'de> for EventType {
23850        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23851        where
23852            D: serde::Deserializer<'de>,
23853        {
23854            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
23855                ".google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType",
23856            ))
23857        }
23858    }
23859}
23860
23861/// Payload associated with Entry related log events.
23862#[derive(Clone, Default, PartialEq)]
23863#[non_exhaustive]
23864pub struct EntryLinkEvent {
23865    /// The log message.
23866    pub message: std::string::String,
23867
23868    /// The type of the event.
23869    pub event_type: crate::model::entry_link_event::EventType,
23870
23871    /// Name of the resource.
23872    pub resource: std::string::String,
23873
23874    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23875}
23876
23877impl EntryLinkEvent {
23878    pub fn new() -> Self {
23879        std::default::Default::default()
23880    }
23881
23882    /// Sets the value of [message][crate::model::EntryLinkEvent::message].
23883    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23884        self.message = v.into();
23885        self
23886    }
23887
23888    /// Sets the value of [event_type][crate::model::EntryLinkEvent::event_type].
23889    pub fn set_event_type<T: std::convert::Into<crate::model::entry_link_event::EventType>>(
23890        mut self,
23891        v: T,
23892    ) -> Self {
23893        self.event_type = v.into();
23894        self
23895    }
23896
23897    /// Sets the value of [resource][crate::model::EntryLinkEvent::resource].
23898    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23899        self.resource = v.into();
23900        self
23901    }
23902}
23903
23904impl wkt::message::Message for EntryLinkEvent {
23905    fn typename() -> &'static str {
23906        "type.googleapis.com/google.cloud.dataplex.v1.EntryLinkEvent"
23907    }
23908}
23909
23910/// Defines additional types related to [EntryLinkEvent].
23911pub mod entry_link_event {
23912    #[allow(unused_imports)]
23913    use super::*;
23914
23915    /// Type of entry link log event.
23916    ///
23917    /// # Working with unknown values
23918    ///
23919    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23920    /// additional enum variants at any time. Adding new variants is not considered
23921    /// a breaking change. Applications should write their code in anticipation of:
23922    ///
23923    /// - New values appearing in future releases of the client library, **and**
23924    /// - New values received dynamically, without application changes.
23925    ///
23926    /// Please consult the [Working with enums] section in the user guide for some
23927    /// guidelines.
23928    ///
23929    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23930    #[derive(Clone, Debug, PartialEq)]
23931    #[non_exhaustive]
23932    pub enum EventType {
23933        /// An unspecified event type.
23934        Unspecified,
23935        /// EntryLink create event.
23936        EntryLinkCreate,
23937        /// EntryLink delete event.
23938        EntryLinkDelete,
23939        /// If set, the enum was initialized with an unknown value.
23940        ///
23941        /// Applications can examine the value using [EventType::value] or
23942        /// [EventType::name].
23943        UnknownValue(event_type::UnknownValue),
23944    }
23945
23946    #[doc(hidden)]
23947    pub mod event_type {
23948        #[allow(unused_imports)]
23949        use super::*;
23950        #[derive(Clone, Debug, PartialEq)]
23951        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23952    }
23953
23954    impl EventType {
23955        /// Gets the enum value.
23956        ///
23957        /// Returns `None` if the enum contains an unknown value deserialized from
23958        /// the string representation of enums.
23959        pub fn value(&self) -> std::option::Option<i32> {
23960            match self {
23961                Self::Unspecified => std::option::Option::Some(0),
23962                Self::EntryLinkCreate => std::option::Option::Some(1),
23963                Self::EntryLinkDelete => std::option::Option::Some(2),
23964                Self::UnknownValue(u) => u.0.value(),
23965            }
23966        }
23967
23968        /// Gets the enum value as a string.
23969        ///
23970        /// Returns `None` if the enum contains an unknown value deserialized from
23971        /// the integer representation of enums.
23972        pub fn name(&self) -> std::option::Option<&str> {
23973            match self {
23974                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
23975                Self::EntryLinkCreate => std::option::Option::Some("ENTRY_LINK_CREATE"),
23976                Self::EntryLinkDelete => std::option::Option::Some("ENTRY_LINK_DELETE"),
23977                Self::UnknownValue(u) => u.0.name(),
23978            }
23979        }
23980    }
23981
23982    impl std::default::Default for EventType {
23983        fn default() -> Self {
23984            use std::convert::From;
23985            Self::from(0)
23986        }
23987    }
23988
23989    impl std::fmt::Display for EventType {
23990        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23991            wkt::internal::display_enum(f, self.name(), self.value())
23992        }
23993    }
23994
23995    impl std::convert::From<i32> for EventType {
23996        fn from(value: i32) -> Self {
23997            match value {
23998                0 => Self::Unspecified,
23999                1 => Self::EntryLinkCreate,
24000                2 => Self::EntryLinkDelete,
24001                _ => Self::UnknownValue(event_type::UnknownValue(
24002                    wkt::internal::UnknownEnumValue::Integer(value),
24003                )),
24004            }
24005        }
24006    }
24007
24008    impl std::convert::From<&str> for EventType {
24009        fn from(value: &str) -> Self {
24010            use std::string::ToString;
24011            match value {
24012                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
24013                "ENTRY_LINK_CREATE" => Self::EntryLinkCreate,
24014                "ENTRY_LINK_DELETE" => Self::EntryLinkDelete,
24015                _ => Self::UnknownValue(event_type::UnknownValue(
24016                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24017                )),
24018            }
24019        }
24020    }
24021
24022    impl serde::ser::Serialize for EventType {
24023        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24024        where
24025            S: serde::Serializer,
24026        {
24027            match self {
24028                Self::Unspecified => serializer.serialize_i32(0),
24029                Self::EntryLinkCreate => serializer.serialize_i32(1),
24030                Self::EntryLinkDelete => serializer.serialize_i32(2),
24031                Self::UnknownValue(u) => u.0.serialize(serializer),
24032            }
24033        }
24034    }
24035
24036    impl<'de> serde::de::Deserialize<'de> for EventType {
24037        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24038        where
24039            D: serde::Deserializer<'de>,
24040        {
24041            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
24042                ".google.cloud.dataplex.v1.EntryLinkEvent.EventType",
24043            ))
24044        }
24045    }
24046}
24047
24048/// Create a metadata entity request.
24049#[derive(Clone, Default, PartialEq)]
24050#[non_exhaustive]
24051pub struct CreateEntityRequest {
24052    /// Required. The resource name of the parent zone:
24053    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
24054    pub parent: std::string::String,
24055
24056    /// Required. Entity resource.
24057    pub entity: std::option::Option<crate::model::Entity>,
24058
24059    /// Optional. Only validate the request, but do not perform mutations.
24060    /// The default is false.
24061    pub validate_only: bool,
24062
24063    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24064}
24065
24066impl CreateEntityRequest {
24067    pub fn new() -> Self {
24068        std::default::Default::default()
24069    }
24070
24071    /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
24072    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24073        self.parent = v.into();
24074        self
24075    }
24076
24077    /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
24078    pub fn set_entity<T>(mut self, v: T) -> Self
24079    where
24080        T: std::convert::Into<crate::model::Entity>,
24081    {
24082        self.entity = std::option::Option::Some(v.into());
24083        self
24084    }
24085
24086    /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
24087    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
24088    where
24089        T: std::convert::Into<crate::model::Entity>,
24090    {
24091        self.entity = v.map(|x| x.into());
24092        self
24093    }
24094
24095    /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
24096    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24097        self.validate_only = v.into();
24098        self
24099    }
24100}
24101
24102impl wkt::message::Message for CreateEntityRequest {
24103    fn typename() -> &'static str {
24104        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntityRequest"
24105    }
24106}
24107
24108/// Update a metadata entity request.
24109/// The exiting entity will be fully replaced by the entity in the request.
24110/// The entity ID is mutable. To modify the ID, use the current entity ID in the
24111/// request URL and specify the new ID in the request body.
24112#[derive(Clone, Default, PartialEq)]
24113#[non_exhaustive]
24114pub struct UpdateEntityRequest {
24115    /// Required. Update description.
24116    pub entity: std::option::Option<crate::model::Entity>,
24117
24118    /// Optional. Only validate the request, but do not perform mutations.
24119    /// The default is false.
24120    pub validate_only: bool,
24121
24122    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24123}
24124
24125impl UpdateEntityRequest {
24126    pub fn new() -> Self {
24127        std::default::Default::default()
24128    }
24129
24130    /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
24131    pub fn set_entity<T>(mut self, v: T) -> Self
24132    where
24133        T: std::convert::Into<crate::model::Entity>,
24134    {
24135        self.entity = std::option::Option::Some(v.into());
24136        self
24137    }
24138
24139    /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
24140    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
24141    where
24142        T: std::convert::Into<crate::model::Entity>,
24143    {
24144        self.entity = v.map(|x| x.into());
24145        self
24146    }
24147
24148    /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
24149    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24150        self.validate_only = v.into();
24151        self
24152    }
24153}
24154
24155impl wkt::message::Message for UpdateEntityRequest {
24156    fn typename() -> &'static str {
24157        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntityRequest"
24158    }
24159}
24160
24161/// Delete a metadata entity request.
24162#[derive(Clone, Default, PartialEq)]
24163#[non_exhaustive]
24164pub struct DeleteEntityRequest {
24165    /// Required. The resource name of the entity:
24166    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
24167    pub name: std::string::String,
24168
24169    /// Required. The etag associated with the entity, which can be retrieved with
24170    /// a [GetEntity][] request.
24171    pub etag: std::string::String,
24172
24173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24174}
24175
24176impl DeleteEntityRequest {
24177    pub fn new() -> Self {
24178        std::default::Default::default()
24179    }
24180
24181    /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
24182    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24183        self.name = v.into();
24184        self
24185    }
24186
24187    /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
24188    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24189        self.etag = v.into();
24190        self
24191    }
24192}
24193
24194impl wkt::message::Message for DeleteEntityRequest {
24195    fn typename() -> &'static str {
24196        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntityRequest"
24197    }
24198}
24199
24200/// List metadata entities request.
24201#[derive(Clone, Default, PartialEq)]
24202#[non_exhaustive]
24203pub struct ListEntitiesRequest {
24204    /// Required. The resource name of the parent zone:
24205    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
24206    pub parent: std::string::String,
24207
24208    /// Required. Specify the entity view to make a partial list request.
24209    pub view: crate::model::list_entities_request::EntityView,
24210
24211    /// Optional. Maximum number of entities to return. The service may return
24212    /// fewer than this value. If unspecified, 100 entities will be returned by
24213    /// default. The maximum value is 500; larger values will will be truncated to
24214    /// 500.
24215    pub page_size: i32,
24216
24217    /// Optional. Page token received from a previous `ListEntities` call. Provide
24218    /// this to retrieve the subsequent page. When paginating, all other parameters
24219    /// provided to `ListEntities` must match the call that provided the
24220    /// page token.
24221    pub page_token: std::string::String,
24222
24223    /// Optional. The following filter parameters can be added to the URL to limit
24224    /// the entities returned by the API:
24225    ///
24226    /// - Entity ID: ?filter="id=entityID"
24227    /// - Asset ID: ?filter="asset=assetID"
24228    /// - Data path ?filter="data_path=gs://my-bucket"
24229    /// - Is HIVE compatible: ?filter="hive_compatible=true"
24230    /// - Is BigQuery compatible: ?filter="bigquery_compatible=true"
24231    pub filter: std::string::String,
24232
24233    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24234}
24235
24236impl ListEntitiesRequest {
24237    pub fn new() -> Self {
24238        std::default::Default::default()
24239    }
24240
24241    /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
24242    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24243        self.parent = v.into();
24244        self
24245    }
24246
24247    /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
24248    pub fn set_view<T: std::convert::Into<crate::model::list_entities_request::EntityView>>(
24249        mut self,
24250        v: T,
24251    ) -> Self {
24252        self.view = v.into();
24253        self
24254    }
24255
24256    /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
24257    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24258        self.page_size = v.into();
24259        self
24260    }
24261
24262    /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
24263    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24264        self.page_token = v.into();
24265        self
24266    }
24267
24268    /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
24269    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24270        self.filter = v.into();
24271        self
24272    }
24273}
24274
24275impl wkt::message::Message for ListEntitiesRequest {
24276    fn typename() -> &'static str {
24277        "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesRequest"
24278    }
24279}
24280
24281/// Defines additional types related to [ListEntitiesRequest].
24282pub mod list_entities_request {
24283    #[allow(unused_imports)]
24284    use super::*;
24285
24286    /// Entity views.
24287    ///
24288    /// # Working with unknown values
24289    ///
24290    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24291    /// additional enum variants at any time. Adding new variants is not considered
24292    /// a breaking change. Applications should write their code in anticipation of:
24293    ///
24294    /// - New values appearing in future releases of the client library, **and**
24295    /// - New values received dynamically, without application changes.
24296    ///
24297    /// Please consult the [Working with enums] section in the user guide for some
24298    /// guidelines.
24299    ///
24300    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24301    #[derive(Clone, Debug, PartialEq)]
24302    #[non_exhaustive]
24303    pub enum EntityView {
24304        /// The default unset value. Return both table and fileset entities
24305        /// if unspecified.
24306        Unspecified,
24307        /// Only list table entities.
24308        Tables,
24309        /// Only list fileset entities.
24310        Filesets,
24311        /// If set, the enum was initialized with an unknown value.
24312        ///
24313        /// Applications can examine the value using [EntityView::value] or
24314        /// [EntityView::name].
24315        UnknownValue(entity_view::UnknownValue),
24316    }
24317
24318    #[doc(hidden)]
24319    pub mod entity_view {
24320        #[allow(unused_imports)]
24321        use super::*;
24322        #[derive(Clone, Debug, PartialEq)]
24323        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24324    }
24325
24326    impl EntityView {
24327        /// Gets the enum value.
24328        ///
24329        /// Returns `None` if the enum contains an unknown value deserialized from
24330        /// the string representation of enums.
24331        pub fn value(&self) -> std::option::Option<i32> {
24332            match self {
24333                Self::Unspecified => std::option::Option::Some(0),
24334                Self::Tables => std::option::Option::Some(1),
24335                Self::Filesets => std::option::Option::Some(2),
24336                Self::UnknownValue(u) => u.0.value(),
24337            }
24338        }
24339
24340        /// Gets the enum value as a string.
24341        ///
24342        /// Returns `None` if the enum contains an unknown value deserialized from
24343        /// the integer representation of enums.
24344        pub fn name(&self) -> std::option::Option<&str> {
24345            match self {
24346                Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
24347                Self::Tables => std::option::Option::Some("TABLES"),
24348                Self::Filesets => std::option::Option::Some("FILESETS"),
24349                Self::UnknownValue(u) => u.0.name(),
24350            }
24351        }
24352    }
24353
24354    impl std::default::Default for EntityView {
24355        fn default() -> Self {
24356            use std::convert::From;
24357            Self::from(0)
24358        }
24359    }
24360
24361    impl std::fmt::Display for EntityView {
24362        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24363            wkt::internal::display_enum(f, self.name(), self.value())
24364        }
24365    }
24366
24367    impl std::convert::From<i32> for EntityView {
24368        fn from(value: i32) -> Self {
24369            match value {
24370                0 => Self::Unspecified,
24371                1 => Self::Tables,
24372                2 => Self::Filesets,
24373                _ => Self::UnknownValue(entity_view::UnknownValue(
24374                    wkt::internal::UnknownEnumValue::Integer(value),
24375                )),
24376            }
24377        }
24378    }
24379
24380    impl std::convert::From<&str> for EntityView {
24381        fn from(value: &str) -> Self {
24382            use std::string::ToString;
24383            match value {
24384                "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
24385                "TABLES" => Self::Tables,
24386                "FILESETS" => Self::Filesets,
24387                _ => Self::UnknownValue(entity_view::UnknownValue(
24388                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24389                )),
24390            }
24391        }
24392    }
24393
24394    impl serde::ser::Serialize for EntityView {
24395        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24396        where
24397            S: serde::Serializer,
24398        {
24399            match self {
24400                Self::Unspecified => serializer.serialize_i32(0),
24401                Self::Tables => serializer.serialize_i32(1),
24402                Self::Filesets => serializer.serialize_i32(2),
24403                Self::UnknownValue(u) => u.0.serialize(serializer),
24404            }
24405        }
24406    }
24407
24408    impl<'de> serde::de::Deserialize<'de> for EntityView {
24409        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24410        where
24411            D: serde::Deserializer<'de>,
24412        {
24413            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
24414                ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView",
24415            ))
24416        }
24417    }
24418}
24419
24420/// List metadata entities response.
24421#[derive(Clone, Default, PartialEq)]
24422#[non_exhaustive]
24423pub struct ListEntitiesResponse {
24424    /// Entities in the specified parent zone.
24425    pub entities: std::vec::Vec<crate::model::Entity>,
24426
24427    /// Token to retrieve the next page of results, or empty if there are no
24428    /// remaining results in the list.
24429    pub next_page_token: std::string::String,
24430
24431    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24432}
24433
24434impl ListEntitiesResponse {
24435    pub fn new() -> Self {
24436        std::default::Default::default()
24437    }
24438
24439    /// Sets the value of [entities][crate::model::ListEntitiesResponse::entities].
24440    pub fn set_entities<T, V>(mut self, v: T) -> Self
24441    where
24442        T: std::iter::IntoIterator<Item = V>,
24443        V: std::convert::Into<crate::model::Entity>,
24444    {
24445        use std::iter::Iterator;
24446        self.entities = v.into_iter().map(|i| i.into()).collect();
24447        self
24448    }
24449
24450    /// Sets the value of [next_page_token][crate::model::ListEntitiesResponse::next_page_token].
24451    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24452        self.next_page_token = v.into();
24453        self
24454    }
24455}
24456
24457impl wkt::message::Message for ListEntitiesResponse {
24458    fn typename() -> &'static str {
24459        "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesResponse"
24460    }
24461}
24462
24463#[doc(hidden)]
24464impl gax::paginator::internal::PageableResponse for ListEntitiesResponse {
24465    type PageItem = crate::model::Entity;
24466
24467    fn items(self) -> std::vec::Vec<Self::PageItem> {
24468        self.entities
24469    }
24470
24471    fn next_page_token(&self) -> std::string::String {
24472        use std::clone::Clone;
24473        self.next_page_token.clone()
24474    }
24475}
24476
24477/// Get metadata entity request.
24478#[derive(Clone, Default, PartialEq)]
24479#[non_exhaustive]
24480pub struct GetEntityRequest {
24481    /// Required. The resource name of the entity:
24482    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.`
24483    pub name: std::string::String,
24484
24485    /// Optional. Used to select the subset of entity information to return.
24486    /// Defaults to `BASIC`.
24487    pub view: crate::model::get_entity_request::EntityView,
24488
24489    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24490}
24491
24492impl GetEntityRequest {
24493    pub fn new() -> Self {
24494        std::default::Default::default()
24495    }
24496
24497    /// Sets the value of [name][crate::model::GetEntityRequest::name].
24498    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24499        self.name = v.into();
24500        self
24501    }
24502
24503    /// Sets the value of [view][crate::model::GetEntityRequest::view].
24504    pub fn set_view<T: std::convert::Into<crate::model::get_entity_request::EntityView>>(
24505        mut self,
24506        v: T,
24507    ) -> Self {
24508        self.view = v.into();
24509        self
24510    }
24511}
24512
24513impl wkt::message::Message for GetEntityRequest {
24514    fn typename() -> &'static str {
24515        "type.googleapis.com/google.cloud.dataplex.v1.GetEntityRequest"
24516    }
24517}
24518
24519/// Defines additional types related to [GetEntityRequest].
24520pub mod get_entity_request {
24521    #[allow(unused_imports)]
24522    use super::*;
24523
24524    /// Entity views for get entity partial result.
24525    ///
24526    /// # Working with unknown values
24527    ///
24528    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24529    /// additional enum variants at any time. Adding new variants is not considered
24530    /// a breaking change. Applications should write their code in anticipation of:
24531    ///
24532    /// - New values appearing in future releases of the client library, **and**
24533    /// - New values received dynamically, without application changes.
24534    ///
24535    /// Please consult the [Working with enums] section in the user guide for some
24536    /// guidelines.
24537    ///
24538    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24539    #[derive(Clone, Debug, PartialEq)]
24540    #[non_exhaustive]
24541    pub enum EntityView {
24542        /// The API will default to the `BASIC` view.
24543        Unspecified,
24544        /// Minimal view that does not include the schema.
24545        Basic,
24546        /// Include basic information and schema.
24547        Schema,
24548        /// Include everything. Currently, this is the same as the SCHEMA view.
24549        Full,
24550        /// If set, the enum was initialized with an unknown value.
24551        ///
24552        /// Applications can examine the value using [EntityView::value] or
24553        /// [EntityView::name].
24554        UnknownValue(entity_view::UnknownValue),
24555    }
24556
24557    #[doc(hidden)]
24558    pub mod entity_view {
24559        #[allow(unused_imports)]
24560        use super::*;
24561        #[derive(Clone, Debug, PartialEq)]
24562        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24563    }
24564
24565    impl EntityView {
24566        /// Gets the enum value.
24567        ///
24568        /// Returns `None` if the enum contains an unknown value deserialized from
24569        /// the string representation of enums.
24570        pub fn value(&self) -> std::option::Option<i32> {
24571            match self {
24572                Self::Unspecified => std::option::Option::Some(0),
24573                Self::Basic => std::option::Option::Some(1),
24574                Self::Schema => std::option::Option::Some(2),
24575                Self::Full => std::option::Option::Some(4),
24576                Self::UnknownValue(u) => u.0.value(),
24577            }
24578        }
24579
24580        /// Gets the enum value as a string.
24581        ///
24582        /// Returns `None` if the enum contains an unknown value deserialized from
24583        /// the integer representation of enums.
24584        pub fn name(&self) -> std::option::Option<&str> {
24585            match self {
24586                Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
24587                Self::Basic => std::option::Option::Some("BASIC"),
24588                Self::Schema => std::option::Option::Some("SCHEMA"),
24589                Self::Full => std::option::Option::Some("FULL"),
24590                Self::UnknownValue(u) => u.0.name(),
24591            }
24592        }
24593    }
24594
24595    impl std::default::Default for EntityView {
24596        fn default() -> Self {
24597            use std::convert::From;
24598            Self::from(0)
24599        }
24600    }
24601
24602    impl std::fmt::Display for EntityView {
24603        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24604            wkt::internal::display_enum(f, self.name(), self.value())
24605        }
24606    }
24607
24608    impl std::convert::From<i32> for EntityView {
24609        fn from(value: i32) -> Self {
24610            match value {
24611                0 => Self::Unspecified,
24612                1 => Self::Basic,
24613                2 => Self::Schema,
24614                4 => Self::Full,
24615                _ => Self::UnknownValue(entity_view::UnknownValue(
24616                    wkt::internal::UnknownEnumValue::Integer(value),
24617                )),
24618            }
24619        }
24620    }
24621
24622    impl std::convert::From<&str> for EntityView {
24623        fn from(value: &str) -> Self {
24624            use std::string::ToString;
24625            match value {
24626                "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
24627                "BASIC" => Self::Basic,
24628                "SCHEMA" => Self::Schema,
24629                "FULL" => Self::Full,
24630                _ => Self::UnknownValue(entity_view::UnknownValue(
24631                    wkt::internal::UnknownEnumValue::String(value.to_string()),
24632                )),
24633            }
24634        }
24635    }
24636
24637    impl serde::ser::Serialize for EntityView {
24638        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24639        where
24640            S: serde::Serializer,
24641        {
24642            match self {
24643                Self::Unspecified => serializer.serialize_i32(0),
24644                Self::Basic => serializer.serialize_i32(1),
24645                Self::Schema => serializer.serialize_i32(2),
24646                Self::Full => serializer.serialize_i32(4),
24647                Self::UnknownValue(u) => u.0.serialize(serializer),
24648            }
24649        }
24650    }
24651
24652    impl<'de> serde::de::Deserialize<'de> for EntityView {
24653        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24654        where
24655            D: serde::Deserializer<'de>,
24656        {
24657            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
24658                ".google.cloud.dataplex.v1.GetEntityRequest.EntityView",
24659            ))
24660        }
24661    }
24662}
24663
24664/// List metadata partitions request.
24665#[derive(Clone, Default, PartialEq)]
24666#[non_exhaustive]
24667pub struct ListPartitionsRequest {
24668    /// Required. The resource name of the parent entity:
24669    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
24670    pub parent: std::string::String,
24671
24672    /// Optional. Maximum number of partitions to return. The service may return
24673    /// fewer than this value. If unspecified, 100 partitions will be returned by
24674    /// default. The maximum page size is 500; larger values will will be truncated
24675    /// to 500.
24676    pub page_size: i32,
24677
24678    /// Optional. Page token received from a previous `ListPartitions` call.
24679    /// Provide this to retrieve the subsequent page. When paginating, all other
24680    /// parameters provided to `ListPartitions` must match the call that provided
24681    /// the page token.
24682    pub page_token: std::string::String,
24683
24684    /// Optional. Filter the partitions returned to the caller using a key value
24685    /// pair expression. Supported operators and syntax:
24686    ///
24687    /// - logic operators: AND, OR
24688    /// - comparison operators: <, >, >=, <= ,=, !=
24689    /// - LIKE operators:
24690    ///   - The right hand of a LIKE operator supports "." and
24691    ///     "*" for wildcard searches, for example "value1 LIKE ".*oo.*"
24692    /// - parenthetical grouping: ( )
24693    ///
24694    /// Sample filter expression: `?filter="key1 < value1 OR key2 > value2"
24695    ///
24696    /// **Notes:**
24697    ///
24698    /// - Keys to the left of operators are case insensitive.
24699    /// - Partition results are sorted first by creation time, then by
24700    ///   lexicographic order.
24701    /// - Up to 20 key value filter pairs are allowed, but due to performance
24702    ///   considerations, only the first 10 will be used as a filter.
24703    pub filter: std::string::String,
24704
24705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24706}
24707
24708impl ListPartitionsRequest {
24709    pub fn new() -> Self {
24710        std::default::Default::default()
24711    }
24712
24713    /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
24714    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24715        self.parent = v.into();
24716        self
24717    }
24718
24719    /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
24720    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24721        self.page_size = v.into();
24722        self
24723    }
24724
24725    /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
24726    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24727        self.page_token = v.into();
24728        self
24729    }
24730
24731    /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
24732    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24733        self.filter = v.into();
24734        self
24735    }
24736}
24737
24738impl wkt::message::Message for ListPartitionsRequest {
24739    fn typename() -> &'static str {
24740        "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsRequest"
24741    }
24742}
24743
24744/// Create metadata partition request.
24745#[derive(Clone, Default, PartialEq)]
24746#[non_exhaustive]
24747pub struct CreatePartitionRequest {
24748    /// Required. The resource name of the parent zone:
24749    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
24750    pub parent: std::string::String,
24751
24752    /// Required. Partition resource.
24753    pub partition: std::option::Option<crate::model::Partition>,
24754
24755    /// Optional. Only validate the request, but do not perform mutations.
24756    /// The default is false.
24757    pub validate_only: bool,
24758
24759    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24760}
24761
24762impl CreatePartitionRequest {
24763    pub fn new() -> Self {
24764        std::default::Default::default()
24765    }
24766
24767    /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
24768    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24769        self.parent = v.into();
24770        self
24771    }
24772
24773    /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
24774    pub fn set_partition<T>(mut self, v: T) -> Self
24775    where
24776        T: std::convert::Into<crate::model::Partition>,
24777    {
24778        self.partition = std::option::Option::Some(v.into());
24779        self
24780    }
24781
24782    /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
24783    pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
24784    where
24785        T: std::convert::Into<crate::model::Partition>,
24786    {
24787        self.partition = v.map(|x| x.into());
24788        self
24789    }
24790
24791    /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
24792    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24793        self.validate_only = v.into();
24794        self
24795    }
24796}
24797
24798impl wkt::message::Message for CreatePartitionRequest {
24799    fn typename() -> &'static str {
24800        "type.googleapis.com/google.cloud.dataplex.v1.CreatePartitionRequest"
24801    }
24802}
24803
24804/// Delete metadata partition request.
24805#[derive(Clone, Default, PartialEq)]
24806#[non_exhaustive]
24807pub struct DeletePartitionRequest {
24808    /// Required. The resource name of the partition.
24809    /// format:
24810    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
24811    /// The {partition_value_path} segment consists of an ordered sequence of
24812    /// partition values separated by "/". All values must be provided.
24813    pub name: std::string::String,
24814
24815    /// Optional. The etag associated with the partition.
24816    #[deprecated]
24817    pub etag: std::string::String,
24818
24819    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24820}
24821
24822impl DeletePartitionRequest {
24823    pub fn new() -> Self {
24824        std::default::Default::default()
24825    }
24826
24827    /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
24828    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24829        self.name = v.into();
24830        self
24831    }
24832
24833    /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
24834    #[deprecated]
24835    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24836        self.etag = v.into();
24837        self
24838    }
24839}
24840
24841impl wkt::message::Message for DeletePartitionRequest {
24842    fn typename() -> &'static str {
24843        "type.googleapis.com/google.cloud.dataplex.v1.DeletePartitionRequest"
24844    }
24845}
24846
24847/// List metadata partitions response.
24848#[derive(Clone, Default, PartialEq)]
24849#[non_exhaustive]
24850pub struct ListPartitionsResponse {
24851    /// Partitions under the specified parent entity.
24852    pub partitions: std::vec::Vec<crate::model::Partition>,
24853
24854    /// Token to retrieve the next page of results, or empty if there are no
24855    /// remaining results in the list.
24856    pub next_page_token: std::string::String,
24857
24858    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24859}
24860
24861impl ListPartitionsResponse {
24862    pub fn new() -> Self {
24863        std::default::Default::default()
24864    }
24865
24866    /// Sets the value of [partitions][crate::model::ListPartitionsResponse::partitions].
24867    pub fn set_partitions<T, V>(mut self, v: T) -> Self
24868    where
24869        T: std::iter::IntoIterator<Item = V>,
24870        V: std::convert::Into<crate::model::Partition>,
24871    {
24872        use std::iter::Iterator;
24873        self.partitions = v.into_iter().map(|i| i.into()).collect();
24874        self
24875    }
24876
24877    /// Sets the value of [next_page_token][crate::model::ListPartitionsResponse::next_page_token].
24878    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24879        self.next_page_token = v.into();
24880        self
24881    }
24882}
24883
24884impl wkt::message::Message for ListPartitionsResponse {
24885    fn typename() -> &'static str {
24886        "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsResponse"
24887    }
24888}
24889
24890#[doc(hidden)]
24891impl gax::paginator::internal::PageableResponse for ListPartitionsResponse {
24892    type PageItem = crate::model::Partition;
24893
24894    fn items(self) -> std::vec::Vec<Self::PageItem> {
24895        self.partitions
24896    }
24897
24898    fn next_page_token(&self) -> std::string::String {
24899        use std::clone::Clone;
24900        self.next_page_token.clone()
24901    }
24902}
24903
24904/// Get metadata partition request.
24905#[derive(Clone, Default, PartialEq)]
24906#[non_exhaustive]
24907pub struct GetPartitionRequest {
24908    /// Required. The resource name of the partition:
24909    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
24910    /// The {partition_value_path} segment consists of an ordered sequence of
24911    /// partition values separated by "/". All values must be provided.
24912    pub name: std::string::String,
24913
24914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24915}
24916
24917impl GetPartitionRequest {
24918    pub fn new() -> Self {
24919        std::default::Default::default()
24920    }
24921
24922    /// Sets the value of [name][crate::model::GetPartitionRequest::name].
24923    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24924        self.name = v.into();
24925        self
24926    }
24927}
24928
24929impl wkt::message::Message for GetPartitionRequest {
24930    fn typename() -> &'static str {
24931        "type.googleapis.com/google.cloud.dataplex.v1.GetPartitionRequest"
24932    }
24933}
24934
24935/// Represents tables and fileset metadata contained within a zone.
24936#[derive(Clone, Default, PartialEq)]
24937#[non_exhaustive]
24938pub struct Entity {
24939    /// Output only. The resource name of the entity, of the form:
24940    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`.
24941    pub name: std::string::String,
24942
24943    /// Optional. Display name must be shorter than or equal to 256 characters.
24944    pub display_name: std::string::String,
24945
24946    /// Optional. User friendly longer description text. Must be shorter than or
24947    /// equal to 1024 characters.
24948    pub description: std::string::String,
24949
24950    /// Output only. The time when the entity was created.
24951    pub create_time: std::option::Option<wkt::Timestamp>,
24952
24953    /// Output only. The time when the entity was last updated.
24954    pub update_time: std::option::Option<wkt::Timestamp>,
24955
24956    /// Required. A user-provided entity ID. It is mutable, and will be used as the
24957    /// published table name. Specifying a new ID in an update entity
24958    /// request will override the existing value.
24959    /// The ID must contain only letters (a-z, A-Z), numbers (0-9), and
24960    /// underscores, and consist of 256 or fewer characters.
24961    pub id: std::string::String,
24962
24963    /// Optional. The etag associated with the entity, which can be retrieved with
24964    /// a [GetEntity][] request. Required for update and delete requests.
24965    pub etag: std::string::String,
24966
24967    /// Required. Immutable. The type of entity.
24968    pub r#type: crate::model::entity::Type,
24969
24970    /// Required. Immutable. The ID of the asset associated with the storage
24971    /// location containing the entity data. The entity must be with in the same
24972    /// zone with the asset.
24973    pub asset: std::string::String,
24974
24975    /// Required. Immutable. The storage path of the entity data.
24976    /// For Cloud Storage data, this is the fully-qualified path to the entity,
24977    /// such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of
24978    /// the table resource, such as
24979    /// `projects/project_id/datasets/dataset_id/tables/table_id`.
24980    pub data_path: std::string::String,
24981
24982    /// Optional. The set of items within the data path constituting the data in
24983    /// the entity, represented as a glob path. Example:
24984    /// `gs://bucket/path/to/data/**/*.csv`.
24985    pub data_path_pattern: std::string::String,
24986
24987    /// Output only. The name of the associated Data Catalog entry.
24988    pub catalog_entry: std::string::String,
24989
24990    /// Required. Immutable. Identifies the storage system of the entity data.
24991    pub system: crate::model::StorageSystem,
24992
24993    /// Required. Identifies the storage format of the entity data.
24994    /// It does not apply to entities with data stored in BigQuery.
24995    pub format: std::option::Option<crate::model::StorageFormat>,
24996
24997    /// Output only. Metadata stores that the entity is compatible with.
24998    pub compatibility: std::option::Option<crate::model::entity::CompatibilityStatus>,
24999
25000    /// Output only. Identifies the access mechanism to the entity. Not user
25001    /// settable.
25002    pub access: std::option::Option<crate::model::StorageAccess>,
25003
25004    /// Output only. System generated unique ID for the Entity. This ID will be
25005    /// different if the Entity is deleted and re-created with the same name.
25006    pub uid: std::string::String,
25007
25008    /// Required. The description of the data structure and layout.
25009    /// The schema is not included in list responses. It is only included in
25010    /// `SCHEMA` and `FULL` entity views of a `GetEntity` response.
25011    pub schema: std::option::Option<crate::model::Schema>,
25012
25013    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25014}
25015
25016impl Entity {
25017    pub fn new() -> Self {
25018        std::default::Default::default()
25019    }
25020
25021    /// Sets the value of [name][crate::model::Entity::name].
25022    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25023        self.name = v.into();
25024        self
25025    }
25026
25027    /// Sets the value of [display_name][crate::model::Entity::display_name].
25028    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25029        self.display_name = v.into();
25030        self
25031    }
25032
25033    /// Sets the value of [description][crate::model::Entity::description].
25034    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25035        self.description = v.into();
25036        self
25037    }
25038
25039    /// Sets the value of [create_time][crate::model::Entity::create_time].
25040    pub fn set_create_time<T>(mut self, v: T) -> Self
25041    where
25042        T: std::convert::Into<wkt::Timestamp>,
25043    {
25044        self.create_time = std::option::Option::Some(v.into());
25045        self
25046    }
25047
25048    /// Sets or clears the value of [create_time][crate::model::Entity::create_time].
25049    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
25050    where
25051        T: std::convert::Into<wkt::Timestamp>,
25052    {
25053        self.create_time = v.map(|x| x.into());
25054        self
25055    }
25056
25057    /// Sets the value of [update_time][crate::model::Entity::update_time].
25058    pub fn set_update_time<T>(mut self, v: T) -> Self
25059    where
25060        T: std::convert::Into<wkt::Timestamp>,
25061    {
25062        self.update_time = std::option::Option::Some(v.into());
25063        self
25064    }
25065
25066    /// Sets or clears the value of [update_time][crate::model::Entity::update_time].
25067    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
25068    where
25069        T: std::convert::Into<wkt::Timestamp>,
25070    {
25071        self.update_time = v.map(|x| x.into());
25072        self
25073    }
25074
25075    /// Sets the value of [id][crate::model::Entity::id].
25076    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25077        self.id = v.into();
25078        self
25079    }
25080
25081    /// Sets the value of [etag][crate::model::Entity::etag].
25082    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25083        self.etag = v.into();
25084        self
25085    }
25086
25087    /// Sets the value of [r#type][crate::model::Entity::type].
25088    pub fn set_type<T: std::convert::Into<crate::model::entity::Type>>(mut self, v: T) -> Self {
25089        self.r#type = v.into();
25090        self
25091    }
25092
25093    /// Sets the value of [asset][crate::model::Entity::asset].
25094    pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25095        self.asset = v.into();
25096        self
25097    }
25098
25099    /// Sets the value of [data_path][crate::model::Entity::data_path].
25100    pub fn set_data_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25101        self.data_path = v.into();
25102        self
25103    }
25104
25105    /// Sets the value of [data_path_pattern][crate::model::Entity::data_path_pattern].
25106    pub fn set_data_path_pattern<T: std::convert::Into<std::string::String>>(
25107        mut self,
25108        v: T,
25109    ) -> Self {
25110        self.data_path_pattern = v.into();
25111        self
25112    }
25113
25114    /// Sets the value of [catalog_entry][crate::model::Entity::catalog_entry].
25115    pub fn set_catalog_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25116        self.catalog_entry = v.into();
25117        self
25118    }
25119
25120    /// Sets the value of [system][crate::model::Entity::system].
25121    pub fn set_system<T: std::convert::Into<crate::model::StorageSystem>>(mut self, v: T) -> Self {
25122        self.system = v.into();
25123        self
25124    }
25125
25126    /// Sets the value of [format][crate::model::Entity::format].
25127    pub fn set_format<T>(mut self, v: T) -> Self
25128    where
25129        T: std::convert::Into<crate::model::StorageFormat>,
25130    {
25131        self.format = std::option::Option::Some(v.into());
25132        self
25133    }
25134
25135    /// Sets or clears the value of [format][crate::model::Entity::format].
25136    pub fn set_or_clear_format<T>(mut self, v: std::option::Option<T>) -> Self
25137    where
25138        T: std::convert::Into<crate::model::StorageFormat>,
25139    {
25140        self.format = v.map(|x| x.into());
25141        self
25142    }
25143
25144    /// Sets the value of [compatibility][crate::model::Entity::compatibility].
25145    pub fn set_compatibility<T>(mut self, v: T) -> Self
25146    where
25147        T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
25148    {
25149        self.compatibility = std::option::Option::Some(v.into());
25150        self
25151    }
25152
25153    /// Sets or clears the value of [compatibility][crate::model::Entity::compatibility].
25154    pub fn set_or_clear_compatibility<T>(mut self, v: std::option::Option<T>) -> Self
25155    where
25156        T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
25157    {
25158        self.compatibility = v.map(|x| x.into());
25159        self
25160    }
25161
25162    /// Sets the value of [access][crate::model::Entity::access].
25163    pub fn set_access<T>(mut self, v: T) -> Self
25164    where
25165        T: std::convert::Into<crate::model::StorageAccess>,
25166    {
25167        self.access = std::option::Option::Some(v.into());
25168        self
25169    }
25170
25171    /// Sets or clears the value of [access][crate::model::Entity::access].
25172    pub fn set_or_clear_access<T>(mut self, v: std::option::Option<T>) -> Self
25173    where
25174        T: std::convert::Into<crate::model::StorageAccess>,
25175    {
25176        self.access = v.map(|x| x.into());
25177        self
25178    }
25179
25180    /// Sets the value of [uid][crate::model::Entity::uid].
25181    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25182        self.uid = v.into();
25183        self
25184    }
25185
25186    /// Sets the value of [schema][crate::model::Entity::schema].
25187    pub fn set_schema<T>(mut self, v: T) -> Self
25188    where
25189        T: std::convert::Into<crate::model::Schema>,
25190    {
25191        self.schema = std::option::Option::Some(v.into());
25192        self
25193    }
25194
25195    /// Sets or clears the value of [schema][crate::model::Entity::schema].
25196    pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
25197    where
25198        T: std::convert::Into<crate::model::Schema>,
25199    {
25200        self.schema = v.map(|x| x.into());
25201        self
25202    }
25203}
25204
25205impl wkt::message::Message for Entity {
25206    fn typename() -> &'static str {
25207        "type.googleapis.com/google.cloud.dataplex.v1.Entity"
25208    }
25209}
25210
25211/// Defines additional types related to [Entity].
25212pub mod entity {
25213    #[allow(unused_imports)]
25214    use super::*;
25215
25216    /// Provides compatibility information for various metadata stores.
25217    #[derive(Clone, Default, PartialEq)]
25218    #[non_exhaustive]
25219    pub struct CompatibilityStatus {
25220        /// Output only. Whether this entity is compatible with Hive Metastore.
25221        pub hive_metastore:
25222            std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
25223
25224        /// Output only. Whether this entity is compatible with BigQuery.
25225        pub bigquery:
25226            std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
25227
25228        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25229    }
25230
25231    impl CompatibilityStatus {
25232        pub fn new() -> Self {
25233            std::default::Default::default()
25234        }
25235
25236        /// Sets the value of [hive_metastore][crate::model::entity::CompatibilityStatus::hive_metastore].
25237        pub fn set_hive_metastore<T>(mut self, v: T) -> Self
25238        where
25239            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25240        {
25241            self.hive_metastore = std::option::Option::Some(v.into());
25242            self
25243        }
25244
25245        /// Sets or clears the value of [hive_metastore][crate::model::entity::CompatibilityStatus::hive_metastore].
25246        pub fn set_or_clear_hive_metastore<T>(mut self, v: std::option::Option<T>) -> Self
25247        where
25248            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25249        {
25250            self.hive_metastore = v.map(|x| x.into());
25251            self
25252        }
25253
25254        /// Sets the value of [bigquery][crate::model::entity::CompatibilityStatus::bigquery].
25255        pub fn set_bigquery<T>(mut self, v: T) -> Self
25256        where
25257            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25258        {
25259            self.bigquery = std::option::Option::Some(v.into());
25260            self
25261        }
25262
25263        /// Sets or clears the value of [bigquery][crate::model::entity::CompatibilityStatus::bigquery].
25264        pub fn set_or_clear_bigquery<T>(mut self, v: std::option::Option<T>) -> Self
25265        where
25266            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25267        {
25268            self.bigquery = v.map(|x| x.into());
25269            self
25270        }
25271    }
25272
25273    impl wkt::message::Message for CompatibilityStatus {
25274        fn typename() -> &'static str {
25275            "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus"
25276        }
25277    }
25278
25279    /// Defines additional types related to [CompatibilityStatus].
25280    pub mod compatibility_status {
25281        #[allow(unused_imports)]
25282        use super::*;
25283
25284        /// Provides compatibility information for a specific metadata store.
25285        #[derive(Clone, Default, PartialEq)]
25286        #[non_exhaustive]
25287        pub struct Compatibility {
25288            /// Output only. Whether the entity is compatible and can be represented in
25289            /// the metadata store.
25290            pub compatible: bool,
25291
25292            /// Output only. Provides additional detail if the entity is incompatible
25293            /// with the metadata store.
25294            pub reason: std::string::String,
25295
25296            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25297        }
25298
25299        impl Compatibility {
25300            pub fn new() -> Self {
25301                std::default::Default::default()
25302            }
25303
25304            /// Sets the value of [compatible][crate::model::entity::compatibility_status::Compatibility::compatible].
25305            pub fn set_compatible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25306                self.compatible = v.into();
25307                self
25308            }
25309
25310            /// Sets the value of [reason][crate::model::entity::compatibility_status::Compatibility::reason].
25311            pub fn set_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25312                self.reason = v.into();
25313                self
25314            }
25315        }
25316
25317        impl wkt::message::Message for Compatibility {
25318            fn typename() -> &'static str {
25319                "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"
25320            }
25321        }
25322    }
25323
25324    /// The type of entity.
25325    ///
25326    /// # Working with unknown values
25327    ///
25328    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25329    /// additional enum variants at any time. Adding new variants is not considered
25330    /// a breaking change. Applications should write their code in anticipation of:
25331    ///
25332    /// - New values appearing in future releases of the client library, **and**
25333    /// - New values received dynamically, without application changes.
25334    ///
25335    /// Please consult the [Working with enums] section in the user guide for some
25336    /// guidelines.
25337    ///
25338    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25339    #[derive(Clone, Debug, PartialEq)]
25340    #[non_exhaustive]
25341    pub enum Type {
25342        /// Type unspecified.
25343        Unspecified,
25344        /// Structured and semi-structured data.
25345        Table,
25346        /// Unstructured data.
25347        Fileset,
25348        /// If set, the enum was initialized with an unknown value.
25349        ///
25350        /// Applications can examine the value using [Type::value] or
25351        /// [Type::name].
25352        UnknownValue(r#type::UnknownValue),
25353    }
25354
25355    #[doc(hidden)]
25356    pub mod r#type {
25357        #[allow(unused_imports)]
25358        use super::*;
25359        #[derive(Clone, Debug, PartialEq)]
25360        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25361    }
25362
25363    impl Type {
25364        /// Gets the enum value.
25365        ///
25366        /// Returns `None` if the enum contains an unknown value deserialized from
25367        /// the string representation of enums.
25368        pub fn value(&self) -> std::option::Option<i32> {
25369            match self {
25370                Self::Unspecified => std::option::Option::Some(0),
25371                Self::Table => std::option::Option::Some(1),
25372                Self::Fileset => std::option::Option::Some(2),
25373                Self::UnknownValue(u) => u.0.value(),
25374            }
25375        }
25376
25377        /// Gets the enum value as a string.
25378        ///
25379        /// Returns `None` if the enum contains an unknown value deserialized from
25380        /// the integer representation of enums.
25381        pub fn name(&self) -> std::option::Option<&str> {
25382            match self {
25383                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
25384                Self::Table => std::option::Option::Some("TABLE"),
25385                Self::Fileset => std::option::Option::Some("FILESET"),
25386                Self::UnknownValue(u) => u.0.name(),
25387            }
25388        }
25389    }
25390
25391    impl std::default::Default for Type {
25392        fn default() -> Self {
25393            use std::convert::From;
25394            Self::from(0)
25395        }
25396    }
25397
25398    impl std::fmt::Display for Type {
25399        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25400            wkt::internal::display_enum(f, self.name(), self.value())
25401        }
25402    }
25403
25404    impl std::convert::From<i32> for Type {
25405        fn from(value: i32) -> Self {
25406            match value {
25407                0 => Self::Unspecified,
25408                1 => Self::Table,
25409                2 => Self::Fileset,
25410                _ => Self::UnknownValue(r#type::UnknownValue(
25411                    wkt::internal::UnknownEnumValue::Integer(value),
25412                )),
25413            }
25414        }
25415    }
25416
25417    impl std::convert::From<&str> for Type {
25418        fn from(value: &str) -> Self {
25419            use std::string::ToString;
25420            match value {
25421                "TYPE_UNSPECIFIED" => Self::Unspecified,
25422                "TABLE" => Self::Table,
25423                "FILESET" => Self::Fileset,
25424                _ => Self::UnknownValue(r#type::UnknownValue(
25425                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25426                )),
25427            }
25428        }
25429    }
25430
25431    impl serde::ser::Serialize for Type {
25432        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25433        where
25434            S: serde::Serializer,
25435        {
25436            match self {
25437                Self::Unspecified => serializer.serialize_i32(0),
25438                Self::Table => serializer.serialize_i32(1),
25439                Self::Fileset => serializer.serialize_i32(2),
25440                Self::UnknownValue(u) => u.0.serialize(serializer),
25441            }
25442        }
25443    }
25444
25445    impl<'de> serde::de::Deserialize<'de> for Type {
25446        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25447        where
25448            D: serde::Deserializer<'de>,
25449        {
25450            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
25451                ".google.cloud.dataplex.v1.Entity.Type",
25452            ))
25453        }
25454    }
25455}
25456
25457/// Represents partition metadata contained within entity instances.
25458#[derive(Clone, Default, PartialEq)]
25459#[non_exhaustive]
25460pub struct Partition {
25461    /// Output only. Partition values used in the HTTP URL must be
25462    /// double encoded. For example, `url_encode(url_encode(value))` can be used
25463    /// to encode "US:CA/CA#Sunnyvale so that the request URL ends
25464    /// with "/partitions/US%253ACA/CA%2523Sunnyvale".
25465    /// The name field in the response retains the encoded format.
25466    pub name: std::string::String,
25467
25468    /// Required. Immutable. The set of values representing the partition, which
25469    /// correspond to the partition schema defined in the parent entity.
25470    pub values: std::vec::Vec<std::string::String>,
25471
25472    /// Required. Immutable. The location of the entity data within the partition,
25473    /// for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or
25474    /// `projects/<project_id>/datasets/<dataset_id>/tables/<table_id>`
25475    pub location: std::string::String,
25476
25477    /// Optional. The etag for this partition.
25478    #[deprecated]
25479    pub etag: std::string::String,
25480
25481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25482}
25483
25484impl Partition {
25485    pub fn new() -> Self {
25486        std::default::Default::default()
25487    }
25488
25489    /// Sets the value of [name][crate::model::Partition::name].
25490    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25491        self.name = v.into();
25492        self
25493    }
25494
25495    /// Sets the value of [values][crate::model::Partition::values].
25496    pub fn set_values<T, V>(mut self, v: T) -> Self
25497    where
25498        T: std::iter::IntoIterator<Item = V>,
25499        V: std::convert::Into<std::string::String>,
25500    {
25501        use std::iter::Iterator;
25502        self.values = v.into_iter().map(|i| i.into()).collect();
25503        self
25504    }
25505
25506    /// Sets the value of [location][crate::model::Partition::location].
25507    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25508        self.location = v.into();
25509        self
25510    }
25511
25512    /// Sets the value of [etag][crate::model::Partition::etag].
25513    #[deprecated]
25514    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25515        self.etag = v.into();
25516        self
25517    }
25518}
25519
25520impl wkt::message::Message for Partition {
25521    fn typename() -> &'static str {
25522        "type.googleapis.com/google.cloud.dataplex.v1.Partition"
25523    }
25524}
25525
25526/// Schema information describing the structure and layout of the data.
25527#[derive(Clone, Default, PartialEq)]
25528#[non_exhaustive]
25529pub struct Schema {
25530    /// Required. Set to `true` if user-managed or `false` if managed by Dataplex
25531    /// Universal Catalog. The default is `false` (managed by Dataplex Universal
25532    /// Catalog).
25533    ///
25534    /// - Set to `false`to enable Dataplex Universal Catalog discovery to update
25535    ///   the schema.
25536    ///   including new data discovery, schema inference, and schema evolution.
25537    ///   Users retain the ability to input and edit the schema. Dataplex Universal
25538    ///   Catalog treats schema input by the user as though produced by a previous
25539    ///   Dataplex Universal Catalog discovery operation, and it will evolve the
25540    ///   schema and take action based on that treatment.
25541    ///
25542    /// - Set to `true` to fully manage the entity
25543    ///   schema. This setting guarantees that Dataplex Universal Catalog will not
25544    ///   change schema fields.
25545    ///
25546    pub user_managed: bool,
25547
25548    /// Optional. The sequence of fields describing data in table entities.
25549    /// **Note:** BigQuery SchemaFields are immutable.
25550    pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
25551
25552    /// Optional. The sequence of fields describing the partition structure in
25553    /// entities. If this field is empty, there are no partitions within the data.
25554    pub partition_fields: std::vec::Vec<crate::model::schema::PartitionField>,
25555
25556    /// Optional. The structure of paths containing partition data within the
25557    /// entity.
25558    pub partition_style: crate::model::schema::PartitionStyle,
25559
25560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25561}
25562
25563impl Schema {
25564    pub fn new() -> Self {
25565        std::default::Default::default()
25566    }
25567
25568    /// Sets the value of [user_managed][crate::model::Schema::user_managed].
25569    pub fn set_user_managed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25570        self.user_managed = v.into();
25571        self
25572    }
25573
25574    /// Sets the value of [fields][crate::model::Schema::fields].
25575    pub fn set_fields<T, V>(mut self, v: T) -> Self
25576    where
25577        T: std::iter::IntoIterator<Item = V>,
25578        V: std::convert::Into<crate::model::schema::SchemaField>,
25579    {
25580        use std::iter::Iterator;
25581        self.fields = v.into_iter().map(|i| i.into()).collect();
25582        self
25583    }
25584
25585    /// Sets the value of [partition_fields][crate::model::Schema::partition_fields].
25586    pub fn set_partition_fields<T, V>(mut self, v: T) -> Self
25587    where
25588        T: std::iter::IntoIterator<Item = V>,
25589        V: std::convert::Into<crate::model::schema::PartitionField>,
25590    {
25591        use std::iter::Iterator;
25592        self.partition_fields = v.into_iter().map(|i| i.into()).collect();
25593        self
25594    }
25595
25596    /// Sets the value of [partition_style][crate::model::Schema::partition_style].
25597    pub fn set_partition_style<T: std::convert::Into<crate::model::schema::PartitionStyle>>(
25598        mut self,
25599        v: T,
25600    ) -> Self {
25601        self.partition_style = v.into();
25602        self
25603    }
25604}
25605
25606impl wkt::message::Message for Schema {
25607    fn typename() -> &'static str {
25608        "type.googleapis.com/google.cloud.dataplex.v1.Schema"
25609    }
25610}
25611
25612/// Defines additional types related to [Schema].
25613pub mod schema {
25614    #[allow(unused_imports)]
25615    use super::*;
25616
25617    /// Represents a column field within a table schema.
25618    #[derive(Clone, Default, PartialEq)]
25619    #[non_exhaustive]
25620    pub struct SchemaField {
25621        /// Required. The name of the field. Must contain only letters, numbers and
25622        /// underscores, with a maximum length of 767 characters,
25623        /// and must begin with a letter or underscore.
25624        pub name: std::string::String,
25625
25626        /// Optional. User friendly field description. Must be less than or equal to
25627        /// 1024 characters.
25628        pub description: std::string::String,
25629
25630        /// Required. The type of field.
25631        pub r#type: crate::model::schema::Type,
25632
25633        /// Required. Additional field semantics.
25634        pub mode: crate::model::schema::Mode,
25635
25636        /// Optional. Any nested field for complex types.
25637        pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
25638
25639        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25640    }
25641
25642    impl SchemaField {
25643        pub fn new() -> Self {
25644            std::default::Default::default()
25645        }
25646
25647        /// Sets the value of [name][crate::model::schema::SchemaField::name].
25648        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25649            self.name = v.into();
25650            self
25651        }
25652
25653        /// Sets the value of [description][crate::model::schema::SchemaField::description].
25654        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25655            self.description = v.into();
25656            self
25657        }
25658
25659        /// Sets the value of [r#type][crate::model::schema::SchemaField::type].
25660        pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
25661            self.r#type = v.into();
25662            self
25663        }
25664
25665        /// Sets the value of [mode][crate::model::schema::SchemaField::mode].
25666        pub fn set_mode<T: std::convert::Into<crate::model::schema::Mode>>(mut self, v: T) -> Self {
25667            self.mode = v.into();
25668            self
25669        }
25670
25671        /// Sets the value of [fields][crate::model::schema::SchemaField::fields].
25672        pub fn set_fields<T, V>(mut self, v: T) -> Self
25673        where
25674            T: std::iter::IntoIterator<Item = V>,
25675            V: std::convert::Into<crate::model::schema::SchemaField>,
25676        {
25677            use std::iter::Iterator;
25678            self.fields = v.into_iter().map(|i| i.into()).collect();
25679            self
25680        }
25681    }
25682
25683    impl wkt::message::Message for SchemaField {
25684        fn typename() -> &'static str {
25685            "type.googleapis.com/google.cloud.dataplex.v1.Schema.SchemaField"
25686        }
25687    }
25688
25689    /// Represents a key field within the entity's partition structure. You could
25690    /// have up to 20 partition fields, but only the first 10 partitions have the
25691    /// filtering ability due to performance consideration. **Note:**
25692    /// Partition fields are immutable.
25693    #[derive(Clone, Default, PartialEq)]
25694    #[non_exhaustive]
25695    pub struct PartitionField {
25696        /// Required. Partition field name must consist of letters, numbers, and
25697        /// underscores only, with a maximum of length of 256 characters, and must
25698        /// begin with a letter or underscore..
25699        pub name: std::string::String,
25700
25701        /// Required. Immutable. The type of field.
25702        pub r#type: crate::model::schema::Type,
25703
25704        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25705    }
25706
25707    impl PartitionField {
25708        pub fn new() -> Self {
25709            std::default::Default::default()
25710        }
25711
25712        /// Sets the value of [name][crate::model::schema::PartitionField::name].
25713        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25714            self.name = v.into();
25715            self
25716        }
25717
25718        /// Sets the value of [r#type][crate::model::schema::PartitionField::type].
25719        pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
25720            self.r#type = v.into();
25721            self
25722        }
25723    }
25724
25725    impl wkt::message::Message for PartitionField {
25726        fn typename() -> &'static str {
25727            "type.googleapis.com/google.cloud.dataplex.v1.Schema.PartitionField"
25728        }
25729    }
25730
25731    /// Type information for fields in schemas and partition schemas.
25732    ///
25733    /// # Working with unknown values
25734    ///
25735    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25736    /// additional enum variants at any time. Adding new variants is not considered
25737    /// a breaking change. Applications should write their code in anticipation of:
25738    ///
25739    /// - New values appearing in future releases of the client library, **and**
25740    /// - New values received dynamically, without application changes.
25741    ///
25742    /// Please consult the [Working with enums] section in the user guide for some
25743    /// guidelines.
25744    ///
25745    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25746    #[derive(Clone, Debug, PartialEq)]
25747    #[non_exhaustive]
25748    pub enum Type {
25749        /// SchemaType unspecified.
25750        Unspecified,
25751        /// Boolean field.
25752        Boolean,
25753        /// Single byte numeric field.
25754        Byte,
25755        /// 16-bit numeric field.
25756        Int16,
25757        /// 32-bit numeric field.
25758        Int32,
25759        /// 64-bit numeric field.
25760        Int64,
25761        /// Floating point numeric field.
25762        Float,
25763        /// Double precision numeric field.
25764        Double,
25765        /// Real value numeric field.
25766        Decimal,
25767        /// Sequence of characters field.
25768        String,
25769        /// Sequence of bytes field.
25770        Binary,
25771        /// Date and time field.
25772        Timestamp,
25773        /// Date field.
25774        Date,
25775        /// Time field.
25776        Time,
25777        /// Structured field. Nested fields that define the structure of the map.
25778        /// If all nested fields are nullable, this field represents a union.
25779        Record,
25780        /// Null field that does not have values.
25781        Null,
25782        /// If set, the enum was initialized with an unknown value.
25783        ///
25784        /// Applications can examine the value using [Type::value] or
25785        /// [Type::name].
25786        UnknownValue(r#type::UnknownValue),
25787    }
25788
25789    #[doc(hidden)]
25790    pub mod r#type {
25791        #[allow(unused_imports)]
25792        use super::*;
25793        #[derive(Clone, Debug, PartialEq)]
25794        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25795    }
25796
25797    impl Type {
25798        /// Gets the enum value.
25799        ///
25800        /// Returns `None` if the enum contains an unknown value deserialized from
25801        /// the string representation of enums.
25802        pub fn value(&self) -> std::option::Option<i32> {
25803            match self {
25804                Self::Unspecified => std::option::Option::Some(0),
25805                Self::Boolean => std::option::Option::Some(1),
25806                Self::Byte => std::option::Option::Some(2),
25807                Self::Int16 => std::option::Option::Some(3),
25808                Self::Int32 => std::option::Option::Some(4),
25809                Self::Int64 => std::option::Option::Some(5),
25810                Self::Float => std::option::Option::Some(6),
25811                Self::Double => std::option::Option::Some(7),
25812                Self::Decimal => std::option::Option::Some(8),
25813                Self::String => std::option::Option::Some(9),
25814                Self::Binary => std::option::Option::Some(10),
25815                Self::Timestamp => std::option::Option::Some(11),
25816                Self::Date => std::option::Option::Some(12),
25817                Self::Time => std::option::Option::Some(13),
25818                Self::Record => std::option::Option::Some(14),
25819                Self::Null => std::option::Option::Some(100),
25820                Self::UnknownValue(u) => u.0.value(),
25821            }
25822        }
25823
25824        /// Gets the enum value as a string.
25825        ///
25826        /// Returns `None` if the enum contains an unknown value deserialized from
25827        /// the integer representation of enums.
25828        pub fn name(&self) -> std::option::Option<&str> {
25829            match self {
25830                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
25831                Self::Boolean => std::option::Option::Some("BOOLEAN"),
25832                Self::Byte => std::option::Option::Some("BYTE"),
25833                Self::Int16 => std::option::Option::Some("INT16"),
25834                Self::Int32 => std::option::Option::Some("INT32"),
25835                Self::Int64 => std::option::Option::Some("INT64"),
25836                Self::Float => std::option::Option::Some("FLOAT"),
25837                Self::Double => std::option::Option::Some("DOUBLE"),
25838                Self::Decimal => std::option::Option::Some("DECIMAL"),
25839                Self::String => std::option::Option::Some("STRING"),
25840                Self::Binary => std::option::Option::Some("BINARY"),
25841                Self::Timestamp => std::option::Option::Some("TIMESTAMP"),
25842                Self::Date => std::option::Option::Some("DATE"),
25843                Self::Time => std::option::Option::Some("TIME"),
25844                Self::Record => std::option::Option::Some("RECORD"),
25845                Self::Null => std::option::Option::Some("NULL"),
25846                Self::UnknownValue(u) => u.0.name(),
25847            }
25848        }
25849    }
25850
25851    impl std::default::Default for Type {
25852        fn default() -> Self {
25853            use std::convert::From;
25854            Self::from(0)
25855        }
25856    }
25857
25858    impl std::fmt::Display for Type {
25859        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25860            wkt::internal::display_enum(f, self.name(), self.value())
25861        }
25862    }
25863
25864    impl std::convert::From<i32> for Type {
25865        fn from(value: i32) -> Self {
25866            match value {
25867                0 => Self::Unspecified,
25868                1 => Self::Boolean,
25869                2 => Self::Byte,
25870                3 => Self::Int16,
25871                4 => Self::Int32,
25872                5 => Self::Int64,
25873                6 => Self::Float,
25874                7 => Self::Double,
25875                8 => Self::Decimal,
25876                9 => Self::String,
25877                10 => Self::Binary,
25878                11 => Self::Timestamp,
25879                12 => Self::Date,
25880                13 => Self::Time,
25881                14 => Self::Record,
25882                100 => Self::Null,
25883                _ => Self::UnknownValue(r#type::UnknownValue(
25884                    wkt::internal::UnknownEnumValue::Integer(value),
25885                )),
25886            }
25887        }
25888    }
25889
25890    impl std::convert::From<&str> for Type {
25891        fn from(value: &str) -> Self {
25892            use std::string::ToString;
25893            match value {
25894                "TYPE_UNSPECIFIED" => Self::Unspecified,
25895                "BOOLEAN" => Self::Boolean,
25896                "BYTE" => Self::Byte,
25897                "INT16" => Self::Int16,
25898                "INT32" => Self::Int32,
25899                "INT64" => Self::Int64,
25900                "FLOAT" => Self::Float,
25901                "DOUBLE" => Self::Double,
25902                "DECIMAL" => Self::Decimal,
25903                "STRING" => Self::String,
25904                "BINARY" => Self::Binary,
25905                "TIMESTAMP" => Self::Timestamp,
25906                "DATE" => Self::Date,
25907                "TIME" => Self::Time,
25908                "RECORD" => Self::Record,
25909                "NULL" => Self::Null,
25910                _ => Self::UnknownValue(r#type::UnknownValue(
25911                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25912                )),
25913            }
25914        }
25915    }
25916
25917    impl serde::ser::Serialize for Type {
25918        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25919        where
25920            S: serde::Serializer,
25921        {
25922            match self {
25923                Self::Unspecified => serializer.serialize_i32(0),
25924                Self::Boolean => serializer.serialize_i32(1),
25925                Self::Byte => serializer.serialize_i32(2),
25926                Self::Int16 => serializer.serialize_i32(3),
25927                Self::Int32 => serializer.serialize_i32(4),
25928                Self::Int64 => serializer.serialize_i32(5),
25929                Self::Float => serializer.serialize_i32(6),
25930                Self::Double => serializer.serialize_i32(7),
25931                Self::Decimal => serializer.serialize_i32(8),
25932                Self::String => serializer.serialize_i32(9),
25933                Self::Binary => serializer.serialize_i32(10),
25934                Self::Timestamp => serializer.serialize_i32(11),
25935                Self::Date => serializer.serialize_i32(12),
25936                Self::Time => serializer.serialize_i32(13),
25937                Self::Record => serializer.serialize_i32(14),
25938                Self::Null => serializer.serialize_i32(100),
25939                Self::UnknownValue(u) => u.0.serialize(serializer),
25940            }
25941        }
25942    }
25943
25944    impl<'de> serde::de::Deserialize<'de> for Type {
25945        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25946        where
25947            D: serde::Deserializer<'de>,
25948        {
25949            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
25950                ".google.cloud.dataplex.v1.Schema.Type",
25951            ))
25952        }
25953    }
25954
25955    /// Additional qualifiers to define field semantics.
25956    ///
25957    /// # Working with unknown values
25958    ///
25959    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25960    /// additional enum variants at any time. Adding new variants is not considered
25961    /// a breaking change. Applications should write their code in anticipation of:
25962    ///
25963    /// - New values appearing in future releases of the client library, **and**
25964    /// - New values received dynamically, without application changes.
25965    ///
25966    /// Please consult the [Working with enums] section in the user guide for some
25967    /// guidelines.
25968    ///
25969    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25970    #[derive(Clone, Debug, PartialEq)]
25971    #[non_exhaustive]
25972    pub enum Mode {
25973        /// Mode unspecified.
25974        Unspecified,
25975        /// The field has required semantics.
25976        Required,
25977        /// The field has optional semantics, and may be null.
25978        Nullable,
25979        /// The field has repeated (0 or more) semantics, and is a list of values.
25980        Repeated,
25981        /// If set, the enum was initialized with an unknown value.
25982        ///
25983        /// Applications can examine the value using [Mode::value] or
25984        /// [Mode::name].
25985        UnknownValue(mode::UnknownValue),
25986    }
25987
25988    #[doc(hidden)]
25989    pub mod mode {
25990        #[allow(unused_imports)]
25991        use super::*;
25992        #[derive(Clone, Debug, PartialEq)]
25993        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25994    }
25995
25996    impl Mode {
25997        /// Gets the enum value.
25998        ///
25999        /// Returns `None` if the enum contains an unknown value deserialized from
26000        /// the string representation of enums.
26001        pub fn value(&self) -> std::option::Option<i32> {
26002            match self {
26003                Self::Unspecified => std::option::Option::Some(0),
26004                Self::Required => std::option::Option::Some(1),
26005                Self::Nullable => std::option::Option::Some(2),
26006                Self::Repeated => std::option::Option::Some(3),
26007                Self::UnknownValue(u) => u.0.value(),
26008            }
26009        }
26010
26011        /// Gets the enum value as a string.
26012        ///
26013        /// Returns `None` if the enum contains an unknown value deserialized from
26014        /// the integer representation of enums.
26015        pub fn name(&self) -> std::option::Option<&str> {
26016            match self {
26017                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
26018                Self::Required => std::option::Option::Some("REQUIRED"),
26019                Self::Nullable => std::option::Option::Some("NULLABLE"),
26020                Self::Repeated => std::option::Option::Some("REPEATED"),
26021                Self::UnknownValue(u) => u.0.name(),
26022            }
26023        }
26024    }
26025
26026    impl std::default::Default for Mode {
26027        fn default() -> Self {
26028            use std::convert::From;
26029            Self::from(0)
26030        }
26031    }
26032
26033    impl std::fmt::Display for Mode {
26034        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26035            wkt::internal::display_enum(f, self.name(), self.value())
26036        }
26037    }
26038
26039    impl std::convert::From<i32> for Mode {
26040        fn from(value: i32) -> Self {
26041            match value {
26042                0 => Self::Unspecified,
26043                1 => Self::Required,
26044                2 => Self::Nullable,
26045                3 => Self::Repeated,
26046                _ => Self::UnknownValue(mode::UnknownValue(
26047                    wkt::internal::UnknownEnumValue::Integer(value),
26048                )),
26049            }
26050        }
26051    }
26052
26053    impl std::convert::From<&str> for Mode {
26054        fn from(value: &str) -> Self {
26055            use std::string::ToString;
26056            match value {
26057                "MODE_UNSPECIFIED" => Self::Unspecified,
26058                "REQUIRED" => Self::Required,
26059                "NULLABLE" => Self::Nullable,
26060                "REPEATED" => Self::Repeated,
26061                _ => Self::UnknownValue(mode::UnknownValue(
26062                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26063                )),
26064            }
26065        }
26066    }
26067
26068    impl serde::ser::Serialize for Mode {
26069        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26070        where
26071            S: serde::Serializer,
26072        {
26073            match self {
26074                Self::Unspecified => serializer.serialize_i32(0),
26075                Self::Required => serializer.serialize_i32(1),
26076                Self::Nullable => serializer.serialize_i32(2),
26077                Self::Repeated => serializer.serialize_i32(3),
26078                Self::UnknownValue(u) => u.0.serialize(serializer),
26079            }
26080        }
26081    }
26082
26083    impl<'de> serde::de::Deserialize<'de> for Mode {
26084        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26085        where
26086            D: serde::Deserializer<'de>,
26087        {
26088            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
26089                ".google.cloud.dataplex.v1.Schema.Mode",
26090            ))
26091        }
26092    }
26093
26094    /// The structure of paths within the entity, which represent partitions.
26095    ///
26096    /// # Working with unknown values
26097    ///
26098    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26099    /// additional enum variants at any time. Adding new variants is not considered
26100    /// a breaking change. Applications should write their code in anticipation of:
26101    ///
26102    /// - New values appearing in future releases of the client library, **and**
26103    /// - New values received dynamically, without application changes.
26104    ///
26105    /// Please consult the [Working with enums] section in the user guide for some
26106    /// guidelines.
26107    ///
26108    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26109    #[derive(Clone, Debug, PartialEq)]
26110    #[non_exhaustive]
26111    pub enum PartitionStyle {
26112        /// PartitionStyle unspecified
26113        Unspecified,
26114        /// Partitions are hive-compatible.
26115        /// Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
26116        /// `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
26117        HiveCompatible,
26118        /// If set, the enum was initialized with an unknown value.
26119        ///
26120        /// Applications can examine the value using [PartitionStyle::value] or
26121        /// [PartitionStyle::name].
26122        UnknownValue(partition_style::UnknownValue),
26123    }
26124
26125    #[doc(hidden)]
26126    pub mod partition_style {
26127        #[allow(unused_imports)]
26128        use super::*;
26129        #[derive(Clone, Debug, PartialEq)]
26130        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26131    }
26132
26133    impl PartitionStyle {
26134        /// Gets the enum value.
26135        ///
26136        /// Returns `None` if the enum contains an unknown value deserialized from
26137        /// the string representation of enums.
26138        pub fn value(&self) -> std::option::Option<i32> {
26139            match self {
26140                Self::Unspecified => std::option::Option::Some(0),
26141                Self::HiveCompatible => std::option::Option::Some(1),
26142                Self::UnknownValue(u) => u.0.value(),
26143            }
26144        }
26145
26146        /// Gets the enum value as a string.
26147        ///
26148        /// Returns `None` if the enum contains an unknown value deserialized from
26149        /// the integer representation of enums.
26150        pub fn name(&self) -> std::option::Option<&str> {
26151            match self {
26152                Self::Unspecified => std::option::Option::Some("PARTITION_STYLE_UNSPECIFIED"),
26153                Self::HiveCompatible => std::option::Option::Some("HIVE_COMPATIBLE"),
26154                Self::UnknownValue(u) => u.0.name(),
26155            }
26156        }
26157    }
26158
26159    impl std::default::Default for PartitionStyle {
26160        fn default() -> Self {
26161            use std::convert::From;
26162            Self::from(0)
26163        }
26164    }
26165
26166    impl std::fmt::Display for PartitionStyle {
26167        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26168            wkt::internal::display_enum(f, self.name(), self.value())
26169        }
26170    }
26171
26172    impl std::convert::From<i32> for PartitionStyle {
26173        fn from(value: i32) -> Self {
26174            match value {
26175                0 => Self::Unspecified,
26176                1 => Self::HiveCompatible,
26177                _ => Self::UnknownValue(partition_style::UnknownValue(
26178                    wkt::internal::UnknownEnumValue::Integer(value),
26179                )),
26180            }
26181        }
26182    }
26183
26184    impl std::convert::From<&str> for PartitionStyle {
26185        fn from(value: &str) -> Self {
26186            use std::string::ToString;
26187            match value {
26188                "PARTITION_STYLE_UNSPECIFIED" => Self::Unspecified,
26189                "HIVE_COMPATIBLE" => Self::HiveCompatible,
26190                _ => Self::UnknownValue(partition_style::UnknownValue(
26191                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26192                )),
26193            }
26194        }
26195    }
26196
26197    impl serde::ser::Serialize for PartitionStyle {
26198        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26199        where
26200            S: serde::Serializer,
26201        {
26202            match self {
26203                Self::Unspecified => serializer.serialize_i32(0),
26204                Self::HiveCompatible => serializer.serialize_i32(1),
26205                Self::UnknownValue(u) => u.0.serialize(serializer),
26206            }
26207        }
26208    }
26209
26210    impl<'de> serde::de::Deserialize<'de> for PartitionStyle {
26211        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26212        where
26213            D: serde::Deserializer<'de>,
26214        {
26215            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStyle>::new(
26216                ".google.cloud.dataplex.v1.Schema.PartitionStyle",
26217            ))
26218        }
26219    }
26220}
26221
26222/// Describes the format of the data within its storage location.
26223#[derive(Clone, Default, PartialEq)]
26224#[non_exhaustive]
26225pub struct StorageFormat {
26226    /// Output only. The data format associated with the stored data, which
26227    /// represents content type values. The value is inferred from mime type.
26228    pub format: crate::model::storage_format::Format,
26229
26230    /// Optional. The compression type associated with the stored data.
26231    /// If unspecified, the data is uncompressed.
26232    pub compression_format: crate::model::storage_format::CompressionFormat,
26233
26234    /// Required. The mime type descriptor for the data. Must match the pattern
26235    /// {type}/{subtype}. Supported values:
26236    ///
26237    /// - application/x-parquet
26238    /// - application/x-avro
26239    /// - application/x-orc
26240    /// - application/x-tfrecord
26241    /// - application/x-parquet+iceberg
26242    /// - application/x-avro+iceberg
26243    /// - application/x-orc+iceberg
26244    /// - application/json
26245    /// - application/{subtypes}
26246    /// - text/csv
26247    /// - text/\<subtypes\>
26248    /// - image/{image subtype}
26249    /// - video/{video subtype}
26250    /// - audio/{audio subtype}
26251    pub mime_type: std::string::String,
26252
26253    /// Additional format-specific options.
26254    pub options: std::option::Option<crate::model::storage_format::Options>,
26255
26256    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26257}
26258
26259impl StorageFormat {
26260    pub fn new() -> Self {
26261        std::default::Default::default()
26262    }
26263
26264    /// Sets the value of [format][crate::model::StorageFormat::format].
26265    pub fn set_format<T: std::convert::Into<crate::model::storage_format::Format>>(
26266        mut self,
26267        v: T,
26268    ) -> Self {
26269        self.format = v.into();
26270        self
26271    }
26272
26273    /// Sets the value of [compression_format][crate::model::StorageFormat::compression_format].
26274    pub fn set_compression_format<
26275        T: std::convert::Into<crate::model::storage_format::CompressionFormat>,
26276    >(
26277        mut self,
26278        v: T,
26279    ) -> Self {
26280        self.compression_format = v.into();
26281        self
26282    }
26283
26284    /// Sets the value of [mime_type][crate::model::StorageFormat::mime_type].
26285    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26286        self.mime_type = v.into();
26287        self
26288    }
26289
26290    /// Sets the value of [options][crate::model::StorageFormat::options].
26291    ///
26292    /// Note that all the setters affecting `options` are mutually
26293    /// exclusive.
26294    pub fn set_options<
26295        T: std::convert::Into<std::option::Option<crate::model::storage_format::Options>>,
26296    >(
26297        mut self,
26298        v: T,
26299    ) -> Self {
26300        self.options = v.into();
26301        self
26302    }
26303
26304    /// The value of [options][crate::model::StorageFormat::options]
26305    /// if it holds a `Csv`, `None` if the field is not set or
26306    /// holds a different branch.
26307    pub fn csv(
26308        &self,
26309    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::CsvOptions>> {
26310        #[allow(unreachable_patterns)]
26311        self.options.as_ref().and_then(|v| match v {
26312            crate::model::storage_format::Options::Csv(v) => std::option::Option::Some(v),
26313            _ => std::option::Option::None,
26314        })
26315    }
26316
26317    /// Sets the value of [options][crate::model::StorageFormat::options]
26318    /// to hold a `Csv`.
26319    ///
26320    /// Note that all the setters affecting `options` are
26321    /// mutually exclusive.
26322    pub fn set_csv<
26323        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::CsvOptions>>,
26324    >(
26325        mut self,
26326        v: T,
26327    ) -> Self {
26328        self.options =
26329            std::option::Option::Some(crate::model::storage_format::Options::Csv(v.into()));
26330        self
26331    }
26332
26333    /// The value of [options][crate::model::StorageFormat::options]
26334    /// if it holds a `Json`, `None` if the field is not set or
26335    /// holds a different branch.
26336    pub fn json(
26337        &self,
26338    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::JsonOptions>> {
26339        #[allow(unreachable_patterns)]
26340        self.options.as_ref().and_then(|v| match v {
26341            crate::model::storage_format::Options::Json(v) => std::option::Option::Some(v),
26342            _ => std::option::Option::None,
26343        })
26344    }
26345
26346    /// Sets the value of [options][crate::model::StorageFormat::options]
26347    /// to hold a `Json`.
26348    ///
26349    /// Note that all the setters affecting `options` are
26350    /// mutually exclusive.
26351    pub fn set_json<
26352        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::JsonOptions>>,
26353    >(
26354        mut self,
26355        v: T,
26356    ) -> Self {
26357        self.options =
26358            std::option::Option::Some(crate::model::storage_format::Options::Json(v.into()));
26359        self
26360    }
26361
26362    /// The value of [options][crate::model::StorageFormat::options]
26363    /// if it holds a `Iceberg`, `None` if the field is not set or
26364    /// holds a different branch.
26365    pub fn iceberg(
26366        &self,
26367    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::IcebergOptions>> {
26368        #[allow(unreachable_patterns)]
26369        self.options.as_ref().and_then(|v| match v {
26370            crate::model::storage_format::Options::Iceberg(v) => std::option::Option::Some(v),
26371            _ => std::option::Option::None,
26372        })
26373    }
26374
26375    /// Sets the value of [options][crate::model::StorageFormat::options]
26376    /// to hold a `Iceberg`.
26377    ///
26378    /// Note that all the setters affecting `options` are
26379    /// mutually exclusive.
26380    pub fn set_iceberg<
26381        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::IcebergOptions>>,
26382    >(
26383        mut self,
26384        v: T,
26385    ) -> Self {
26386        self.options =
26387            std::option::Option::Some(crate::model::storage_format::Options::Iceberg(v.into()));
26388        self
26389    }
26390}
26391
26392impl wkt::message::Message for StorageFormat {
26393    fn typename() -> &'static str {
26394        "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat"
26395    }
26396}
26397
26398/// Defines additional types related to [StorageFormat].
26399pub mod storage_format {
26400    #[allow(unused_imports)]
26401    use super::*;
26402
26403    /// Describes CSV and similar semi-structured data formats.
26404    #[derive(Clone, Default, PartialEq)]
26405    #[non_exhaustive]
26406    pub struct CsvOptions {
26407        /// Optional. The character encoding of the data. Accepts "US-ASCII",
26408        /// "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
26409        pub encoding: std::string::String,
26410
26411        /// Optional. The number of rows to interpret as header rows that should be
26412        /// skipped when reading data rows. Defaults to 0.
26413        pub header_rows: i32,
26414
26415        /// Optional. The delimiter used to separate values. Defaults to ','.
26416        pub delimiter: std::string::String,
26417
26418        /// Optional. The character used to quote column values. Accepts '"'
26419        /// (double quotation mark) or ''' (single quotation mark). Defaults to
26420        /// '"' (double quotation mark) if unspecified.
26421        pub quote: std::string::String,
26422
26423        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26424    }
26425
26426    impl CsvOptions {
26427        pub fn new() -> Self {
26428            std::default::Default::default()
26429        }
26430
26431        /// Sets the value of [encoding][crate::model::storage_format::CsvOptions::encoding].
26432        pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26433            self.encoding = v.into();
26434            self
26435        }
26436
26437        /// Sets the value of [header_rows][crate::model::storage_format::CsvOptions::header_rows].
26438        pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
26439            self.header_rows = v.into();
26440            self
26441        }
26442
26443        /// Sets the value of [delimiter][crate::model::storage_format::CsvOptions::delimiter].
26444        pub fn set_delimiter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26445            self.delimiter = v.into();
26446            self
26447        }
26448
26449        /// Sets the value of [quote][crate::model::storage_format::CsvOptions::quote].
26450        pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26451            self.quote = v.into();
26452            self
26453        }
26454    }
26455
26456    impl wkt::message::Message for CsvOptions {
26457        fn typename() -> &'static str {
26458            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.CsvOptions"
26459        }
26460    }
26461
26462    /// Describes JSON data format.
26463    #[derive(Clone, Default, PartialEq)]
26464    #[non_exhaustive]
26465    pub struct JsonOptions {
26466        /// Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8"
26467        /// and "ISO-8859-1". Defaults to UTF-8 if not specified.
26468        pub encoding: std::string::String,
26469
26470        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26471    }
26472
26473    impl JsonOptions {
26474        pub fn new() -> Self {
26475            std::default::Default::default()
26476        }
26477
26478        /// Sets the value of [encoding][crate::model::storage_format::JsonOptions::encoding].
26479        pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26480            self.encoding = v.into();
26481            self
26482        }
26483    }
26484
26485    impl wkt::message::Message for JsonOptions {
26486        fn typename() -> &'static str {
26487            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.JsonOptions"
26488        }
26489    }
26490
26491    /// Describes Iceberg data format.
26492    #[derive(Clone, Default, PartialEq)]
26493    #[non_exhaustive]
26494    pub struct IcebergOptions {
26495        /// Optional. The location of where the iceberg metadata is present, must be
26496        /// within the table path
26497        pub metadata_location: std::string::String,
26498
26499        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26500    }
26501
26502    impl IcebergOptions {
26503        pub fn new() -> Self {
26504            std::default::Default::default()
26505        }
26506
26507        /// Sets the value of [metadata_location][crate::model::storage_format::IcebergOptions::metadata_location].
26508        pub fn set_metadata_location<T: std::convert::Into<std::string::String>>(
26509            mut self,
26510            v: T,
26511        ) -> Self {
26512            self.metadata_location = v.into();
26513            self
26514        }
26515    }
26516
26517    impl wkt::message::Message for IcebergOptions {
26518        fn typename() -> &'static str {
26519            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"
26520        }
26521    }
26522
26523    /// The specific file format of the data.
26524    ///
26525    /// # Working with unknown values
26526    ///
26527    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26528    /// additional enum variants at any time. Adding new variants is not considered
26529    /// a breaking change. Applications should write their code in anticipation of:
26530    ///
26531    /// - New values appearing in future releases of the client library, **and**
26532    /// - New values received dynamically, without application changes.
26533    ///
26534    /// Please consult the [Working with enums] section in the user guide for some
26535    /// guidelines.
26536    ///
26537    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26538    #[derive(Clone, Debug, PartialEq)]
26539    #[non_exhaustive]
26540    pub enum Format {
26541        /// Format unspecified.
26542        Unspecified,
26543        /// Parquet-formatted structured data.
26544        Parquet,
26545        /// Avro-formatted structured data.
26546        Avro,
26547        /// Orc-formatted structured data.
26548        Orc,
26549        /// Csv-formatted semi-structured data.
26550        Csv,
26551        /// Json-formatted semi-structured data.
26552        Json,
26553        /// Image data formats (such as jpg and png).
26554        Image,
26555        /// Audio data formats (such as mp3, and wav).
26556        Audio,
26557        /// Video data formats (such as mp4 and mpg).
26558        Video,
26559        /// Textual data formats (such as txt and xml).
26560        Text,
26561        /// TensorFlow record format.
26562        Tfrecord,
26563        /// Data that doesn't match a specific format.
26564        Other,
26565        /// Data of an unknown format.
26566        Unknown,
26567        /// If set, the enum was initialized with an unknown value.
26568        ///
26569        /// Applications can examine the value using [Format::value] or
26570        /// [Format::name].
26571        UnknownValue(format::UnknownValue),
26572    }
26573
26574    #[doc(hidden)]
26575    pub mod format {
26576        #[allow(unused_imports)]
26577        use super::*;
26578        #[derive(Clone, Debug, PartialEq)]
26579        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26580    }
26581
26582    impl Format {
26583        /// Gets the enum value.
26584        ///
26585        /// Returns `None` if the enum contains an unknown value deserialized from
26586        /// the string representation of enums.
26587        pub fn value(&self) -> std::option::Option<i32> {
26588            match self {
26589                Self::Unspecified => std::option::Option::Some(0),
26590                Self::Parquet => std::option::Option::Some(1),
26591                Self::Avro => std::option::Option::Some(2),
26592                Self::Orc => std::option::Option::Some(3),
26593                Self::Csv => std::option::Option::Some(100),
26594                Self::Json => std::option::Option::Some(101),
26595                Self::Image => std::option::Option::Some(200),
26596                Self::Audio => std::option::Option::Some(201),
26597                Self::Video => std::option::Option::Some(202),
26598                Self::Text => std::option::Option::Some(203),
26599                Self::Tfrecord => std::option::Option::Some(204),
26600                Self::Other => std::option::Option::Some(1000),
26601                Self::Unknown => std::option::Option::Some(1001),
26602                Self::UnknownValue(u) => u.0.value(),
26603            }
26604        }
26605
26606        /// Gets the enum value as a string.
26607        ///
26608        /// Returns `None` if the enum contains an unknown value deserialized from
26609        /// the integer representation of enums.
26610        pub fn name(&self) -> std::option::Option<&str> {
26611            match self {
26612                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
26613                Self::Parquet => std::option::Option::Some("PARQUET"),
26614                Self::Avro => std::option::Option::Some("AVRO"),
26615                Self::Orc => std::option::Option::Some("ORC"),
26616                Self::Csv => std::option::Option::Some("CSV"),
26617                Self::Json => std::option::Option::Some("JSON"),
26618                Self::Image => std::option::Option::Some("IMAGE"),
26619                Self::Audio => std::option::Option::Some("AUDIO"),
26620                Self::Video => std::option::Option::Some("VIDEO"),
26621                Self::Text => std::option::Option::Some("TEXT"),
26622                Self::Tfrecord => std::option::Option::Some("TFRECORD"),
26623                Self::Other => std::option::Option::Some("OTHER"),
26624                Self::Unknown => std::option::Option::Some("UNKNOWN"),
26625                Self::UnknownValue(u) => u.0.name(),
26626            }
26627        }
26628    }
26629
26630    impl std::default::Default for Format {
26631        fn default() -> Self {
26632            use std::convert::From;
26633            Self::from(0)
26634        }
26635    }
26636
26637    impl std::fmt::Display for Format {
26638        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26639            wkt::internal::display_enum(f, self.name(), self.value())
26640        }
26641    }
26642
26643    impl std::convert::From<i32> for Format {
26644        fn from(value: i32) -> Self {
26645            match value {
26646                0 => Self::Unspecified,
26647                1 => Self::Parquet,
26648                2 => Self::Avro,
26649                3 => Self::Orc,
26650                100 => Self::Csv,
26651                101 => Self::Json,
26652                200 => Self::Image,
26653                201 => Self::Audio,
26654                202 => Self::Video,
26655                203 => Self::Text,
26656                204 => Self::Tfrecord,
26657                1000 => Self::Other,
26658                1001 => Self::Unknown,
26659                _ => Self::UnknownValue(format::UnknownValue(
26660                    wkt::internal::UnknownEnumValue::Integer(value),
26661                )),
26662            }
26663        }
26664    }
26665
26666    impl std::convert::From<&str> for Format {
26667        fn from(value: &str) -> Self {
26668            use std::string::ToString;
26669            match value {
26670                "FORMAT_UNSPECIFIED" => Self::Unspecified,
26671                "PARQUET" => Self::Parquet,
26672                "AVRO" => Self::Avro,
26673                "ORC" => Self::Orc,
26674                "CSV" => Self::Csv,
26675                "JSON" => Self::Json,
26676                "IMAGE" => Self::Image,
26677                "AUDIO" => Self::Audio,
26678                "VIDEO" => Self::Video,
26679                "TEXT" => Self::Text,
26680                "TFRECORD" => Self::Tfrecord,
26681                "OTHER" => Self::Other,
26682                "UNKNOWN" => Self::Unknown,
26683                _ => Self::UnknownValue(format::UnknownValue(
26684                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26685                )),
26686            }
26687        }
26688    }
26689
26690    impl serde::ser::Serialize for Format {
26691        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26692        where
26693            S: serde::Serializer,
26694        {
26695            match self {
26696                Self::Unspecified => serializer.serialize_i32(0),
26697                Self::Parquet => serializer.serialize_i32(1),
26698                Self::Avro => serializer.serialize_i32(2),
26699                Self::Orc => serializer.serialize_i32(3),
26700                Self::Csv => serializer.serialize_i32(100),
26701                Self::Json => serializer.serialize_i32(101),
26702                Self::Image => serializer.serialize_i32(200),
26703                Self::Audio => serializer.serialize_i32(201),
26704                Self::Video => serializer.serialize_i32(202),
26705                Self::Text => serializer.serialize_i32(203),
26706                Self::Tfrecord => serializer.serialize_i32(204),
26707                Self::Other => serializer.serialize_i32(1000),
26708                Self::Unknown => serializer.serialize_i32(1001),
26709                Self::UnknownValue(u) => u.0.serialize(serializer),
26710            }
26711        }
26712    }
26713
26714    impl<'de> serde::de::Deserialize<'de> for Format {
26715        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26716        where
26717            D: serde::Deserializer<'de>,
26718        {
26719            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
26720                ".google.cloud.dataplex.v1.StorageFormat.Format",
26721            ))
26722        }
26723    }
26724
26725    /// The specific compressed file format of the data.
26726    ///
26727    /// # Working with unknown values
26728    ///
26729    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26730    /// additional enum variants at any time. Adding new variants is not considered
26731    /// a breaking change. Applications should write their code in anticipation of:
26732    ///
26733    /// - New values appearing in future releases of the client library, **and**
26734    /// - New values received dynamically, without application changes.
26735    ///
26736    /// Please consult the [Working with enums] section in the user guide for some
26737    /// guidelines.
26738    ///
26739    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26740    #[derive(Clone, Debug, PartialEq)]
26741    #[non_exhaustive]
26742    pub enum CompressionFormat {
26743        /// CompressionFormat unspecified. Implies uncompressed data.
26744        Unspecified,
26745        /// GZip compressed set of files.
26746        Gzip,
26747        /// BZip2 compressed set of files.
26748        Bzip2,
26749        /// If set, the enum was initialized with an unknown value.
26750        ///
26751        /// Applications can examine the value using [CompressionFormat::value] or
26752        /// [CompressionFormat::name].
26753        UnknownValue(compression_format::UnknownValue),
26754    }
26755
26756    #[doc(hidden)]
26757    pub mod compression_format {
26758        #[allow(unused_imports)]
26759        use super::*;
26760        #[derive(Clone, Debug, PartialEq)]
26761        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26762    }
26763
26764    impl CompressionFormat {
26765        /// Gets the enum value.
26766        ///
26767        /// Returns `None` if the enum contains an unknown value deserialized from
26768        /// the string representation of enums.
26769        pub fn value(&self) -> std::option::Option<i32> {
26770            match self {
26771                Self::Unspecified => std::option::Option::Some(0),
26772                Self::Gzip => std::option::Option::Some(2),
26773                Self::Bzip2 => std::option::Option::Some(3),
26774                Self::UnknownValue(u) => u.0.value(),
26775            }
26776        }
26777
26778        /// Gets the enum value as a string.
26779        ///
26780        /// Returns `None` if the enum contains an unknown value deserialized from
26781        /// the integer representation of enums.
26782        pub fn name(&self) -> std::option::Option<&str> {
26783            match self {
26784                Self::Unspecified => std::option::Option::Some("COMPRESSION_FORMAT_UNSPECIFIED"),
26785                Self::Gzip => std::option::Option::Some("GZIP"),
26786                Self::Bzip2 => std::option::Option::Some("BZIP2"),
26787                Self::UnknownValue(u) => u.0.name(),
26788            }
26789        }
26790    }
26791
26792    impl std::default::Default for CompressionFormat {
26793        fn default() -> Self {
26794            use std::convert::From;
26795            Self::from(0)
26796        }
26797    }
26798
26799    impl std::fmt::Display for CompressionFormat {
26800        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26801            wkt::internal::display_enum(f, self.name(), self.value())
26802        }
26803    }
26804
26805    impl std::convert::From<i32> for CompressionFormat {
26806        fn from(value: i32) -> Self {
26807            match value {
26808                0 => Self::Unspecified,
26809                2 => Self::Gzip,
26810                3 => Self::Bzip2,
26811                _ => Self::UnknownValue(compression_format::UnknownValue(
26812                    wkt::internal::UnknownEnumValue::Integer(value),
26813                )),
26814            }
26815        }
26816    }
26817
26818    impl std::convert::From<&str> for CompressionFormat {
26819        fn from(value: &str) -> Self {
26820            use std::string::ToString;
26821            match value {
26822                "COMPRESSION_FORMAT_UNSPECIFIED" => Self::Unspecified,
26823                "GZIP" => Self::Gzip,
26824                "BZIP2" => Self::Bzip2,
26825                _ => Self::UnknownValue(compression_format::UnknownValue(
26826                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26827                )),
26828            }
26829        }
26830    }
26831
26832    impl serde::ser::Serialize for CompressionFormat {
26833        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26834        where
26835            S: serde::Serializer,
26836        {
26837            match self {
26838                Self::Unspecified => serializer.serialize_i32(0),
26839                Self::Gzip => serializer.serialize_i32(2),
26840                Self::Bzip2 => serializer.serialize_i32(3),
26841                Self::UnknownValue(u) => u.0.serialize(serializer),
26842            }
26843        }
26844    }
26845
26846    impl<'de> serde::de::Deserialize<'de> for CompressionFormat {
26847        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26848        where
26849            D: serde::Deserializer<'de>,
26850        {
26851            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CompressionFormat>::new(
26852                ".google.cloud.dataplex.v1.StorageFormat.CompressionFormat",
26853            ))
26854        }
26855    }
26856
26857    /// Additional format-specific options.
26858    #[derive(Clone, Debug, PartialEq)]
26859    #[non_exhaustive]
26860    pub enum Options {
26861        /// Optional. Additional information about CSV formatted data.
26862        Csv(std::boxed::Box<crate::model::storage_format::CsvOptions>),
26863        /// Optional. Additional information about CSV formatted data.
26864        Json(std::boxed::Box<crate::model::storage_format::JsonOptions>),
26865        /// Optional. Additional information about iceberg tables.
26866        Iceberg(std::boxed::Box<crate::model::storage_format::IcebergOptions>),
26867    }
26868}
26869
26870/// Describes the access mechanism of the data within its storage location.
26871#[derive(Clone, Default, PartialEq)]
26872#[non_exhaustive]
26873pub struct StorageAccess {
26874    /// Output only. Describes the read access mechanism of the data. Not user
26875    /// settable.
26876    pub read: crate::model::storage_access::AccessMode,
26877
26878    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26879}
26880
26881impl StorageAccess {
26882    pub fn new() -> Self {
26883        std::default::Default::default()
26884    }
26885
26886    /// Sets the value of [read][crate::model::StorageAccess::read].
26887    pub fn set_read<T: std::convert::Into<crate::model::storage_access::AccessMode>>(
26888        mut self,
26889        v: T,
26890    ) -> Self {
26891        self.read = v.into();
26892        self
26893    }
26894}
26895
26896impl wkt::message::Message for StorageAccess {
26897    fn typename() -> &'static str {
26898        "type.googleapis.com/google.cloud.dataplex.v1.StorageAccess"
26899    }
26900}
26901
26902/// Defines additional types related to [StorageAccess].
26903pub mod storage_access {
26904    #[allow(unused_imports)]
26905    use super::*;
26906
26907    /// Access Mode determines how data stored within the Entity is read.
26908    ///
26909    /// # Working with unknown values
26910    ///
26911    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26912    /// additional enum variants at any time. Adding new variants is not considered
26913    /// a breaking change. Applications should write their code in anticipation of:
26914    ///
26915    /// - New values appearing in future releases of the client library, **and**
26916    /// - New values received dynamically, without application changes.
26917    ///
26918    /// Please consult the [Working with enums] section in the user guide for some
26919    /// guidelines.
26920    ///
26921    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26922    #[derive(Clone, Debug, PartialEq)]
26923    #[non_exhaustive]
26924    pub enum AccessMode {
26925        /// Access mode unspecified.
26926        Unspecified,
26927        /// Default. Data is accessed directly using storage APIs.
26928        Direct,
26929        /// Data is accessed through a managed interface using BigQuery APIs.
26930        Managed,
26931        /// If set, the enum was initialized with an unknown value.
26932        ///
26933        /// Applications can examine the value using [AccessMode::value] or
26934        /// [AccessMode::name].
26935        UnknownValue(access_mode::UnknownValue),
26936    }
26937
26938    #[doc(hidden)]
26939    pub mod access_mode {
26940        #[allow(unused_imports)]
26941        use super::*;
26942        #[derive(Clone, Debug, PartialEq)]
26943        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26944    }
26945
26946    impl AccessMode {
26947        /// Gets the enum value.
26948        ///
26949        /// Returns `None` if the enum contains an unknown value deserialized from
26950        /// the string representation of enums.
26951        pub fn value(&self) -> std::option::Option<i32> {
26952            match self {
26953                Self::Unspecified => std::option::Option::Some(0),
26954                Self::Direct => std::option::Option::Some(1),
26955                Self::Managed => std::option::Option::Some(2),
26956                Self::UnknownValue(u) => u.0.value(),
26957            }
26958        }
26959
26960        /// Gets the enum value as a string.
26961        ///
26962        /// Returns `None` if the enum contains an unknown value deserialized from
26963        /// the integer representation of enums.
26964        pub fn name(&self) -> std::option::Option<&str> {
26965            match self {
26966                Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
26967                Self::Direct => std::option::Option::Some("DIRECT"),
26968                Self::Managed => std::option::Option::Some("MANAGED"),
26969                Self::UnknownValue(u) => u.0.name(),
26970            }
26971        }
26972    }
26973
26974    impl std::default::Default for AccessMode {
26975        fn default() -> Self {
26976            use std::convert::From;
26977            Self::from(0)
26978        }
26979    }
26980
26981    impl std::fmt::Display for AccessMode {
26982        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26983            wkt::internal::display_enum(f, self.name(), self.value())
26984        }
26985    }
26986
26987    impl std::convert::From<i32> for AccessMode {
26988        fn from(value: i32) -> Self {
26989            match value {
26990                0 => Self::Unspecified,
26991                1 => Self::Direct,
26992                2 => Self::Managed,
26993                _ => Self::UnknownValue(access_mode::UnknownValue(
26994                    wkt::internal::UnknownEnumValue::Integer(value),
26995                )),
26996            }
26997        }
26998    }
26999
27000    impl std::convert::From<&str> for AccessMode {
27001        fn from(value: &str) -> Self {
27002            use std::string::ToString;
27003            match value {
27004                "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
27005                "DIRECT" => Self::Direct,
27006                "MANAGED" => Self::Managed,
27007                _ => Self::UnknownValue(access_mode::UnknownValue(
27008                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27009                )),
27010            }
27011        }
27012    }
27013
27014    impl serde::ser::Serialize for AccessMode {
27015        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27016        where
27017            S: serde::Serializer,
27018        {
27019            match self {
27020                Self::Unspecified => serializer.serialize_i32(0),
27021                Self::Direct => serializer.serialize_i32(1),
27022                Self::Managed => serializer.serialize_i32(2),
27023                Self::UnknownValue(u) => u.0.serialize(serializer),
27024            }
27025        }
27026    }
27027
27028    impl<'de> serde::de::Deserialize<'de> for AccessMode {
27029        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27030        where
27031            D: serde::Deserializer<'de>,
27032        {
27033            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
27034                ".google.cloud.dataplex.v1.StorageAccess.AccessMode",
27035            ))
27036        }
27037    }
27038}
27039
27040/// DataScan scheduling and trigger settings.
27041#[derive(Clone, Default, PartialEq)]
27042#[non_exhaustive]
27043pub struct Trigger {
27044    /// DataScan scheduling and trigger settings.
27045    ///
27046    /// If not specified, the default is `onDemand`.
27047    pub mode: std::option::Option<crate::model::trigger::Mode>,
27048
27049    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27050}
27051
27052impl Trigger {
27053    pub fn new() -> Self {
27054        std::default::Default::default()
27055    }
27056
27057    /// Sets the value of [mode][crate::model::Trigger::mode].
27058    ///
27059    /// Note that all the setters affecting `mode` are mutually
27060    /// exclusive.
27061    pub fn set_mode<T: std::convert::Into<std::option::Option<crate::model::trigger::Mode>>>(
27062        mut self,
27063        v: T,
27064    ) -> Self {
27065        self.mode = v.into();
27066        self
27067    }
27068
27069    /// The value of [mode][crate::model::Trigger::mode]
27070    /// if it holds a `OnDemand`, `None` if the field is not set or
27071    /// holds a different branch.
27072    pub fn on_demand(
27073        &self,
27074    ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::OnDemand>> {
27075        #[allow(unreachable_patterns)]
27076        self.mode.as_ref().and_then(|v| match v {
27077            crate::model::trigger::Mode::OnDemand(v) => std::option::Option::Some(v),
27078            _ => std::option::Option::None,
27079        })
27080    }
27081
27082    /// Sets the value of [mode][crate::model::Trigger::mode]
27083    /// to hold a `OnDemand`.
27084    ///
27085    /// Note that all the setters affecting `mode` are
27086    /// mutually exclusive.
27087    pub fn set_on_demand<
27088        T: std::convert::Into<std::boxed::Box<crate::model::trigger::OnDemand>>,
27089    >(
27090        mut self,
27091        v: T,
27092    ) -> Self {
27093        self.mode = std::option::Option::Some(crate::model::trigger::Mode::OnDemand(v.into()));
27094        self
27095    }
27096
27097    /// The value of [mode][crate::model::Trigger::mode]
27098    /// if it holds a `Schedule`, `None` if the field is not set or
27099    /// holds a different branch.
27100    pub fn schedule(
27101        &self,
27102    ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::Schedule>> {
27103        #[allow(unreachable_patterns)]
27104        self.mode.as_ref().and_then(|v| match v {
27105            crate::model::trigger::Mode::Schedule(v) => std::option::Option::Some(v),
27106            _ => std::option::Option::None,
27107        })
27108    }
27109
27110    /// Sets the value of [mode][crate::model::Trigger::mode]
27111    /// to hold a `Schedule`.
27112    ///
27113    /// Note that all the setters affecting `mode` are
27114    /// mutually exclusive.
27115    pub fn set_schedule<T: std::convert::Into<std::boxed::Box<crate::model::trigger::Schedule>>>(
27116        mut self,
27117        v: T,
27118    ) -> Self {
27119        self.mode = std::option::Option::Some(crate::model::trigger::Mode::Schedule(v.into()));
27120        self
27121    }
27122}
27123
27124impl wkt::message::Message for Trigger {
27125    fn typename() -> &'static str {
27126        "type.googleapis.com/google.cloud.dataplex.v1.Trigger"
27127    }
27128}
27129
27130/// Defines additional types related to [Trigger].
27131pub mod trigger {
27132    #[allow(unused_imports)]
27133    use super::*;
27134
27135    /// The scan runs once via `RunDataScan` API.
27136    #[derive(Clone, Default, PartialEq)]
27137    #[non_exhaustive]
27138    pub struct OnDemand {
27139        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27140    }
27141
27142    impl OnDemand {
27143        pub fn new() -> Self {
27144            std::default::Default::default()
27145        }
27146    }
27147
27148    impl wkt::message::Message for OnDemand {
27149        fn typename() -> &'static str {
27150            "type.googleapis.com/google.cloud.dataplex.v1.Trigger.OnDemand"
27151        }
27152    }
27153
27154    /// The scan is scheduled to run periodically.
27155    #[derive(Clone, Default, PartialEq)]
27156    #[non_exhaustive]
27157    pub struct Schedule {
27158        /// Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running
27159        /// scans periodically.
27160        ///
27161        /// To explicitly set a timezone in the cron tab, apply a prefix in the
27162        /// cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**.
27163        /// The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone
27164        /// database
27165        /// ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)).
27166        /// For example, `CRON_TZ=America/New_York 1 * * * *`, or
27167        /// `TZ=America/New_York 1 * * * *`.
27168        ///
27169        /// This field is required for Schedule scans.
27170        pub cron: std::string::String,
27171
27172        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27173    }
27174
27175    impl Schedule {
27176        pub fn new() -> Self {
27177            std::default::Default::default()
27178        }
27179
27180        /// Sets the value of [cron][crate::model::trigger::Schedule::cron].
27181        pub fn set_cron<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27182            self.cron = v.into();
27183            self
27184        }
27185    }
27186
27187    impl wkt::message::Message for Schedule {
27188        fn typename() -> &'static str {
27189            "type.googleapis.com/google.cloud.dataplex.v1.Trigger.Schedule"
27190        }
27191    }
27192
27193    /// DataScan scheduling and trigger settings.
27194    ///
27195    /// If not specified, the default is `onDemand`.
27196    #[derive(Clone, Debug, PartialEq)]
27197    #[non_exhaustive]
27198    pub enum Mode {
27199        /// The scan runs once via `RunDataScan` API.
27200        OnDemand(std::boxed::Box<crate::model::trigger::OnDemand>),
27201        /// The scan is scheduled to run periodically.
27202        Schedule(std::boxed::Box<crate::model::trigger::Schedule>),
27203    }
27204}
27205
27206/// The data source for DataScan.
27207#[derive(Clone, Default, PartialEq)]
27208#[non_exhaustive]
27209pub struct DataSource {
27210    /// The source is required and immutable. Once it is set, it cannot be change
27211    /// to others.
27212    pub source: std::option::Option<crate::model::data_source::Source>,
27213
27214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27215}
27216
27217impl DataSource {
27218    pub fn new() -> Self {
27219        std::default::Default::default()
27220    }
27221
27222    /// Sets the value of [source][crate::model::DataSource::source].
27223    ///
27224    /// Note that all the setters affecting `source` are mutually
27225    /// exclusive.
27226    pub fn set_source<
27227        T: std::convert::Into<std::option::Option<crate::model::data_source::Source>>,
27228    >(
27229        mut self,
27230        v: T,
27231    ) -> Self {
27232        self.source = v.into();
27233        self
27234    }
27235
27236    /// The value of [source][crate::model::DataSource::source]
27237    /// if it holds a `Entity`, `None` if the field is not set or
27238    /// holds a different branch.
27239    pub fn entity(&self) -> std::option::Option<&std::string::String> {
27240        #[allow(unreachable_patterns)]
27241        self.source.as_ref().and_then(|v| match v {
27242            crate::model::data_source::Source::Entity(v) => std::option::Option::Some(v),
27243            _ => std::option::Option::None,
27244        })
27245    }
27246
27247    /// Sets the value of [source][crate::model::DataSource::source]
27248    /// to hold a `Entity`.
27249    ///
27250    /// Note that all the setters affecting `source` are
27251    /// mutually exclusive.
27252    pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27253        self.source =
27254            std::option::Option::Some(crate::model::data_source::Source::Entity(v.into()));
27255        self
27256    }
27257
27258    /// The value of [source][crate::model::DataSource::source]
27259    /// if it holds a `Resource`, `None` if the field is not set or
27260    /// holds a different branch.
27261    pub fn resource(&self) -> std::option::Option<&std::string::String> {
27262        #[allow(unreachable_patterns)]
27263        self.source.as_ref().and_then(|v| match v {
27264            crate::model::data_source::Source::Resource(v) => std::option::Option::Some(v),
27265            _ => std::option::Option::None,
27266        })
27267    }
27268
27269    /// Sets the value of [source][crate::model::DataSource::source]
27270    /// to hold a `Resource`.
27271    ///
27272    /// Note that all the setters affecting `source` are
27273    /// mutually exclusive.
27274    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27275        self.source =
27276            std::option::Option::Some(crate::model::data_source::Source::Resource(v.into()));
27277        self
27278    }
27279}
27280
27281impl wkt::message::Message for DataSource {
27282    fn typename() -> &'static str {
27283        "type.googleapis.com/google.cloud.dataplex.v1.DataSource"
27284    }
27285}
27286
27287/// Defines additional types related to [DataSource].
27288pub mod data_source {
27289    #[allow(unused_imports)]
27290    use super::*;
27291
27292    /// The source is required and immutable. Once it is set, it cannot be change
27293    /// to others.
27294    #[derive(Clone, Debug, PartialEq)]
27295    #[non_exhaustive]
27296    pub enum Source {
27297        /// Immutable. The Dataplex Universal Catalog entity that represents the data
27298        /// source (e.g. BigQuery table) for DataScan, of the form:
27299        /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
27300        Entity(std::string::String),
27301        /// Immutable. The service-qualified full resource name of the cloud resource
27302        /// for a DataScan job to scan against. The field could either be: Cloud
27303        /// Storage bucket for DataDiscoveryScan Format:
27304        /// //storage.googleapis.com/projects/PROJECT_ID/buckets/BUCKET_ID
27305        /// or
27306        /// BigQuery table of type "TABLE" for
27307        /// DataProfileScan/DataQualityScan/DataDocumentationScan Format:
27308        /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
27309        Resource(std::string::String),
27310    }
27311}
27312
27313/// The data scanned during processing (e.g. in incremental DataScan)
27314#[derive(Clone, Default, PartialEq)]
27315#[non_exhaustive]
27316pub struct ScannedData {
27317    /// The range of scanned data
27318    pub data_range: std::option::Option<crate::model::scanned_data::DataRange>,
27319
27320    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27321}
27322
27323impl ScannedData {
27324    pub fn new() -> Self {
27325        std::default::Default::default()
27326    }
27327
27328    /// Sets the value of [data_range][crate::model::ScannedData::data_range].
27329    ///
27330    /// Note that all the setters affecting `data_range` are mutually
27331    /// exclusive.
27332    pub fn set_data_range<
27333        T: std::convert::Into<std::option::Option<crate::model::scanned_data::DataRange>>,
27334    >(
27335        mut self,
27336        v: T,
27337    ) -> Self {
27338        self.data_range = v.into();
27339        self
27340    }
27341
27342    /// The value of [data_range][crate::model::ScannedData::data_range]
27343    /// if it holds a `IncrementalField`, `None` if the field is not set or
27344    /// holds a different branch.
27345    pub fn incremental_field(
27346        &self,
27347    ) -> std::option::Option<&std::boxed::Box<crate::model::scanned_data::IncrementalField>> {
27348        #[allow(unreachable_patterns)]
27349        self.data_range.as_ref().and_then(|v| match v {
27350            crate::model::scanned_data::DataRange::IncrementalField(v) => {
27351                std::option::Option::Some(v)
27352            }
27353            _ => std::option::Option::None,
27354        })
27355    }
27356
27357    /// Sets the value of [data_range][crate::model::ScannedData::data_range]
27358    /// to hold a `IncrementalField`.
27359    ///
27360    /// Note that all the setters affecting `data_range` are
27361    /// mutually exclusive.
27362    pub fn set_incremental_field<
27363        T: std::convert::Into<std::boxed::Box<crate::model::scanned_data::IncrementalField>>,
27364    >(
27365        mut self,
27366        v: T,
27367    ) -> Self {
27368        self.data_range = std::option::Option::Some(
27369            crate::model::scanned_data::DataRange::IncrementalField(v.into()),
27370        );
27371        self
27372    }
27373}
27374
27375impl wkt::message::Message for ScannedData {
27376    fn typename() -> &'static str {
27377        "type.googleapis.com/google.cloud.dataplex.v1.ScannedData"
27378    }
27379}
27380
27381/// Defines additional types related to [ScannedData].
27382pub mod scanned_data {
27383    #[allow(unused_imports)]
27384    use super::*;
27385
27386    /// A data range denoted by a pair of start/end values of a field.
27387    #[derive(Clone, Default, PartialEq)]
27388    #[non_exhaustive]
27389    pub struct IncrementalField {
27390        /// Output only. The field that contains values which monotonically increases
27391        /// over time (e.g. a timestamp column).
27392        pub field: std::string::String,
27393
27394        /// Output only. Value that marks the start of the range.
27395        pub start: std::string::String,
27396
27397        /// Output only. Value that marks the end of the range.
27398        pub end: std::string::String,
27399
27400        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27401    }
27402
27403    impl IncrementalField {
27404        pub fn new() -> Self {
27405            std::default::Default::default()
27406        }
27407
27408        /// Sets the value of [field][crate::model::scanned_data::IncrementalField::field].
27409        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27410            self.field = v.into();
27411            self
27412        }
27413
27414        /// Sets the value of [start][crate::model::scanned_data::IncrementalField::start].
27415        pub fn set_start<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27416            self.start = v.into();
27417            self
27418        }
27419
27420        /// Sets the value of [end][crate::model::scanned_data::IncrementalField::end].
27421        pub fn set_end<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27422            self.end = v.into();
27423            self
27424        }
27425    }
27426
27427    impl wkt::message::Message for IncrementalField {
27428        fn typename() -> &'static str {
27429            "type.googleapis.com/google.cloud.dataplex.v1.ScannedData.IncrementalField"
27430        }
27431    }
27432
27433    /// The range of scanned data
27434    #[derive(Clone, Debug, PartialEq)]
27435    #[non_exhaustive]
27436    pub enum DataRange {
27437        /// The range denoted by values of an incremental field
27438        IncrementalField(std::boxed::Box<crate::model::scanned_data::IncrementalField>),
27439    }
27440}
27441
27442/// A lake is a centralized repository for managing enterprise data across the
27443/// organization distributed across many cloud projects, and stored in a variety
27444/// of storage services such as Google Cloud Storage and BigQuery. The resources
27445/// attached to a lake are referred to as managed resources. Data within these
27446/// managed resources can be structured or unstructured. A lake provides data
27447/// admins with tools to organize, secure and manage their data at scale, and
27448/// provides data scientists and data engineers an integrated experience to
27449/// easily search, discover, analyze and transform data and associated metadata.
27450#[derive(Clone, Default, PartialEq)]
27451#[non_exhaustive]
27452pub struct Lake {
27453    /// Output only. The relative resource name of the lake, of the form:
27454    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
27455    pub name: std::string::String,
27456
27457    /// Optional. User friendly display name.
27458    pub display_name: std::string::String,
27459
27460    /// Output only. System generated globally unique ID for the lake. This ID will
27461    /// be different if the lake is deleted and re-created with the same name.
27462    pub uid: std::string::String,
27463
27464    /// Output only. The time when the lake was created.
27465    pub create_time: std::option::Option<wkt::Timestamp>,
27466
27467    /// Output only. The time when the lake was last updated.
27468    pub update_time: std::option::Option<wkt::Timestamp>,
27469
27470    /// Optional. User-defined labels for the lake.
27471    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
27472
27473    /// Optional. Description of the lake.
27474    pub description: std::string::String,
27475
27476    /// Output only. Current state of the lake.
27477    pub state: crate::model::State,
27478
27479    /// Output only. Service account associated with this lake. This service
27480    /// account must be authorized to access or operate on resources managed by the
27481    /// lake.
27482    pub service_account: std::string::String,
27483
27484    /// Optional. Settings to manage lake and Dataproc Metastore service instance
27485    /// association.
27486    pub metastore: std::option::Option<crate::model::lake::Metastore>,
27487
27488    /// Output only. Aggregated status of the underlying assets of the lake.
27489    pub asset_status: std::option::Option<crate::model::AssetStatus>,
27490
27491    /// Output only. Metastore status of the lake.
27492    pub metastore_status: std::option::Option<crate::model::lake::MetastoreStatus>,
27493
27494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27495}
27496
27497impl Lake {
27498    pub fn new() -> Self {
27499        std::default::Default::default()
27500    }
27501
27502    /// Sets the value of [name][crate::model::Lake::name].
27503    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27504        self.name = v.into();
27505        self
27506    }
27507
27508    /// Sets the value of [display_name][crate::model::Lake::display_name].
27509    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27510        self.display_name = v.into();
27511        self
27512    }
27513
27514    /// Sets the value of [uid][crate::model::Lake::uid].
27515    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27516        self.uid = v.into();
27517        self
27518    }
27519
27520    /// Sets the value of [create_time][crate::model::Lake::create_time].
27521    pub fn set_create_time<T>(mut self, v: T) -> Self
27522    where
27523        T: std::convert::Into<wkt::Timestamp>,
27524    {
27525        self.create_time = std::option::Option::Some(v.into());
27526        self
27527    }
27528
27529    /// Sets or clears the value of [create_time][crate::model::Lake::create_time].
27530    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
27531    where
27532        T: std::convert::Into<wkt::Timestamp>,
27533    {
27534        self.create_time = v.map(|x| x.into());
27535        self
27536    }
27537
27538    /// Sets the value of [update_time][crate::model::Lake::update_time].
27539    pub fn set_update_time<T>(mut self, v: T) -> Self
27540    where
27541        T: std::convert::Into<wkt::Timestamp>,
27542    {
27543        self.update_time = std::option::Option::Some(v.into());
27544        self
27545    }
27546
27547    /// Sets or clears the value of [update_time][crate::model::Lake::update_time].
27548    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
27549    where
27550        T: std::convert::Into<wkt::Timestamp>,
27551    {
27552        self.update_time = v.map(|x| x.into());
27553        self
27554    }
27555
27556    /// Sets the value of [labels][crate::model::Lake::labels].
27557    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
27558    where
27559        T: std::iter::IntoIterator<Item = (K, V)>,
27560        K: std::convert::Into<std::string::String>,
27561        V: std::convert::Into<std::string::String>,
27562    {
27563        use std::iter::Iterator;
27564        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
27565        self
27566    }
27567
27568    /// Sets the value of [description][crate::model::Lake::description].
27569    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27570        self.description = v.into();
27571        self
27572    }
27573
27574    /// Sets the value of [state][crate::model::Lake::state].
27575    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
27576        self.state = v.into();
27577        self
27578    }
27579
27580    /// Sets the value of [service_account][crate::model::Lake::service_account].
27581    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27582        self.service_account = v.into();
27583        self
27584    }
27585
27586    /// Sets the value of [metastore][crate::model::Lake::metastore].
27587    pub fn set_metastore<T>(mut self, v: T) -> Self
27588    where
27589        T: std::convert::Into<crate::model::lake::Metastore>,
27590    {
27591        self.metastore = std::option::Option::Some(v.into());
27592        self
27593    }
27594
27595    /// Sets or clears the value of [metastore][crate::model::Lake::metastore].
27596    pub fn set_or_clear_metastore<T>(mut self, v: std::option::Option<T>) -> Self
27597    where
27598        T: std::convert::Into<crate::model::lake::Metastore>,
27599    {
27600        self.metastore = v.map(|x| x.into());
27601        self
27602    }
27603
27604    /// Sets the value of [asset_status][crate::model::Lake::asset_status].
27605    pub fn set_asset_status<T>(mut self, v: T) -> Self
27606    where
27607        T: std::convert::Into<crate::model::AssetStatus>,
27608    {
27609        self.asset_status = std::option::Option::Some(v.into());
27610        self
27611    }
27612
27613    /// Sets or clears the value of [asset_status][crate::model::Lake::asset_status].
27614    pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
27615    where
27616        T: std::convert::Into<crate::model::AssetStatus>,
27617    {
27618        self.asset_status = v.map(|x| x.into());
27619        self
27620    }
27621
27622    /// Sets the value of [metastore_status][crate::model::Lake::metastore_status].
27623    pub fn set_metastore_status<T>(mut self, v: T) -> Self
27624    where
27625        T: std::convert::Into<crate::model::lake::MetastoreStatus>,
27626    {
27627        self.metastore_status = std::option::Option::Some(v.into());
27628        self
27629    }
27630
27631    /// Sets or clears the value of [metastore_status][crate::model::Lake::metastore_status].
27632    pub fn set_or_clear_metastore_status<T>(mut self, v: std::option::Option<T>) -> Self
27633    where
27634        T: std::convert::Into<crate::model::lake::MetastoreStatus>,
27635    {
27636        self.metastore_status = v.map(|x| x.into());
27637        self
27638    }
27639}
27640
27641impl wkt::message::Message for Lake {
27642    fn typename() -> &'static str {
27643        "type.googleapis.com/google.cloud.dataplex.v1.Lake"
27644    }
27645}
27646
27647/// Defines additional types related to [Lake].
27648pub mod lake {
27649    #[allow(unused_imports)]
27650    use super::*;
27651
27652    /// Settings to manage association of Dataproc Metastore with a lake.
27653    #[derive(Clone, Default, PartialEq)]
27654    #[non_exhaustive]
27655    pub struct Metastore {
27656        /// Optional. A relative reference to the Dataproc Metastore
27657        /// (<https://cloud.google.com/dataproc-metastore/docs>) service associated
27658        /// with the lake:
27659        /// `projects/{project_id}/locations/{location_id}/services/{service_id}`
27660        pub service: std::string::String,
27661
27662        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27663    }
27664
27665    impl Metastore {
27666        pub fn new() -> Self {
27667            std::default::Default::default()
27668        }
27669
27670        /// Sets the value of [service][crate::model::lake::Metastore::service].
27671        pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27672            self.service = v.into();
27673            self
27674        }
27675    }
27676
27677    impl wkt::message::Message for Metastore {
27678        fn typename() -> &'static str {
27679            "type.googleapis.com/google.cloud.dataplex.v1.Lake.Metastore"
27680        }
27681    }
27682
27683    /// Status of Lake and Dataproc Metastore service instance association.
27684    #[derive(Clone, Default, PartialEq)]
27685    #[non_exhaustive]
27686    pub struct MetastoreStatus {
27687        /// Current state of association.
27688        pub state: crate::model::lake::metastore_status::State,
27689
27690        /// Additional information about the current status.
27691        pub message: std::string::String,
27692
27693        /// Last update time of the metastore status of the lake.
27694        pub update_time: std::option::Option<wkt::Timestamp>,
27695
27696        /// The URI of the endpoint used to access the Metastore service.
27697        pub endpoint: std::string::String,
27698
27699        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27700    }
27701
27702    impl MetastoreStatus {
27703        pub fn new() -> Self {
27704            std::default::Default::default()
27705        }
27706
27707        /// Sets the value of [state][crate::model::lake::MetastoreStatus::state].
27708        pub fn set_state<T: std::convert::Into<crate::model::lake::metastore_status::State>>(
27709            mut self,
27710            v: T,
27711        ) -> Self {
27712            self.state = v.into();
27713            self
27714        }
27715
27716        /// Sets the value of [message][crate::model::lake::MetastoreStatus::message].
27717        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27718            self.message = v.into();
27719            self
27720        }
27721
27722        /// Sets the value of [update_time][crate::model::lake::MetastoreStatus::update_time].
27723        pub fn set_update_time<T>(mut self, v: T) -> Self
27724        where
27725            T: std::convert::Into<wkt::Timestamp>,
27726        {
27727            self.update_time = std::option::Option::Some(v.into());
27728            self
27729        }
27730
27731        /// Sets or clears the value of [update_time][crate::model::lake::MetastoreStatus::update_time].
27732        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
27733        where
27734            T: std::convert::Into<wkt::Timestamp>,
27735        {
27736            self.update_time = v.map(|x| x.into());
27737            self
27738        }
27739
27740        /// Sets the value of [endpoint][crate::model::lake::MetastoreStatus::endpoint].
27741        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27742            self.endpoint = v.into();
27743            self
27744        }
27745    }
27746
27747    impl wkt::message::Message for MetastoreStatus {
27748        fn typename() -> &'static str {
27749            "type.googleapis.com/google.cloud.dataplex.v1.Lake.MetastoreStatus"
27750        }
27751    }
27752
27753    /// Defines additional types related to [MetastoreStatus].
27754    pub mod metastore_status {
27755        #[allow(unused_imports)]
27756        use super::*;
27757
27758        /// Current state of association.
27759        ///
27760        /// # Working with unknown values
27761        ///
27762        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27763        /// additional enum variants at any time. Adding new variants is not considered
27764        /// a breaking change. Applications should write their code in anticipation of:
27765        ///
27766        /// - New values appearing in future releases of the client library, **and**
27767        /// - New values received dynamically, without application changes.
27768        ///
27769        /// Please consult the [Working with enums] section in the user guide for some
27770        /// guidelines.
27771        ///
27772        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27773        #[derive(Clone, Debug, PartialEq)]
27774        #[non_exhaustive]
27775        pub enum State {
27776            /// Unspecified.
27777            Unspecified,
27778            /// A Metastore service instance is not associated with the lake.
27779            None,
27780            /// A Metastore service instance is attached to the lake.
27781            Ready,
27782            /// Attach/detach is in progress.
27783            Updating,
27784            /// Attach/detach could not be done due to errors.
27785            Error,
27786            /// If set, the enum was initialized with an unknown value.
27787            ///
27788            /// Applications can examine the value using [State::value] or
27789            /// [State::name].
27790            UnknownValue(state::UnknownValue),
27791        }
27792
27793        #[doc(hidden)]
27794        pub mod state {
27795            #[allow(unused_imports)]
27796            use super::*;
27797            #[derive(Clone, Debug, PartialEq)]
27798            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27799        }
27800
27801        impl State {
27802            /// Gets the enum value.
27803            ///
27804            /// Returns `None` if the enum contains an unknown value deserialized from
27805            /// the string representation of enums.
27806            pub fn value(&self) -> std::option::Option<i32> {
27807                match self {
27808                    Self::Unspecified => std::option::Option::Some(0),
27809                    Self::None => std::option::Option::Some(1),
27810                    Self::Ready => std::option::Option::Some(2),
27811                    Self::Updating => std::option::Option::Some(3),
27812                    Self::Error => std::option::Option::Some(4),
27813                    Self::UnknownValue(u) => u.0.value(),
27814                }
27815            }
27816
27817            /// Gets the enum value as a string.
27818            ///
27819            /// Returns `None` if the enum contains an unknown value deserialized from
27820            /// the integer representation of enums.
27821            pub fn name(&self) -> std::option::Option<&str> {
27822                match self {
27823                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
27824                    Self::None => std::option::Option::Some("NONE"),
27825                    Self::Ready => std::option::Option::Some("READY"),
27826                    Self::Updating => std::option::Option::Some("UPDATING"),
27827                    Self::Error => std::option::Option::Some("ERROR"),
27828                    Self::UnknownValue(u) => u.0.name(),
27829                }
27830            }
27831        }
27832
27833        impl std::default::Default for State {
27834            fn default() -> Self {
27835                use std::convert::From;
27836                Self::from(0)
27837            }
27838        }
27839
27840        impl std::fmt::Display for State {
27841            fn fmt(
27842                &self,
27843                f: &mut std::fmt::Formatter<'_>,
27844            ) -> std::result::Result<(), std::fmt::Error> {
27845                wkt::internal::display_enum(f, self.name(), self.value())
27846            }
27847        }
27848
27849        impl std::convert::From<i32> for State {
27850            fn from(value: i32) -> Self {
27851                match value {
27852                    0 => Self::Unspecified,
27853                    1 => Self::None,
27854                    2 => Self::Ready,
27855                    3 => Self::Updating,
27856                    4 => Self::Error,
27857                    _ => Self::UnknownValue(state::UnknownValue(
27858                        wkt::internal::UnknownEnumValue::Integer(value),
27859                    )),
27860                }
27861            }
27862        }
27863
27864        impl std::convert::From<&str> for State {
27865            fn from(value: &str) -> Self {
27866                use std::string::ToString;
27867                match value {
27868                    "STATE_UNSPECIFIED" => Self::Unspecified,
27869                    "NONE" => Self::None,
27870                    "READY" => Self::Ready,
27871                    "UPDATING" => Self::Updating,
27872                    "ERROR" => Self::Error,
27873                    _ => Self::UnknownValue(state::UnknownValue(
27874                        wkt::internal::UnknownEnumValue::String(value.to_string()),
27875                    )),
27876                }
27877            }
27878        }
27879
27880        impl serde::ser::Serialize for State {
27881            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27882            where
27883                S: serde::Serializer,
27884            {
27885                match self {
27886                    Self::Unspecified => serializer.serialize_i32(0),
27887                    Self::None => serializer.serialize_i32(1),
27888                    Self::Ready => serializer.serialize_i32(2),
27889                    Self::Updating => serializer.serialize_i32(3),
27890                    Self::Error => serializer.serialize_i32(4),
27891                    Self::UnknownValue(u) => u.0.serialize(serializer),
27892                }
27893            }
27894        }
27895
27896        impl<'de> serde::de::Deserialize<'de> for State {
27897            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27898            where
27899                D: serde::Deserializer<'de>,
27900            {
27901                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
27902                    ".google.cloud.dataplex.v1.Lake.MetastoreStatus.State",
27903                ))
27904            }
27905        }
27906    }
27907}
27908
27909/// Aggregated status of the underlying assets of a lake or zone.
27910#[derive(Clone, Default, PartialEq)]
27911#[non_exhaustive]
27912pub struct AssetStatus {
27913    /// Last update time of the status.
27914    pub update_time: std::option::Option<wkt::Timestamp>,
27915
27916    /// Number of active assets.
27917    pub active_assets: i32,
27918
27919    /// Number of assets that are in process of updating the security policy on
27920    /// attached resources.
27921    pub security_policy_applying_assets: i32,
27922
27923    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27924}
27925
27926impl AssetStatus {
27927    pub fn new() -> Self {
27928        std::default::Default::default()
27929    }
27930
27931    /// Sets the value of [update_time][crate::model::AssetStatus::update_time].
27932    pub fn set_update_time<T>(mut self, v: T) -> Self
27933    where
27934        T: std::convert::Into<wkt::Timestamp>,
27935    {
27936        self.update_time = std::option::Option::Some(v.into());
27937        self
27938    }
27939
27940    /// Sets or clears the value of [update_time][crate::model::AssetStatus::update_time].
27941    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
27942    where
27943        T: std::convert::Into<wkt::Timestamp>,
27944    {
27945        self.update_time = v.map(|x| x.into());
27946        self
27947    }
27948
27949    /// Sets the value of [active_assets][crate::model::AssetStatus::active_assets].
27950    pub fn set_active_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27951        self.active_assets = v.into();
27952        self
27953    }
27954
27955    /// Sets the value of [security_policy_applying_assets][crate::model::AssetStatus::security_policy_applying_assets].
27956    pub fn set_security_policy_applying_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27957        self.security_policy_applying_assets = v.into();
27958        self
27959    }
27960}
27961
27962impl wkt::message::Message for AssetStatus {
27963    fn typename() -> &'static str {
27964        "type.googleapis.com/google.cloud.dataplex.v1.AssetStatus"
27965    }
27966}
27967
27968/// A zone represents a logical group of related assets within a lake. A zone can
27969/// be used to map to organizational structure or represent stages of data
27970/// readiness from raw to curated. It provides managing behavior that is shared
27971/// or inherited by all contained assets.
27972#[derive(Clone, Default, PartialEq)]
27973#[non_exhaustive]
27974pub struct Zone {
27975    /// Output only. The relative resource name of the zone, of the form:
27976    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
27977    pub name: std::string::String,
27978
27979    /// Optional. User friendly display name.
27980    pub display_name: std::string::String,
27981
27982    /// Output only. System generated globally unique ID for the zone. This ID will
27983    /// be different if the zone is deleted and re-created with the same name.
27984    pub uid: std::string::String,
27985
27986    /// Output only. The time when the zone was created.
27987    pub create_time: std::option::Option<wkt::Timestamp>,
27988
27989    /// Output only. The time when the zone was last updated.
27990    pub update_time: std::option::Option<wkt::Timestamp>,
27991
27992    /// Optional. User defined labels for the zone.
27993    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
27994
27995    /// Optional. Description of the zone.
27996    pub description: std::string::String,
27997
27998    /// Output only. Current state of the zone.
27999    pub state: crate::model::State,
28000
28001    /// Required. Immutable. The type of the zone.
28002    pub r#type: crate::model::zone::Type,
28003
28004    /// Optional. Specification of the discovery feature applied to data in this
28005    /// zone.
28006    pub discovery_spec: std::option::Option<crate::model::zone::DiscoverySpec>,
28007
28008    /// Required. Specification of the resources that are referenced by the assets
28009    /// within this zone.
28010    pub resource_spec: std::option::Option<crate::model::zone::ResourceSpec>,
28011
28012    /// Output only. Aggregated status of the underlying assets of the zone.
28013    pub asset_status: std::option::Option<crate::model::AssetStatus>,
28014
28015    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28016}
28017
28018impl Zone {
28019    pub fn new() -> Self {
28020        std::default::Default::default()
28021    }
28022
28023    /// Sets the value of [name][crate::model::Zone::name].
28024    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28025        self.name = v.into();
28026        self
28027    }
28028
28029    /// Sets the value of [display_name][crate::model::Zone::display_name].
28030    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28031        self.display_name = v.into();
28032        self
28033    }
28034
28035    /// Sets the value of [uid][crate::model::Zone::uid].
28036    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28037        self.uid = v.into();
28038        self
28039    }
28040
28041    /// Sets the value of [create_time][crate::model::Zone::create_time].
28042    pub fn set_create_time<T>(mut self, v: T) -> Self
28043    where
28044        T: std::convert::Into<wkt::Timestamp>,
28045    {
28046        self.create_time = std::option::Option::Some(v.into());
28047        self
28048    }
28049
28050    /// Sets or clears the value of [create_time][crate::model::Zone::create_time].
28051    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
28052    where
28053        T: std::convert::Into<wkt::Timestamp>,
28054    {
28055        self.create_time = v.map(|x| x.into());
28056        self
28057    }
28058
28059    /// Sets the value of [update_time][crate::model::Zone::update_time].
28060    pub fn set_update_time<T>(mut self, v: T) -> Self
28061    where
28062        T: std::convert::Into<wkt::Timestamp>,
28063    {
28064        self.update_time = std::option::Option::Some(v.into());
28065        self
28066    }
28067
28068    /// Sets or clears the value of [update_time][crate::model::Zone::update_time].
28069    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
28070    where
28071        T: std::convert::Into<wkt::Timestamp>,
28072    {
28073        self.update_time = v.map(|x| x.into());
28074        self
28075    }
28076
28077    /// Sets the value of [labels][crate::model::Zone::labels].
28078    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
28079    where
28080        T: std::iter::IntoIterator<Item = (K, V)>,
28081        K: std::convert::Into<std::string::String>,
28082        V: std::convert::Into<std::string::String>,
28083    {
28084        use std::iter::Iterator;
28085        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
28086        self
28087    }
28088
28089    /// Sets the value of [description][crate::model::Zone::description].
28090    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28091        self.description = v.into();
28092        self
28093    }
28094
28095    /// Sets the value of [state][crate::model::Zone::state].
28096    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
28097        self.state = v.into();
28098        self
28099    }
28100
28101    /// Sets the value of [r#type][crate::model::Zone::type].
28102    pub fn set_type<T: std::convert::Into<crate::model::zone::Type>>(mut self, v: T) -> Self {
28103        self.r#type = v.into();
28104        self
28105    }
28106
28107    /// Sets the value of [discovery_spec][crate::model::Zone::discovery_spec].
28108    pub fn set_discovery_spec<T>(mut self, v: T) -> Self
28109    where
28110        T: std::convert::Into<crate::model::zone::DiscoverySpec>,
28111    {
28112        self.discovery_spec = std::option::Option::Some(v.into());
28113        self
28114    }
28115
28116    /// Sets or clears the value of [discovery_spec][crate::model::Zone::discovery_spec].
28117    pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
28118    where
28119        T: std::convert::Into<crate::model::zone::DiscoverySpec>,
28120    {
28121        self.discovery_spec = v.map(|x| x.into());
28122        self
28123    }
28124
28125    /// Sets the value of [resource_spec][crate::model::Zone::resource_spec].
28126    pub fn set_resource_spec<T>(mut self, v: T) -> Self
28127    where
28128        T: std::convert::Into<crate::model::zone::ResourceSpec>,
28129    {
28130        self.resource_spec = std::option::Option::Some(v.into());
28131        self
28132    }
28133
28134    /// Sets or clears the value of [resource_spec][crate::model::Zone::resource_spec].
28135    pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
28136    where
28137        T: std::convert::Into<crate::model::zone::ResourceSpec>,
28138    {
28139        self.resource_spec = v.map(|x| x.into());
28140        self
28141    }
28142
28143    /// Sets the value of [asset_status][crate::model::Zone::asset_status].
28144    pub fn set_asset_status<T>(mut self, v: T) -> Self
28145    where
28146        T: std::convert::Into<crate::model::AssetStatus>,
28147    {
28148        self.asset_status = std::option::Option::Some(v.into());
28149        self
28150    }
28151
28152    /// Sets or clears the value of [asset_status][crate::model::Zone::asset_status].
28153    pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
28154    where
28155        T: std::convert::Into<crate::model::AssetStatus>,
28156    {
28157        self.asset_status = v.map(|x| x.into());
28158        self
28159    }
28160}
28161
28162impl wkt::message::Message for Zone {
28163    fn typename() -> &'static str {
28164        "type.googleapis.com/google.cloud.dataplex.v1.Zone"
28165    }
28166}
28167
28168/// Defines additional types related to [Zone].
28169pub mod zone {
28170    #[allow(unused_imports)]
28171    use super::*;
28172
28173    /// Settings for resources attached as assets within a zone.
28174    #[derive(Clone, Default, PartialEq)]
28175    #[non_exhaustive]
28176    pub struct ResourceSpec {
28177        /// Required. Immutable. The location type of the resources that are allowed
28178        /// to be attached to the assets within this zone.
28179        pub location_type: crate::model::zone::resource_spec::LocationType,
28180
28181        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28182    }
28183
28184    impl ResourceSpec {
28185        pub fn new() -> Self {
28186            std::default::Default::default()
28187        }
28188
28189        /// Sets the value of [location_type][crate::model::zone::ResourceSpec::location_type].
28190        pub fn set_location_type<
28191            T: std::convert::Into<crate::model::zone::resource_spec::LocationType>,
28192        >(
28193            mut self,
28194            v: T,
28195        ) -> Self {
28196            self.location_type = v.into();
28197            self
28198        }
28199    }
28200
28201    impl wkt::message::Message for ResourceSpec {
28202        fn typename() -> &'static str {
28203            "type.googleapis.com/google.cloud.dataplex.v1.Zone.ResourceSpec"
28204        }
28205    }
28206
28207    /// Defines additional types related to [ResourceSpec].
28208    pub mod resource_spec {
28209        #[allow(unused_imports)]
28210        use super::*;
28211
28212        /// Location type of the resources attached to a zone.
28213        ///
28214        /// # Working with unknown values
28215        ///
28216        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28217        /// additional enum variants at any time. Adding new variants is not considered
28218        /// a breaking change. Applications should write their code in anticipation of:
28219        ///
28220        /// - New values appearing in future releases of the client library, **and**
28221        /// - New values received dynamically, without application changes.
28222        ///
28223        /// Please consult the [Working with enums] section in the user guide for some
28224        /// guidelines.
28225        ///
28226        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28227        #[derive(Clone, Debug, PartialEq)]
28228        #[non_exhaustive]
28229        pub enum LocationType {
28230            /// Unspecified location type.
28231            Unspecified,
28232            /// Resources that are associated with a single region.
28233            SingleRegion,
28234            /// Resources that are associated with a multi-region location.
28235            MultiRegion,
28236            /// If set, the enum was initialized with an unknown value.
28237            ///
28238            /// Applications can examine the value using [LocationType::value] or
28239            /// [LocationType::name].
28240            UnknownValue(location_type::UnknownValue),
28241        }
28242
28243        #[doc(hidden)]
28244        pub mod location_type {
28245            #[allow(unused_imports)]
28246            use super::*;
28247            #[derive(Clone, Debug, PartialEq)]
28248            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28249        }
28250
28251        impl LocationType {
28252            /// Gets the enum value.
28253            ///
28254            /// Returns `None` if the enum contains an unknown value deserialized from
28255            /// the string representation of enums.
28256            pub fn value(&self) -> std::option::Option<i32> {
28257                match self {
28258                    Self::Unspecified => std::option::Option::Some(0),
28259                    Self::SingleRegion => std::option::Option::Some(1),
28260                    Self::MultiRegion => std::option::Option::Some(2),
28261                    Self::UnknownValue(u) => u.0.value(),
28262                }
28263            }
28264
28265            /// Gets the enum value as a string.
28266            ///
28267            /// Returns `None` if the enum contains an unknown value deserialized from
28268            /// the integer representation of enums.
28269            pub fn name(&self) -> std::option::Option<&str> {
28270                match self {
28271                    Self::Unspecified => std::option::Option::Some("LOCATION_TYPE_UNSPECIFIED"),
28272                    Self::SingleRegion => std::option::Option::Some("SINGLE_REGION"),
28273                    Self::MultiRegion => std::option::Option::Some("MULTI_REGION"),
28274                    Self::UnknownValue(u) => u.0.name(),
28275                }
28276            }
28277        }
28278
28279        impl std::default::Default for LocationType {
28280            fn default() -> Self {
28281                use std::convert::From;
28282                Self::from(0)
28283            }
28284        }
28285
28286        impl std::fmt::Display for LocationType {
28287            fn fmt(
28288                &self,
28289                f: &mut std::fmt::Formatter<'_>,
28290            ) -> std::result::Result<(), std::fmt::Error> {
28291                wkt::internal::display_enum(f, self.name(), self.value())
28292            }
28293        }
28294
28295        impl std::convert::From<i32> for LocationType {
28296            fn from(value: i32) -> Self {
28297                match value {
28298                    0 => Self::Unspecified,
28299                    1 => Self::SingleRegion,
28300                    2 => Self::MultiRegion,
28301                    _ => Self::UnknownValue(location_type::UnknownValue(
28302                        wkt::internal::UnknownEnumValue::Integer(value),
28303                    )),
28304                }
28305            }
28306        }
28307
28308        impl std::convert::From<&str> for LocationType {
28309            fn from(value: &str) -> Self {
28310                use std::string::ToString;
28311                match value {
28312                    "LOCATION_TYPE_UNSPECIFIED" => Self::Unspecified,
28313                    "SINGLE_REGION" => Self::SingleRegion,
28314                    "MULTI_REGION" => Self::MultiRegion,
28315                    _ => Self::UnknownValue(location_type::UnknownValue(
28316                        wkt::internal::UnknownEnumValue::String(value.to_string()),
28317                    )),
28318                }
28319            }
28320        }
28321
28322        impl serde::ser::Serialize for LocationType {
28323            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28324            where
28325                S: serde::Serializer,
28326            {
28327                match self {
28328                    Self::Unspecified => serializer.serialize_i32(0),
28329                    Self::SingleRegion => serializer.serialize_i32(1),
28330                    Self::MultiRegion => serializer.serialize_i32(2),
28331                    Self::UnknownValue(u) => u.0.serialize(serializer),
28332                }
28333            }
28334        }
28335
28336        impl<'de> serde::de::Deserialize<'de> for LocationType {
28337            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28338            where
28339                D: serde::Deserializer<'de>,
28340            {
28341                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationType>::new(
28342                    ".google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType",
28343                ))
28344            }
28345        }
28346    }
28347
28348    /// Settings to manage the metadata discovery and publishing in a zone.
28349    #[derive(Clone, Default, PartialEq)]
28350    #[non_exhaustive]
28351    pub struct DiscoverySpec {
28352        /// Required. Whether discovery is enabled.
28353        pub enabled: bool,
28354
28355        /// Optional. The list of patterns to apply for selecting data to include
28356        /// during discovery if only a subset of the data should considered. For
28357        /// Cloud Storage bucket assets, these are interpreted as glob patterns used
28358        /// to match object names. For BigQuery dataset assets, these are interpreted
28359        /// as patterns to match table names.
28360        pub include_patterns: std::vec::Vec<std::string::String>,
28361
28362        /// Optional. The list of patterns to apply for selecting data to exclude
28363        /// during discovery.  For Cloud Storage bucket assets, these are interpreted
28364        /// as glob patterns used to match object names. For BigQuery dataset assets,
28365        /// these are interpreted as patterns to match table names.
28366        pub exclude_patterns: std::vec::Vec<std::string::String>,
28367
28368        /// Optional. Configuration for CSV data.
28369        pub csv_options: std::option::Option<crate::model::zone::discovery_spec::CsvOptions>,
28370
28371        /// Optional. Configuration for Json data.
28372        pub json_options: std::option::Option<crate::model::zone::discovery_spec::JsonOptions>,
28373
28374        /// Determines when discovery is triggered.
28375        pub trigger: std::option::Option<crate::model::zone::discovery_spec::Trigger>,
28376
28377        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28378    }
28379
28380    impl DiscoverySpec {
28381        pub fn new() -> Self {
28382            std::default::Default::default()
28383        }
28384
28385        /// Sets the value of [enabled][crate::model::zone::DiscoverySpec::enabled].
28386        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
28387            self.enabled = v.into();
28388            self
28389        }
28390
28391        /// Sets the value of [include_patterns][crate::model::zone::DiscoverySpec::include_patterns].
28392        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
28393        where
28394            T: std::iter::IntoIterator<Item = V>,
28395            V: std::convert::Into<std::string::String>,
28396        {
28397            use std::iter::Iterator;
28398            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
28399            self
28400        }
28401
28402        /// Sets the value of [exclude_patterns][crate::model::zone::DiscoverySpec::exclude_patterns].
28403        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
28404        where
28405            T: std::iter::IntoIterator<Item = V>,
28406            V: std::convert::Into<std::string::String>,
28407        {
28408            use std::iter::Iterator;
28409            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
28410            self
28411        }
28412
28413        /// Sets the value of [csv_options][crate::model::zone::DiscoverySpec::csv_options].
28414        pub fn set_csv_options<T>(mut self, v: T) -> Self
28415        where
28416            T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
28417        {
28418            self.csv_options = std::option::Option::Some(v.into());
28419            self
28420        }
28421
28422        /// Sets or clears the value of [csv_options][crate::model::zone::DiscoverySpec::csv_options].
28423        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
28424        where
28425            T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
28426        {
28427            self.csv_options = v.map(|x| x.into());
28428            self
28429        }
28430
28431        /// Sets the value of [json_options][crate::model::zone::DiscoverySpec::json_options].
28432        pub fn set_json_options<T>(mut self, v: T) -> Self
28433        where
28434            T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
28435        {
28436            self.json_options = std::option::Option::Some(v.into());
28437            self
28438        }
28439
28440        /// Sets or clears the value of [json_options][crate::model::zone::DiscoverySpec::json_options].
28441        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
28442        where
28443            T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
28444        {
28445            self.json_options = v.map(|x| x.into());
28446            self
28447        }
28448
28449        /// Sets the value of [trigger][crate::model::zone::DiscoverySpec::trigger].
28450        ///
28451        /// Note that all the setters affecting `trigger` are mutually
28452        /// exclusive.
28453        pub fn set_trigger<
28454            T: std::convert::Into<std::option::Option<crate::model::zone::discovery_spec::Trigger>>,
28455        >(
28456            mut self,
28457            v: T,
28458        ) -> Self {
28459            self.trigger = v.into();
28460            self
28461        }
28462
28463        /// The value of [trigger][crate::model::zone::DiscoverySpec::trigger]
28464        /// if it holds a `Schedule`, `None` if the field is not set or
28465        /// holds a different branch.
28466        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
28467            #[allow(unreachable_patterns)]
28468            self.trigger.as_ref().and_then(|v| match v {
28469                crate::model::zone::discovery_spec::Trigger::Schedule(v) => {
28470                    std::option::Option::Some(v)
28471                }
28472                _ => std::option::Option::None,
28473            })
28474        }
28475
28476        /// Sets the value of [trigger][crate::model::zone::DiscoverySpec::trigger]
28477        /// to hold a `Schedule`.
28478        ///
28479        /// Note that all the setters affecting `trigger` are
28480        /// mutually exclusive.
28481        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28482            self.trigger = std::option::Option::Some(
28483                crate::model::zone::discovery_spec::Trigger::Schedule(v.into()),
28484            );
28485            self
28486        }
28487    }
28488
28489    impl wkt::message::Message for DiscoverySpec {
28490        fn typename() -> &'static str {
28491            "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec"
28492        }
28493    }
28494
28495    /// Defines additional types related to [DiscoverySpec].
28496    pub mod discovery_spec {
28497        #[allow(unused_imports)]
28498        use super::*;
28499
28500        /// Describe CSV and similar semi-structured data formats.
28501        #[derive(Clone, Default, PartialEq)]
28502        #[non_exhaustive]
28503        pub struct CsvOptions {
28504            /// Optional. The number of rows to interpret as header rows that should be
28505            /// skipped when reading data rows.
28506            pub header_rows: i32,
28507
28508            /// Optional. The delimiter being used to separate values. This defaults to
28509            /// ','.
28510            pub delimiter: std::string::String,
28511
28512            /// Optional. The character encoding of the data. The default is UTF-8.
28513            pub encoding: std::string::String,
28514
28515            /// Optional. Whether to disable the inference of data type for CSV data.
28516            /// If true, all columns will be registered as strings.
28517            pub disable_type_inference: bool,
28518
28519            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28520        }
28521
28522        impl CsvOptions {
28523            pub fn new() -> Self {
28524                std::default::Default::default()
28525            }
28526
28527            /// Sets the value of [header_rows][crate::model::zone::discovery_spec::CsvOptions::header_rows].
28528            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
28529                self.header_rows = v.into();
28530                self
28531            }
28532
28533            /// Sets the value of [delimiter][crate::model::zone::discovery_spec::CsvOptions::delimiter].
28534            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
28535                mut self,
28536                v: T,
28537            ) -> Self {
28538                self.delimiter = v.into();
28539                self
28540            }
28541
28542            /// Sets the value of [encoding][crate::model::zone::discovery_spec::CsvOptions::encoding].
28543            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
28544                mut self,
28545                v: T,
28546            ) -> Self {
28547                self.encoding = v.into();
28548                self
28549            }
28550
28551            /// Sets the value of [disable_type_inference][crate::model::zone::discovery_spec::CsvOptions::disable_type_inference].
28552            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
28553                self.disable_type_inference = v.into();
28554                self
28555            }
28556        }
28557
28558        impl wkt::message::Message for CsvOptions {
28559            fn typename() -> &'static str {
28560                "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions"
28561            }
28562        }
28563
28564        /// Describe JSON data format.
28565        #[derive(Clone, Default, PartialEq)]
28566        #[non_exhaustive]
28567        pub struct JsonOptions {
28568            /// Optional. The character encoding of the data. The default is UTF-8.
28569            pub encoding: std::string::String,
28570
28571            /// Optional. Whether to disable the inference of data type for Json data.
28572            /// If true, all columns will be registered as their primitive types
28573            /// (strings, number or boolean).
28574            pub disable_type_inference: bool,
28575
28576            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28577        }
28578
28579        impl JsonOptions {
28580            pub fn new() -> Self {
28581                std::default::Default::default()
28582            }
28583
28584            /// Sets the value of [encoding][crate::model::zone::discovery_spec::JsonOptions::encoding].
28585            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
28586                mut self,
28587                v: T,
28588            ) -> Self {
28589                self.encoding = v.into();
28590                self
28591            }
28592
28593            /// Sets the value of [disable_type_inference][crate::model::zone::discovery_spec::JsonOptions::disable_type_inference].
28594            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
28595                self.disable_type_inference = v.into();
28596                self
28597            }
28598        }
28599
28600        impl wkt::message::Message for JsonOptions {
28601            fn typename() -> &'static str {
28602                "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions"
28603            }
28604        }
28605
28606        /// Determines when discovery is triggered.
28607        #[derive(Clone, Debug, PartialEq)]
28608        #[non_exhaustive]
28609        pub enum Trigger {
28610            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
28611            /// running discovery periodically. Successive discovery runs must be
28612            /// scheduled at least 60 minutes apart. The default value is to run
28613            /// discovery every 60 minutes.
28614            ///
28615            /// To explicitly set a timezone to the cron tab, apply a prefix in the
28616            /// cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}".
28617            /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
28618            /// database. For example, `CRON_TZ=America/New_York 1 * * * *`, or
28619            /// `TZ=America/New_York 1 * * * *`.
28620            Schedule(std::string::String),
28621        }
28622    }
28623
28624    /// Type of zone.
28625    ///
28626    /// # Working with unknown values
28627    ///
28628    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28629    /// additional enum variants at any time. Adding new variants is not considered
28630    /// a breaking change. Applications should write their code in anticipation of:
28631    ///
28632    /// - New values appearing in future releases of the client library, **and**
28633    /// - New values received dynamically, without application changes.
28634    ///
28635    /// Please consult the [Working with enums] section in the user guide for some
28636    /// guidelines.
28637    ///
28638    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28639    #[derive(Clone, Debug, PartialEq)]
28640    #[non_exhaustive]
28641    pub enum Type {
28642        /// Zone type not specified.
28643        Unspecified,
28644        /// A zone that contains data that needs further processing before it is
28645        /// considered generally ready for consumption and analytics workloads.
28646        Raw,
28647        /// A zone that contains data that is considered to be ready for broader
28648        /// consumption and analytics workloads. Curated structured data stored in
28649        /// Cloud Storage must conform to certain file formats (parquet, avro and
28650        /// orc) and organized in a hive-compatible directory layout.
28651        Curated,
28652        /// If set, the enum was initialized with an unknown value.
28653        ///
28654        /// Applications can examine the value using [Type::value] or
28655        /// [Type::name].
28656        UnknownValue(r#type::UnknownValue),
28657    }
28658
28659    #[doc(hidden)]
28660    pub mod r#type {
28661        #[allow(unused_imports)]
28662        use super::*;
28663        #[derive(Clone, Debug, PartialEq)]
28664        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28665    }
28666
28667    impl Type {
28668        /// Gets the enum value.
28669        ///
28670        /// Returns `None` if the enum contains an unknown value deserialized from
28671        /// the string representation of enums.
28672        pub fn value(&self) -> std::option::Option<i32> {
28673            match self {
28674                Self::Unspecified => std::option::Option::Some(0),
28675                Self::Raw => std::option::Option::Some(1),
28676                Self::Curated => std::option::Option::Some(2),
28677                Self::UnknownValue(u) => u.0.value(),
28678            }
28679        }
28680
28681        /// Gets the enum value as a string.
28682        ///
28683        /// Returns `None` if the enum contains an unknown value deserialized from
28684        /// the integer representation of enums.
28685        pub fn name(&self) -> std::option::Option<&str> {
28686            match self {
28687                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
28688                Self::Raw => std::option::Option::Some("RAW"),
28689                Self::Curated => std::option::Option::Some("CURATED"),
28690                Self::UnknownValue(u) => u.0.name(),
28691            }
28692        }
28693    }
28694
28695    impl std::default::Default for Type {
28696        fn default() -> Self {
28697            use std::convert::From;
28698            Self::from(0)
28699        }
28700    }
28701
28702    impl std::fmt::Display for Type {
28703        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28704            wkt::internal::display_enum(f, self.name(), self.value())
28705        }
28706    }
28707
28708    impl std::convert::From<i32> for Type {
28709        fn from(value: i32) -> Self {
28710            match value {
28711                0 => Self::Unspecified,
28712                1 => Self::Raw,
28713                2 => Self::Curated,
28714                _ => Self::UnknownValue(r#type::UnknownValue(
28715                    wkt::internal::UnknownEnumValue::Integer(value),
28716                )),
28717            }
28718        }
28719    }
28720
28721    impl std::convert::From<&str> for Type {
28722        fn from(value: &str) -> Self {
28723            use std::string::ToString;
28724            match value {
28725                "TYPE_UNSPECIFIED" => Self::Unspecified,
28726                "RAW" => Self::Raw,
28727                "CURATED" => Self::Curated,
28728                _ => Self::UnknownValue(r#type::UnknownValue(
28729                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28730                )),
28731            }
28732        }
28733    }
28734
28735    impl serde::ser::Serialize for Type {
28736        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28737        where
28738            S: serde::Serializer,
28739        {
28740            match self {
28741                Self::Unspecified => serializer.serialize_i32(0),
28742                Self::Raw => serializer.serialize_i32(1),
28743                Self::Curated => serializer.serialize_i32(2),
28744                Self::UnknownValue(u) => u.0.serialize(serializer),
28745            }
28746        }
28747    }
28748
28749    impl<'de> serde::de::Deserialize<'de> for Type {
28750        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28751        where
28752            D: serde::Deserializer<'de>,
28753        {
28754            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
28755                ".google.cloud.dataplex.v1.Zone.Type",
28756            ))
28757        }
28758    }
28759}
28760
28761/// Action represents an issue requiring administrator action for resolution.
28762#[derive(Clone, Default, PartialEq)]
28763#[non_exhaustive]
28764pub struct Action {
28765    /// The category of issue associated with the action.
28766    pub category: crate::model::action::Category,
28767
28768    /// Detailed description of the issue requiring action.
28769    pub issue: std::string::String,
28770
28771    /// The time that the issue was detected.
28772    pub detect_time: std::option::Option<wkt::Timestamp>,
28773
28774    /// Output only. The relative resource name of the action, of the form:
28775    /// `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}`
28776    /// `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}`
28777    /// `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`.
28778    pub name: std::string::String,
28779
28780    /// Output only. The relative resource name of the lake, of the form:
28781    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
28782    pub lake: std::string::String,
28783
28784    /// Output only. The relative resource name of the zone, of the form:
28785    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
28786    pub zone: std::string::String,
28787
28788    /// Output only. The relative resource name of the asset, of the form:
28789    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
28790    pub asset: std::string::String,
28791
28792    /// The list of data locations associated with this action. Cloud Storage
28793    /// locations are represented as URI paths(E.g.
28794    /// `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to
28795    /// resource names(E.g.
28796    /// `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`).
28797    pub data_locations: std::vec::Vec<std::string::String>,
28798
28799    /// Additional details about the action based on the action category.
28800    pub details: std::option::Option<crate::model::action::Details>,
28801
28802    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28803}
28804
28805impl Action {
28806    pub fn new() -> Self {
28807        std::default::Default::default()
28808    }
28809
28810    /// Sets the value of [category][crate::model::Action::category].
28811    pub fn set_category<T: std::convert::Into<crate::model::action::Category>>(
28812        mut self,
28813        v: T,
28814    ) -> Self {
28815        self.category = v.into();
28816        self
28817    }
28818
28819    /// Sets the value of [issue][crate::model::Action::issue].
28820    pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28821        self.issue = v.into();
28822        self
28823    }
28824
28825    /// Sets the value of [detect_time][crate::model::Action::detect_time].
28826    pub fn set_detect_time<T>(mut self, v: T) -> Self
28827    where
28828        T: std::convert::Into<wkt::Timestamp>,
28829    {
28830        self.detect_time = std::option::Option::Some(v.into());
28831        self
28832    }
28833
28834    /// Sets or clears the value of [detect_time][crate::model::Action::detect_time].
28835    pub fn set_or_clear_detect_time<T>(mut self, v: std::option::Option<T>) -> Self
28836    where
28837        T: std::convert::Into<wkt::Timestamp>,
28838    {
28839        self.detect_time = v.map(|x| x.into());
28840        self
28841    }
28842
28843    /// Sets the value of [name][crate::model::Action::name].
28844    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28845        self.name = v.into();
28846        self
28847    }
28848
28849    /// Sets the value of [lake][crate::model::Action::lake].
28850    pub fn set_lake<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28851        self.lake = v.into();
28852        self
28853    }
28854
28855    /// Sets the value of [zone][crate::model::Action::zone].
28856    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28857        self.zone = v.into();
28858        self
28859    }
28860
28861    /// Sets the value of [asset][crate::model::Action::asset].
28862    pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28863        self.asset = v.into();
28864        self
28865    }
28866
28867    /// Sets the value of [data_locations][crate::model::Action::data_locations].
28868    pub fn set_data_locations<T, V>(mut self, v: T) -> Self
28869    where
28870        T: std::iter::IntoIterator<Item = V>,
28871        V: std::convert::Into<std::string::String>,
28872    {
28873        use std::iter::Iterator;
28874        self.data_locations = v.into_iter().map(|i| i.into()).collect();
28875        self
28876    }
28877
28878    /// Sets the value of [details][crate::model::Action::details].
28879    ///
28880    /// Note that all the setters affecting `details` are mutually
28881    /// exclusive.
28882    pub fn set_details<
28883        T: std::convert::Into<std::option::Option<crate::model::action::Details>>,
28884    >(
28885        mut self,
28886        v: T,
28887    ) -> Self {
28888        self.details = v.into();
28889        self
28890    }
28891
28892    /// The value of [details][crate::model::Action::details]
28893    /// if it holds a `InvalidDataFormat`, `None` if the field is not set or
28894    /// holds a different branch.
28895    pub fn invalid_data_format(
28896        &self,
28897    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataFormat>> {
28898        #[allow(unreachable_patterns)]
28899        self.details.as_ref().and_then(|v| match v {
28900            crate::model::action::Details::InvalidDataFormat(v) => std::option::Option::Some(v),
28901            _ => std::option::Option::None,
28902        })
28903    }
28904
28905    /// Sets the value of [details][crate::model::Action::details]
28906    /// to hold a `InvalidDataFormat`.
28907    ///
28908    /// Note that all the setters affecting `details` are
28909    /// mutually exclusive.
28910    pub fn set_invalid_data_format<
28911        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataFormat>>,
28912    >(
28913        mut self,
28914        v: T,
28915    ) -> Self {
28916        self.details =
28917            std::option::Option::Some(crate::model::action::Details::InvalidDataFormat(v.into()));
28918        self
28919    }
28920
28921    /// The value of [details][crate::model::Action::details]
28922    /// if it holds a `IncompatibleDataSchema`, `None` if the field is not set or
28923    /// holds a different branch.
28924    pub fn incompatible_data_schema(
28925        &self,
28926    ) -> std::option::Option<&std::boxed::Box<crate::model::action::IncompatibleDataSchema>> {
28927        #[allow(unreachable_patterns)]
28928        self.details.as_ref().and_then(|v| match v {
28929            crate::model::action::Details::IncompatibleDataSchema(v) => {
28930                std::option::Option::Some(v)
28931            }
28932            _ => std::option::Option::None,
28933        })
28934    }
28935
28936    /// Sets the value of [details][crate::model::Action::details]
28937    /// to hold a `IncompatibleDataSchema`.
28938    ///
28939    /// Note that all the setters affecting `details` are
28940    /// mutually exclusive.
28941    pub fn set_incompatible_data_schema<
28942        T: std::convert::Into<std::boxed::Box<crate::model::action::IncompatibleDataSchema>>,
28943    >(
28944        mut self,
28945        v: T,
28946    ) -> Self {
28947        self.details = std::option::Option::Some(
28948            crate::model::action::Details::IncompatibleDataSchema(v.into()),
28949        );
28950        self
28951    }
28952
28953    /// The value of [details][crate::model::Action::details]
28954    /// if it holds a `InvalidDataPartition`, `None` if the field is not set or
28955    /// holds a different branch.
28956    pub fn invalid_data_partition(
28957        &self,
28958    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataPartition>> {
28959        #[allow(unreachable_patterns)]
28960        self.details.as_ref().and_then(|v| match v {
28961            crate::model::action::Details::InvalidDataPartition(v) => std::option::Option::Some(v),
28962            _ => std::option::Option::None,
28963        })
28964    }
28965
28966    /// Sets the value of [details][crate::model::Action::details]
28967    /// to hold a `InvalidDataPartition`.
28968    ///
28969    /// Note that all the setters affecting `details` are
28970    /// mutually exclusive.
28971    pub fn set_invalid_data_partition<
28972        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataPartition>>,
28973    >(
28974        mut self,
28975        v: T,
28976    ) -> Self {
28977        self.details = std::option::Option::Some(
28978            crate::model::action::Details::InvalidDataPartition(v.into()),
28979        );
28980        self
28981    }
28982
28983    /// The value of [details][crate::model::Action::details]
28984    /// if it holds a `MissingData`, `None` if the field is not set or
28985    /// holds a different branch.
28986    pub fn missing_data(
28987        &self,
28988    ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingData>> {
28989        #[allow(unreachable_patterns)]
28990        self.details.as_ref().and_then(|v| match v {
28991            crate::model::action::Details::MissingData(v) => std::option::Option::Some(v),
28992            _ => std::option::Option::None,
28993        })
28994    }
28995
28996    /// Sets the value of [details][crate::model::Action::details]
28997    /// to hold a `MissingData`.
28998    ///
28999    /// Note that all the setters affecting `details` are
29000    /// mutually exclusive.
29001    pub fn set_missing_data<
29002        T: std::convert::Into<std::boxed::Box<crate::model::action::MissingData>>,
29003    >(
29004        mut self,
29005        v: T,
29006    ) -> Self {
29007        self.details =
29008            std::option::Option::Some(crate::model::action::Details::MissingData(v.into()));
29009        self
29010    }
29011
29012    /// The value of [details][crate::model::Action::details]
29013    /// if it holds a `MissingResource`, `None` if the field is not set or
29014    /// holds a different branch.
29015    pub fn missing_resource(
29016        &self,
29017    ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingResource>> {
29018        #[allow(unreachable_patterns)]
29019        self.details.as_ref().and_then(|v| match v {
29020            crate::model::action::Details::MissingResource(v) => std::option::Option::Some(v),
29021            _ => std::option::Option::None,
29022        })
29023    }
29024
29025    /// Sets the value of [details][crate::model::Action::details]
29026    /// to hold a `MissingResource`.
29027    ///
29028    /// Note that all the setters affecting `details` are
29029    /// mutually exclusive.
29030    pub fn set_missing_resource<
29031        T: std::convert::Into<std::boxed::Box<crate::model::action::MissingResource>>,
29032    >(
29033        mut self,
29034        v: T,
29035    ) -> Self {
29036        self.details =
29037            std::option::Option::Some(crate::model::action::Details::MissingResource(v.into()));
29038        self
29039    }
29040
29041    /// The value of [details][crate::model::Action::details]
29042    /// if it holds a `UnauthorizedResource`, `None` if the field is not set or
29043    /// holds a different branch.
29044    pub fn unauthorized_resource(
29045        &self,
29046    ) -> std::option::Option<&std::boxed::Box<crate::model::action::UnauthorizedResource>> {
29047        #[allow(unreachable_patterns)]
29048        self.details.as_ref().and_then(|v| match v {
29049            crate::model::action::Details::UnauthorizedResource(v) => std::option::Option::Some(v),
29050            _ => std::option::Option::None,
29051        })
29052    }
29053
29054    /// Sets the value of [details][crate::model::Action::details]
29055    /// to hold a `UnauthorizedResource`.
29056    ///
29057    /// Note that all the setters affecting `details` are
29058    /// mutually exclusive.
29059    pub fn set_unauthorized_resource<
29060        T: std::convert::Into<std::boxed::Box<crate::model::action::UnauthorizedResource>>,
29061    >(
29062        mut self,
29063        v: T,
29064    ) -> Self {
29065        self.details = std::option::Option::Some(
29066            crate::model::action::Details::UnauthorizedResource(v.into()),
29067        );
29068        self
29069    }
29070
29071    /// The value of [details][crate::model::Action::details]
29072    /// if it holds a `FailedSecurityPolicyApply`, `None` if the field is not set or
29073    /// holds a different branch.
29074    pub fn failed_security_policy_apply(
29075        &self,
29076    ) -> std::option::Option<&std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>
29077    {
29078        #[allow(unreachable_patterns)]
29079        self.details.as_ref().and_then(|v| match v {
29080            crate::model::action::Details::FailedSecurityPolicyApply(v) => {
29081                std::option::Option::Some(v)
29082            }
29083            _ => std::option::Option::None,
29084        })
29085    }
29086
29087    /// Sets the value of [details][crate::model::Action::details]
29088    /// to hold a `FailedSecurityPolicyApply`.
29089    ///
29090    /// Note that all the setters affecting `details` are
29091    /// mutually exclusive.
29092    pub fn set_failed_security_policy_apply<
29093        T: std::convert::Into<std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>,
29094    >(
29095        mut self,
29096        v: T,
29097    ) -> Self {
29098        self.details = std::option::Option::Some(
29099            crate::model::action::Details::FailedSecurityPolicyApply(v.into()),
29100        );
29101        self
29102    }
29103
29104    /// The value of [details][crate::model::Action::details]
29105    /// if it holds a `InvalidDataOrganization`, `None` if the field is not set or
29106    /// holds a different branch.
29107    pub fn invalid_data_organization(
29108        &self,
29109    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataOrganization>> {
29110        #[allow(unreachable_patterns)]
29111        self.details.as_ref().and_then(|v| match v {
29112            crate::model::action::Details::InvalidDataOrganization(v) => {
29113                std::option::Option::Some(v)
29114            }
29115            _ => std::option::Option::None,
29116        })
29117    }
29118
29119    /// Sets the value of [details][crate::model::Action::details]
29120    /// to hold a `InvalidDataOrganization`.
29121    ///
29122    /// Note that all the setters affecting `details` are
29123    /// mutually exclusive.
29124    pub fn set_invalid_data_organization<
29125        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataOrganization>>,
29126    >(
29127        mut self,
29128        v: T,
29129    ) -> Self {
29130        self.details = std::option::Option::Some(
29131            crate::model::action::Details::InvalidDataOrganization(v.into()),
29132        );
29133        self
29134    }
29135}
29136
29137impl wkt::message::Message for Action {
29138    fn typename() -> &'static str {
29139        "type.googleapis.com/google.cloud.dataplex.v1.Action"
29140    }
29141}
29142
29143/// Defines additional types related to [Action].
29144pub mod action {
29145    #[allow(unused_imports)]
29146    use super::*;
29147
29148    /// Action details for resource references in assets that cannot be located.
29149    #[derive(Clone, Default, PartialEq)]
29150    #[non_exhaustive]
29151    pub struct MissingResource {
29152        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29153    }
29154
29155    impl MissingResource {
29156        pub fn new() -> Self {
29157            std::default::Default::default()
29158        }
29159    }
29160
29161    impl wkt::message::Message for MissingResource {
29162        fn typename() -> &'static str {
29163            "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingResource"
29164        }
29165    }
29166
29167    /// Action details for unauthorized resource issues raised to indicate that the
29168    /// service account associated with the lake instance is not authorized to
29169    /// access or manage the resource associated with an asset.
29170    #[derive(Clone, Default, PartialEq)]
29171    #[non_exhaustive]
29172    pub struct UnauthorizedResource {
29173        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29174    }
29175
29176    impl UnauthorizedResource {
29177        pub fn new() -> Self {
29178            std::default::Default::default()
29179        }
29180    }
29181
29182    impl wkt::message::Message for UnauthorizedResource {
29183        fn typename() -> &'static str {
29184            "type.googleapis.com/google.cloud.dataplex.v1.Action.UnauthorizedResource"
29185        }
29186    }
29187
29188    /// Failed to apply security policy to the managed resource(s) under a
29189    /// lake, zone or an asset. For a lake or zone resource, one or more underlying
29190    /// assets has a failure applying security policy to the associated managed
29191    /// resource.
29192    #[derive(Clone, Default, PartialEq)]
29193    #[non_exhaustive]
29194    pub struct FailedSecurityPolicyApply {
29195        /// Resource name of one of the assets with failing security policy
29196        /// application. Populated for a lake or zone resource only.
29197        pub asset: std::string::String,
29198
29199        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29200    }
29201
29202    impl FailedSecurityPolicyApply {
29203        pub fn new() -> Self {
29204            std::default::Default::default()
29205        }
29206
29207        /// Sets the value of [asset][crate::model::action::FailedSecurityPolicyApply::asset].
29208        pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29209            self.asset = v.into();
29210            self
29211        }
29212    }
29213
29214    impl wkt::message::Message for FailedSecurityPolicyApply {
29215        fn typename() -> &'static str {
29216            "type.googleapis.com/google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply"
29217        }
29218    }
29219
29220    /// Action details for invalid or unsupported data files detected by discovery.
29221    #[derive(Clone, Default, PartialEq)]
29222    #[non_exhaustive]
29223    pub struct InvalidDataFormat {
29224        /// The list of data locations sampled and used for format/schema
29225        /// inference.
29226        pub sampled_data_locations: std::vec::Vec<std::string::String>,
29227
29228        /// The expected data format of the entity.
29229        pub expected_format: std::string::String,
29230
29231        /// The new unexpected data format within the entity.
29232        pub new_format: std::string::String,
29233
29234        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29235    }
29236
29237    impl InvalidDataFormat {
29238        pub fn new() -> Self {
29239            std::default::Default::default()
29240        }
29241
29242        /// Sets the value of [sampled_data_locations][crate::model::action::InvalidDataFormat::sampled_data_locations].
29243        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
29244        where
29245            T: std::iter::IntoIterator<Item = V>,
29246            V: std::convert::Into<std::string::String>,
29247        {
29248            use std::iter::Iterator;
29249            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
29250            self
29251        }
29252
29253        /// Sets the value of [expected_format][crate::model::action::InvalidDataFormat::expected_format].
29254        pub fn set_expected_format<T: std::convert::Into<std::string::String>>(
29255            mut self,
29256            v: T,
29257        ) -> Self {
29258            self.expected_format = v.into();
29259            self
29260        }
29261
29262        /// Sets the value of [new_format][crate::model::action::InvalidDataFormat::new_format].
29263        pub fn set_new_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29264            self.new_format = v.into();
29265            self
29266        }
29267    }
29268
29269    impl wkt::message::Message for InvalidDataFormat {
29270        fn typename() -> &'static str {
29271            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataFormat"
29272        }
29273    }
29274
29275    /// Action details for incompatible schemas detected by discovery.
29276    #[derive(Clone, Default, PartialEq)]
29277    #[non_exhaustive]
29278    pub struct IncompatibleDataSchema {
29279        /// The name of the table containing invalid data.
29280        pub table: std::string::String,
29281
29282        /// The existing and expected schema of the table. The schema is provided as
29283        /// a JSON formatted structure listing columns and data types.
29284        pub existing_schema: std::string::String,
29285
29286        /// The new and incompatible schema within the table. The schema is provided
29287        /// as a JSON formatted structured listing columns and data types.
29288        pub new_schema: std::string::String,
29289
29290        /// The list of data locations sampled and used for format/schema
29291        /// inference.
29292        pub sampled_data_locations: std::vec::Vec<std::string::String>,
29293
29294        /// Whether the action relates to a schema that is incompatible or modified.
29295        pub schema_change: crate::model::action::incompatible_data_schema::SchemaChange,
29296
29297        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29298    }
29299
29300    impl IncompatibleDataSchema {
29301        pub fn new() -> Self {
29302            std::default::Default::default()
29303        }
29304
29305        /// Sets the value of [table][crate::model::action::IncompatibleDataSchema::table].
29306        pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29307            self.table = v.into();
29308            self
29309        }
29310
29311        /// Sets the value of [existing_schema][crate::model::action::IncompatibleDataSchema::existing_schema].
29312        pub fn set_existing_schema<T: std::convert::Into<std::string::String>>(
29313            mut self,
29314            v: T,
29315        ) -> Self {
29316            self.existing_schema = v.into();
29317            self
29318        }
29319
29320        /// Sets the value of [new_schema][crate::model::action::IncompatibleDataSchema::new_schema].
29321        pub fn set_new_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29322            self.new_schema = v.into();
29323            self
29324        }
29325
29326        /// Sets the value of [sampled_data_locations][crate::model::action::IncompatibleDataSchema::sampled_data_locations].
29327        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
29328        where
29329            T: std::iter::IntoIterator<Item = V>,
29330            V: std::convert::Into<std::string::String>,
29331        {
29332            use std::iter::Iterator;
29333            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
29334            self
29335        }
29336
29337        /// Sets the value of [schema_change][crate::model::action::IncompatibleDataSchema::schema_change].
29338        pub fn set_schema_change<
29339            T: std::convert::Into<crate::model::action::incompatible_data_schema::SchemaChange>,
29340        >(
29341            mut self,
29342            v: T,
29343        ) -> Self {
29344            self.schema_change = v.into();
29345            self
29346        }
29347    }
29348
29349    impl wkt::message::Message for IncompatibleDataSchema {
29350        fn typename() -> &'static str {
29351            "type.googleapis.com/google.cloud.dataplex.v1.Action.IncompatibleDataSchema"
29352        }
29353    }
29354
29355    /// Defines additional types related to [IncompatibleDataSchema].
29356    pub mod incompatible_data_schema {
29357        #[allow(unused_imports)]
29358        use super::*;
29359
29360        /// Whether the action relates to a schema that is incompatible or modified.
29361        ///
29362        /// # Working with unknown values
29363        ///
29364        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29365        /// additional enum variants at any time. Adding new variants is not considered
29366        /// a breaking change. Applications should write their code in anticipation of:
29367        ///
29368        /// - New values appearing in future releases of the client library, **and**
29369        /// - New values received dynamically, without application changes.
29370        ///
29371        /// Please consult the [Working with enums] section in the user guide for some
29372        /// guidelines.
29373        ///
29374        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29375        #[derive(Clone, Debug, PartialEq)]
29376        #[non_exhaustive]
29377        pub enum SchemaChange {
29378            /// Schema change unspecified.
29379            Unspecified,
29380            /// Newly discovered schema is incompatible with existing schema.
29381            Incompatible,
29382            /// Newly discovered schema has changed from existing schema for data in a
29383            /// curated zone.
29384            Modified,
29385            /// If set, the enum was initialized with an unknown value.
29386            ///
29387            /// Applications can examine the value using [SchemaChange::value] or
29388            /// [SchemaChange::name].
29389            UnknownValue(schema_change::UnknownValue),
29390        }
29391
29392        #[doc(hidden)]
29393        pub mod schema_change {
29394            #[allow(unused_imports)]
29395            use super::*;
29396            #[derive(Clone, Debug, PartialEq)]
29397            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29398        }
29399
29400        impl SchemaChange {
29401            /// Gets the enum value.
29402            ///
29403            /// Returns `None` if the enum contains an unknown value deserialized from
29404            /// the string representation of enums.
29405            pub fn value(&self) -> std::option::Option<i32> {
29406                match self {
29407                    Self::Unspecified => std::option::Option::Some(0),
29408                    Self::Incompatible => std::option::Option::Some(1),
29409                    Self::Modified => std::option::Option::Some(2),
29410                    Self::UnknownValue(u) => u.0.value(),
29411                }
29412            }
29413
29414            /// Gets the enum value as a string.
29415            ///
29416            /// Returns `None` if the enum contains an unknown value deserialized from
29417            /// the integer representation of enums.
29418            pub fn name(&self) -> std::option::Option<&str> {
29419                match self {
29420                    Self::Unspecified => std::option::Option::Some("SCHEMA_CHANGE_UNSPECIFIED"),
29421                    Self::Incompatible => std::option::Option::Some("INCOMPATIBLE"),
29422                    Self::Modified => std::option::Option::Some("MODIFIED"),
29423                    Self::UnknownValue(u) => u.0.name(),
29424                }
29425            }
29426        }
29427
29428        impl std::default::Default for SchemaChange {
29429            fn default() -> Self {
29430                use std::convert::From;
29431                Self::from(0)
29432            }
29433        }
29434
29435        impl std::fmt::Display for SchemaChange {
29436            fn fmt(
29437                &self,
29438                f: &mut std::fmt::Formatter<'_>,
29439            ) -> std::result::Result<(), std::fmt::Error> {
29440                wkt::internal::display_enum(f, self.name(), self.value())
29441            }
29442        }
29443
29444        impl std::convert::From<i32> for SchemaChange {
29445            fn from(value: i32) -> Self {
29446                match value {
29447                    0 => Self::Unspecified,
29448                    1 => Self::Incompatible,
29449                    2 => Self::Modified,
29450                    _ => Self::UnknownValue(schema_change::UnknownValue(
29451                        wkt::internal::UnknownEnumValue::Integer(value),
29452                    )),
29453                }
29454            }
29455        }
29456
29457        impl std::convert::From<&str> for SchemaChange {
29458            fn from(value: &str) -> Self {
29459                use std::string::ToString;
29460                match value {
29461                    "SCHEMA_CHANGE_UNSPECIFIED" => Self::Unspecified,
29462                    "INCOMPATIBLE" => Self::Incompatible,
29463                    "MODIFIED" => Self::Modified,
29464                    _ => Self::UnknownValue(schema_change::UnknownValue(
29465                        wkt::internal::UnknownEnumValue::String(value.to_string()),
29466                    )),
29467                }
29468            }
29469        }
29470
29471        impl serde::ser::Serialize for SchemaChange {
29472            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29473            where
29474                S: serde::Serializer,
29475            {
29476                match self {
29477                    Self::Unspecified => serializer.serialize_i32(0),
29478                    Self::Incompatible => serializer.serialize_i32(1),
29479                    Self::Modified => serializer.serialize_i32(2),
29480                    Self::UnknownValue(u) => u.0.serialize(serializer),
29481                }
29482            }
29483        }
29484
29485        impl<'de> serde::de::Deserialize<'de> for SchemaChange {
29486            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29487            where
29488                D: serde::Deserializer<'de>,
29489            {
29490                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SchemaChange>::new(
29491                    ".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange",
29492                ))
29493            }
29494        }
29495    }
29496
29497    /// Action details for invalid or unsupported partitions detected by discovery.
29498    #[derive(Clone, Default, PartialEq)]
29499    #[non_exhaustive]
29500    pub struct InvalidDataPartition {
29501        /// The issue type of InvalidDataPartition.
29502        pub expected_structure: crate::model::action::invalid_data_partition::PartitionStructure,
29503
29504        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29505    }
29506
29507    impl InvalidDataPartition {
29508        pub fn new() -> Self {
29509            std::default::Default::default()
29510        }
29511
29512        /// Sets the value of [expected_structure][crate::model::action::InvalidDataPartition::expected_structure].
29513        pub fn set_expected_structure<
29514            T: std::convert::Into<crate::model::action::invalid_data_partition::PartitionStructure>,
29515        >(
29516            mut self,
29517            v: T,
29518        ) -> Self {
29519            self.expected_structure = v.into();
29520            self
29521        }
29522    }
29523
29524    impl wkt::message::Message for InvalidDataPartition {
29525        fn typename() -> &'static str {
29526            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataPartition"
29527        }
29528    }
29529
29530    /// Defines additional types related to [InvalidDataPartition].
29531    pub mod invalid_data_partition {
29532        #[allow(unused_imports)]
29533        use super::*;
29534
29535        /// The expected partition structure.
29536        ///
29537        /// # Working with unknown values
29538        ///
29539        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29540        /// additional enum variants at any time. Adding new variants is not considered
29541        /// a breaking change. Applications should write their code in anticipation of:
29542        ///
29543        /// - New values appearing in future releases of the client library, **and**
29544        /// - New values received dynamically, without application changes.
29545        ///
29546        /// Please consult the [Working with enums] section in the user guide for some
29547        /// guidelines.
29548        ///
29549        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29550        #[derive(Clone, Debug, PartialEq)]
29551        #[non_exhaustive]
29552        pub enum PartitionStructure {
29553            /// PartitionStructure unspecified.
29554            Unspecified,
29555            /// Consistent hive-style partition definition (both raw and curated zone).
29556            ConsistentKeys,
29557            /// Hive style partition definition (curated zone only).
29558            HiveStyleKeys,
29559            /// If set, the enum was initialized with an unknown value.
29560            ///
29561            /// Applications can examine the value using [PartitionStructure::value] or
29562            /// [PartitionStructure::name].
29563            UnknownValue(partition_structure::UnknownValue),
29564        }
29565
29566        #[doc(hidden)]
29567        pub mod partition_structure {
29568            #[allow(unused_imports)]
29569            use super::*;
29570            #[derive(Clone, Debug, PartialEq)]
29571            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29572        }
29573
29574        impl PartitionStructure {
29575            /// Gets the enum value.
29576            ///
29577            /// Returns `None` if the enum contains an unknown value deserialized from
29578            /// the string representation of enums.
29579            pub fn value(&self) -> std::option::Option<i32> {
29580                match self {
29581                    Self::Unspecified => std::option::Option::Some(0),
29582                    Self::ConsistentKeys => std::option::Option::Some(1),
29583                    Self::HiveStyleKeys => std::option::Option::Some(2),
29584                    Self::UnknownValue(u) => u.0.value(),
29585                }
29586            }
29587
29588            /// Gets the enum value as a string.
29589            ///
29590            /// Returns `None` if the enum contains an unknown value deserialized from
29591            /// the integer representation of enums.
29592            pub fn name(&self) -> std::option::Option<&str> {
29593                match self {
29594                    Self::Unspecified => {
29595                        std::option::Option::Some("PARTITION_STRUCTURE_UNSPECIFIED")
29596                    }
29597                    Self::ConsistentKeys => std::option::Option::Some("CONSISTENT_KEYS"),
29598                    Self::HiveStyleKeys => std::option::Option::Some("HIVE_STYLE_KEYS"),
29599                    Self::UnknownValue(u) => u.0.name(),
29600                }
29601            }
29602        }
29603
29604        impl std::default::Default for PartitionStructure {
29605            fn default() -> Self {
29606                use std::convert::From;
29607                Self::from(0)
29608            }
29609        }
29610
29611        impl std::fmt::Display for PartitionStructure {
29612            fn fmt(
29613                &self,
29614                f: &mut std::fmt::Formatter<'_>,
29615            ) -> std::result::Result<(), std::fmt::Error> {
29616                wkt::internal::display_enum(f, self.name(), self.value())
29617            }
29618        }
29619
29620        impl std::convert::From<i32> for PartitionStructure {
29621            fn from(value: i32) -> Self {
29622                match value {
29623                    0 => Self::Unspecified,
29624                    1 => Self::ConsistentKeys,
29625                    2 => Self::HiveStyleKeys,
29626                    _ => Self::UnknownValue(partition_structure::UnknownValue(
29627                        wkt::internal::UnknownEnumValue::Integer(value),
29628                    )),
29629                }
29630            }
29631        }
29632
29633        impl std::convert::From<&str> for PartitionStructure {
29634            fn from(value: &str) -> Self {
29635                use std::string::ToString;
29636                match value {
29637                    "PARTITION_STRUCTURE_UNSPECIFIED" => Self::Unspecified,
29638                    "CONSISTENT_KEYS" => Self::ConsistentKeys,
29639                    "HIVE_STYLE_KEYS" => Self::HiveStyleKeys,
29640                    _ => Self::UnknownValue(partition_structure::UnknownValue(
29641                        wkt::internal::UnknownEnumValue::String(value.to_string()),
29642                    )),
29643                }
29644            }
29645        }
29646
29647        impl serde::ser::Serialize for PartitionStructure {
29648            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29649            where
29650                S: serde::Serializer,
29651            {
29652                match self {
29653                    Self::Unspecified => serializer.serialize_i32(0),
29654                    Self::ConsistentKeys => serializer.serialize_i32(1),
29655                    Self::HiveStyleKeys => serializer.serialize_i32(2),
29656                    Self::UnknownValue(u) => u.0.serialize(serializer),
29657                }
29658            }
29659        }
29660
29661        impl<'de> serde::de::Deserialize<'de> for PartitionStructure {
29662            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29663            where
29664                D: serde::Deserializer<'de>,
29665            {
29666                deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStructure>::new(
29667                    ".google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure",
29668                ))
29669            }
29670        }
29671    }
29672
29673    /// Action details for absence of data detected by discovery.
29674    #[derive(Clone, Default, PartialEq)]
29675    #[non_exhaustive]
29676    pub struct MissingData {
29677        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29678    }
29679
29680    impl MissingData {
29681        pub fn new() -> Self {
29682            std::default::Default::default()
29683        }
29684    }
29685
29686    impl wkt::message::Message for MissingData {
29687        fn typename() -> &'static str {
29688            "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingData"
29689        }
29690    }
29691
29692    /// Action details for invalid data arrangement.
29693    #[derive(Clone, Default, PartialEq)]
29694    #[non_exhaustive]
29695    pub struct InvalidDataOrganization {
29696        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29697    }
29698
29699    impl InvalidDataOrganization {
29700        pub fn new() -> Self {
29701            std::default::Default::default()
29702        }
29703    }
29704
29705    impl wkt::message::Message for InvalidDataOrganization {
29706        fn typename() -> &'static str {
29707            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataOrganization"
29708        }
29709    }
29710
29711    /// The category of issues.
29712    ///
29713    /// # Working with unknown values
29714    ///
29715    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29716    /// additional enum variants at any time. Adding new variants is not considered
29717    /// a breaking change. Applications should write their code in anticipation of:
29718    ///
29719    /// - New values appearing in future releases of the client library, **and**
29720    /// - New values received dynamically, without application changes.
29721    ///
29722    /// Please consult the [Working with enums] section in the user guide for some
29723    /// guidelines.
29724    ///
29725    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29726    #[derive(Clone, Debug, PartialEq)]
29727    #[non_exhaustive]
29728    pub enum Category {
29729        /// Unspecified category.
29730        Unspecified,
29731        /// Resource management related issues.
29732        ResourceManagement,
29733        /// Security policy related issues.
29734        SecurityPolicy,
29735        /// Data and discovery related issues.
29736        DataDiscovery,
29737        /// If set, the enum was initialized with an unknown value.
29738        ///
29739        /// Applications can examine the value using [Category::value] or
29740        /// [Category::name].
29741        UnknownValue(category::UnknownValue),
29742    }
29743
29744    #[doc(hidden)]
29745    pub mod category {
29746        #[allow(unused_imports)]
29747        use super::*;
29748        #[derive(Clone, Debug, PartialEq)]
29749        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29750    }
29751
29752    impl Category {
29753        /// Gets the enum value.
29754        ///
29755        /// Returns `None` if the enum contains an unknown value deserialized from
29756        /// the string representation of enums.
29757        pub fn value(&self) -> std::option::Option<i32> {
29758            match self {
29759                Self::Unspecified => std::option::Option::Some(0),
29760                Self::ResourceManagement => std::option::Option::Some(1),
29761                Self::SecurityPolicy => std::option::Option::Some(2),
29762                Self::DataDiscovery => std::option::Option::Some(3),
29763                Self::UnknownValue(u) => u.0.value(),
29764            }
29765        }
29766
29767        /// Gets the enum value as a string.
29768        ///
29769        /// Returns `None` if the enum contains an unknown value deserialized from
29770        /// the integer representation of enums.
29771        pub fn name(&self) -> std::option::Option<&str> {
29772            match self {
29773                Self::Unspecified => std::option::Option::Some("CATEGORY_UNSPECIFIED"),
29774                Self::ResourceManagement => std::option::Option::Some("RESOURCE_MANAGEMENT"),
29775                Self::SecurityPolicy => std::option::Option::Some("SECURITY_POLICY"),
29776                Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
29777                Self::UnknownValue(u) => u.0.name(),
29778            }
29779        }
29780    }
29781
29782    impl std::default::Default for Category {
29783        fn default() -> Self {
29784            use std::convert::From;
29785            Self::from(0)
29786        }
29787    }
29788
29789    impl std::fmt::Display for Category {
29790        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29791            wkt::internal::display_enum(f, self.name(), self.value())
29792        }
29793    }
29794
29795    impl std::convert::From<i32> for Category {
29796        fn from(value: i32) -> Self {
29797            match value {
29798                0 => Self::Unspecified,
29799                1 => Self::ResourceManagement,
29800                2 => Self::SecurityPolicy,
29801                3 => Self::DataDiscovery,
29802                _ => Self::UnknownValue(category::UnknownValue(
29803                    wkt::internal::UnknownEnumValue::Integer(value),
29804                )),
29805            }
29806        }
29807    }
29808
29809    impl std::convert::From<&str> for Category {
29810        fn from(value: &str) -> Self {
29811            use std::string::ToString;
29812            match value {
29813                "CATEGORY_UNSPECIFIED" => Self::Unspecified,
29814                "RESOURCE_MANAGEMENT" => Self::ResourceManagement,
29815                "SECURITY_POLICY" => Self::SecurityPolicy,
29816                "DATA_DISCOVERY" => Self::DataDiscovery,
29817                _ => Self::UnknownValue(category::UnknownValue(
29818                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29819                )),
29820            }
29821        }
29822    }
29823
29824    impl serde::ser::Serialize for Category {
29825        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29826        where
29827            S: serde::Serializer,
29828        {
29829            match self {
29830                Self::Unspecified => serializer.serialize_i32(0),
29831                Self::ResourceManagement => serializer.serialize_i32(1),
29832                Self::SecurityPolicy => serializer.serialize_i32(2),
29833                Self::DataDiscovery => serializer.serialize_i32(3),
29834                Self::UnknownValue(u) => u.0.serialize(serializer),
29835            }
29836        }
29837    }
29838
29839    impl<'de> serde::de::Deserialize<'de> for Category {
29840        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29841        where
29842            D: serde::Deserializer<'de>,
29843        {
29844            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Category>::new(
29845                ".google.cloud.dataplex.v1.Action.Category",
29846            ))
29847        }
29848    }
29849
29850    /// Additional details about the action based on the action category.
29851    #[derive(Clone, Debug, PartialEq)]
29852    #[non_exhaustive]
29853    pub enum Details {
29854        /// Details for issues related to invalid or unsupported data formats.
29855        InvalidDataFormat(std::boxed::Box<crate::model::action::InvalidDataFormat>),
29856        /// Details for issues related to incompatible schemas detected within data.
29857        IncompatibleDataSchema(std::boxed::Box<crate::model::action::IncompatibleDataSchema>),
29858        /// Details for issues related to invalid or unsupported data partition
29859        /// structure.
29860        InvalidDataPartition(std::boxed::Box<crate::model::action::InvalidDataPartition>),
29861        /// Details for issues related to absence of data within managed resources.
29862        MissingData(std::boxed::Box<crate::model::action::MissingData>),
29863        /// Details for issues related to absence of a managed resource.
29864        MissingResource(std::boxed::Box<crate::model::action::MissingResource>),
29865        /// Details for issues related to lack of permissions to access data
29866        /// resources.
29867        UnauthorizedResource(std::boxed::Box<crate::model::action::UnauthorizedResource>),
29868        /// Details for issues related to applying security policy.
29869        FailedSecurityPolicyApply(std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>),
29870        /// Details for issues related to invalid data arrangement.
29871        InvalidDataOrganization(std::boxed::Box<crate::model::action::InvalidDataOrganization>),
29872    }
29873}
29874
29875/// An asset represents a cloud resource that is being managed within a lake as a
29876/// member of a zone.
29877#[derive(Clone, Default, PartialEq)]
29878#[non_exhaustive]
29879pub struct Asset {
29880    /// Output only. The relative resource name of the asset, of the form:
29881    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
29882    pub name: std::string::String,
29883
29884    /// Optional. User friendly display name.
29885    pub display_name: std::string::String,
29886
29887    /// Output only. System generated globally unique ID for the asset. This ID
29888    /// will be different if the asset is deleted and re-created with the same
29889    /// name.
29890    pub uid: std::string::String,
29891
29892    /// Output only. The time when the asset was created.
29893    pub create_time: std::option::Option<wkt::Timestamp>,
29894
29895    /// Output only. The time when the asset was last updated.
29896    pub update_time: std::option::Option<wkt::Timestamp>,
29897
29898    /// Optional. User defined labels for the asset.
29899    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
29900
29901    /// Optional. Description of the asset.
29902    pub description: std::string::String,
29903
29904    /// Output only. Current state of the asset.
29905    pub state: crate::model::State,
29906
29907    /// Required. Specification of the resource that is referenced by this asset.
29908    pub resource_spec: std::option::Option<crate::model::asset::ResourceSpec>,
29909
29910    /// Output only. Status of the resource referenced by this asset.
29911    pub resource_status: std::option::Option<crate::model::asset::ResourceStatus>,
29912
29913    /// Output only. Status of the security policy applied to resource referenced
29914    /// by this asset.
29915    pub security_status: std::option::Option<crate::model::asset::SecurityStatus>,
29916
29917    /// Optional. Specification of the discovery feature applied to data referenced
29918    /// by this asset. When this spec is left unset, the asset will use the spec
29919    /// set on the parent zone.
29920    pub discovery_spec: std::option::Option<crate::model::asset::DiscoverySpec>,
29921
29922    /// Output only. Status of the discovery feature applied to data referenced by
29923    /// this asset.
29924    pub discovery_status: std::option::Option<crate::model::asset::DiscoveryStatus>,
29925
29926    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29927}
29928
29929impl Asset {
29930    pub fn new() -> Self {
29931        std::default::Default::default()
29932    }
29933
29934    /// Sets the value of [name][crate::model::Asset::name].
29935    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29936        self.name = v.into();
29937        self
29938    }
29939
29940    /// Sets the value of [display_name][crate::model::Asset::display_name].
29941    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29942        self.display_name = v.into();
29943        self
29944    }
29945
29946    /// Sets the value of [uid][crate::model::Asset::uid].
29947    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29948        self.uid = v.into();
29949        self
29950    }
29951
29952    /// Sets the value of [create_time][crate::model::Asset::create_time].
29953    pub fn set_create_time<T>(mut self, v: T) -> Self
29954    where
29955        T: std::convert::Into<wkt::Timestamp>,
29956    {
29957        self.create_time = std::option::Option::Some(v.into());
29958        self
29959    }
29960
29961    /// Sets or clears the value of [create_time][crate::model::Asset::create_time].
29962    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
29963    where
29964        T: std::convert::Into<wkt::Timestamp>,
29965    {
29966        self.create_time = v.map(|x| x.into());
29967        self
29968    }
29969
29970    /// Sets the value of [update_time][crate::model::Asset::update_time].
29971    pub fn set_update_time<T>(mut self, v: T) -> Self
29972    where
29973        T: std::convert::Into<wkt::Timestamp>,
29974    {
29975        self.update_time = std::option::Option::Some(v.into());
29976        self
29977    }
29978
29979    /// Sets or clears the value of [update_time][crate::model::Asset::update_time].
29980    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
29981    where
29982        T: std::convert::Into<wkt::Timestamp>,
29983    {
29984        self.update_time = v.map(|x| x.into());
29985        self
29986    }
29987
29988    /// Sets the value of [labels][crate::model::Asset::labels].
29989    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
29990    where
29991        T: std::iter::IntoIterator<Item = (K, V)>,
29992        K: std::convert::Into<std::string::String>,
29993        V: std::convert::Into<std::string::String>,
29994    {
29995        use std::iter::Iterator;
29996        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29997        self
29998    }
29999
30000    /// Sets the value of [description][crate::model::Asset::description].
30001    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30002        self.description = v.into();
30003        self
30004    }
30005
30006    /// Sets the value of [state][crate::model::Asset::state].
30007    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
30008        self.state = v.into();
30009        self
30010    }
30011
30012    /// Sets the value of [resource_spec][crate::model::Asset::resource_spec].
30013    pub fn set_resource_spec<T>(mut self, v: T) -> Self
30014    where
30015        T: std::convert::Into<crate::model::asset::ResourceSpec>,
30016    {
30017        self.resource_spec = std::option::Option::Some(v.into());
30018        self
30019    }
30020
30021    /// Sets or clears the value of [resource_spec][crate::model::Asset::resource_spec].
30022    pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
30023    where
30024        T: std::convert::Into<crate::model::asset::ResourceSpec>,
30025    {
30026        self.resource_spec = v.map(|x| x.into());
30027        self
30028    }
30029
30030    /// Sets the value of [resource_status][crate::model::Asset::resource_status].
30031    pub fn set_resource_status<T>(mut self, v: T) -> Self
30032    where
30033        T: std::convert::Into<crate::model::asset::ResourceStatus>,
30034    {
30035        self.resource_status = std::option::Option::Some(v.into());
30036        self
30037    }
30038
30039    /// Sets or clears the value of [resource_status][crate::model::Asset::resource_status].
30040    pub fn set_or_clear_resource_status<T>(mut self, v: std::option::Option<T>) -> Self
30041    where
30042        T: std::convert::Into<crate::model::asset::ResourceStatus>,
30043    {
30044        self.resource_status = v.map(|x| x.into());
30045        self
30046    }
30047
30048    /// Sets the value of [security_status][crate::model::Asset::security_status].
30049    pub fn set_security_status<T>(mut self, v: T) -> Self
30050    where
30051        T: std::convert::Into<crate::model::asset::SecurityStatus>,
30052    {
30053        self.security_status = std::option::Option::Some(v.into());
30054        self
30055    }
30056
30057    /// Sets or clears the value of [security_status][crate::model::Asset::security_status].
30058    pub fn set_or_clear_security_status<T>(mut self, v: std::option::Option<T>) -> Self
30059    where
30060        T: std::convert::Into<crate::model::asset::SecurityStatus>,
30061    {
30062        self.security_status = v.map(|x| x.into());
30063        self
30064    }
30065
30066    /// Sets the value of [discovery_spec][crate::model::Asset::discovery_spec].
30067    pub fn set_discovery_spec<T>(mut self, v: T) -> Self
30068    where
30069        T: std::convert::Into<crate::model::asset::DiscoverySpec>,
30070    {
30071        self.discovery_spec = std::option::Option::Some(v.into());
30072        self
30073    }
30074
30075    /// Sets or clears the value of [discovery_spec][crate::model::Asset::discovery_spec].
30076    pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
30077    where
30078        T: std::convert::Into<crate::model::asset::DiscoverySpec>,
30079    {
30080        self.discovery_spec = v.map(|x| x.into());
30081        self
30082    }
30083
30084    /// Sets the value of [discovery_status][crate::model::Asset::discovery_status].
30085    pub fn set_discovery_status<T>(mut self, v: T) -> Self
30086    where
30087        T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
30088    {
30089        self.discovery_status = std::option::Option::Some(v.into());
30090        self
30091    }
30092
30093    /// Sets or clears the value of [discovery_status][crate::model::Asset::discovery_status].
30094    pub fn set_or_clear_discovery_status<T>(mut self, v: std::option::Option<T>) -> Self
30095    where
30096        T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
30097    {
30098        self.discovery_status = v.map(|x| x.into());
30099        self
30100    }
30101}
30102
30103impl wkt::message::Message for Asset {
30104    fn typename() -> &'static str {
30105        "type.googleapis.com/google.cloud.dataplex.v1.Asset"
30106    }
30107}
30108
30109/// Defines additional types related to [Asset].
30110pub mod asset {
30111    #[allow(unused_imports)]
30112    use super::*;
30113
30114    /// Security policy status of the asset. Data security policy, i.e., readers,
30115    /// writers & owners, should be specified in the lake/zone/asset IAM policy.
30116    #[derive(Clone, Default, PartialEq)]
30117    #[non_exhaustive]
30118    pub struct SecurityStatus {
30119        /// The current state of the security policy applied to the attached
30120        /// resource.
30121        pub state: crate::model::asset::security_status::State,
30122
30123        /// Additional information about the current state.
30124        pub message: std::string::String,
30125
30126        /// Last update time of the status.
30127        pub update_time: std::option::Option<wkt::Timestamp>,
30128
30129        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30130    }
30131
30132    impl SecurityStatus {
30133        pub fn new() -> Self {
30134            std::default::Default::default()
30135        }
30136
30137        /// Sets the value of [state][crate::model::asset::SecurityStatus::state].
30138        pub fn set_state<T: std::convert::Into<crate::model::asset::security_status::State>>(
30139            mut self,
30140            v: T,
30141        ) -> Self {
30142            self.state = v.into();
30143            self
30144        }
30145
30146        /// Sets the value of [message][crate::model::asset::SecurityStatus::message].
30147        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30148            self.message = v.into();
30149            self
30150        }
30151
30152        /// Sets the value of [update_time][crate::model::asset::SecurityStatus::update_time].
30153        pub fn set_update_time<T>(mut self, v: T) -> Self
30154        where
30155            T: std::convert::Into<wkt::Timestamp>,
30156        {
30157            self.update_time = std::option::Option::Some(v.into());
30158            self
30159        }
30160
30161        /// Sets or clears the value of [update_time][crate::model::asset::SecurityStatus::update_time].
30162        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
30163        where
30164            T: std::convert::Into<wkt::Timestamp>,
30165        {
30166            self.update_time = v.map(|x| x.into());
30167            self
30168        }
30169    }
30170
30171    impl wkt::message::Message for SecurityStatus {
30172        fn typename() -> &'static str {
30173            "type.googleapis.com/google.cloud.dataplex.v1.Asset.SecurityStatus"
30174        }
30175    }
30176
30177    /// Defines additional types related to [SecurityStatus].
30178    pub mod security_status {
30179        #[allow(unused_imports)]
30180        use super::*;
30181
30182        /// The state of the security policy.
30183        ///
30184        /// # Working with unknown values
30185        ///
30186        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30187        /// additional enum variants at any time. Adding new variants is not considered
30188        /// a breaking change. Applications should write their code in anticipation of:
30189        ///
30190        /// - New values appearing in future releases of the client library, **and**
30191        /// - New values received dynamically, without application changes.
30192        ///
30193        /// Please consult the [Working with enums] section in the user guide for some
30194        /// guidelines.
30195        ///
30196        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30197        #[derive(Clone, Debug, PartialEq)]
30198        #[non_exhaustive]
30199        pub enum State {
30200            /// State unspecified.
30201            Unspecified,
30202            /// Security policy has been successfully applied to the attached resource.
30203            Ready,
30204            /// Security policy is in the process of being applied to the attached
30205            /// resource.
30206            Applying,
30207            /// Security policy could not be applied to the attached resource due to
30208            /// errors.
30209            Error,
30210            /// If set, the enum was initialized with an unknown value.
30211            ///
30212            /// Applications can examine the value using [State::value] or
30213            /// [State::name].
30214            UnknownValue(state::UnknownValue),
30215        }
30216
30217        #[doc(hidden)]
30218        pub mod state {
30219            #[allow(unused_imports)]
30220            use super::*;
30221            #[derive(Clone, Debug, PartialEq)]
30222            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30223        }
30224
30225        impl State {
30226            /// Gets the enum value.
30227            ///
30228            /// Returns `None` if the enum contains an unknown value deserialized from
30229            /// the string representation of enums.
30230            pub fn value(&self) -> std::option::Option<i32> {
30231                match self {
30232                    Self::Unspecified => std::option::Option::Some(0),
30233                    Self::Ready => std::option::Option::Some(1),
30234                    Self::Applying => std::option::Option::Some(2),
30235                    Self::Error => std::option::Option::Some(3),
30236                    Self::UnknownValue(u) => u.0.value(),
30237                }
30238            }
30239
30240            /// Gets the enum value as a string.
30241            ///
30242            /// Returns `None` if the enum contains an unknown value deserialized from
30243            /// the integer representation of enums.
30244            pub fn name(&self) -> std::option::Option<&str> {
30245                match self {
30246                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
30247                    Self::Ready => std::option::Option::Some("READY"),
30248                    Self::Applying => std::option::Option::Some("APPLYING"),
30249                    Self::Error => std::option::Option::Some("ERROR"),
30250                    Self::UnknownValue(u) => u.0.name(),
30251                }
30252            }
30253        }
30254
30255        impl std::default::Default for State {
30256            fn default() -> Self {
30257                use std::convert::From;
30258                Self::from(0)
30259            }
30260        }
30261
30262        impl std::fmt::Display for State {
30263            fn fmt(
30264                &self,
30265                f: &mut std::fmt::Formatter<'_>,
30266            ) -> std::result::Result<(), std::fmt::Error> {
30267                wkt::internal::display_enum(f, self.name(), self.value())
30268            }
30269        }
30270
30271        impl std::convert::From<i32> for State {
30272            fn from(value: i32) -> Self {
30273                match value {
30274                    0 => Self::Unspecified,
30275                    1 => Self::Ready,
30276                    2 => Self::Applying,
30277                    3 => Self::Error,
30278                    _ => Self::UnknownValue(state::UnknownValue(
30279                        wkt::internal::UnknownEnumValue::Integer(value),
30280                    )),
30281                }
30282            }
30283        }
30284
30285        impl std::convert::From<&str> for State {
30286            fn from(value: &str) -> Self {
30287                use std::string::ToString;
30288                match value {
30289                    "STATE_UNSPECIFIED" => Self::Unspecified,
30290                    "READY" => Self::Ready,
30291                    "APPLYING" => Self::Applying,
30292                    "ERROR" => Self::Error,
30293                    _ => Self::UnknownValue(state::UnknownValue(
30294                        wkt::internal::UnknownEnumValue::String(value.to_string()),
30295                    )),
30296                }
30297            }
30298        }
30299
30300        impl serde::ser::Serialize for State {
30301            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30302            where
30303                S: serde::Serializer,
30304            {
30305                match self {
30306                    Self::Unspecified => serializer.serialize_i32(0),
30307                    Self::Ready => serializer.serialize_i32(1),
30308                    Self::Applying => serializer.serialize_i32(2),
30309                    Self::Error => serializer.serialize_i32(3),
30310                    Self::UnknownValue(u) => u.0.serialize(serializer),
30311                }
30312            }
30313        }
30314
30315        impl<'de> serde::de::Deserialize<'de> for State {
30316            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30317            where
30318                D: serde::Deserializer<'de>,
30319            {
30320                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
30321                    ".google.cloud.dataplex.v1.Asset.SecurityStatus.State",
30322                ))
30323            }
30324        }
30325    }
30326
30327    /// Settings to manage the metadata discovery and publishing for an asset.
30328    #[derive(Clone, Default, PartialEq)]
30329    #[non_exhaustive]
30330    pub struct DiscoverySpec {
30331        /// Optional. Whether discovery is enabled.
30332        pub enabled: bool,
30333
30334        /// Optional. The list of patterns to apply for selecting data to include
30335        /// during discovery if only a subset of the data should considered.  For
30336        /// Cloud Storage bucket assets, these are interpreted as glob patterns used
30337        /// to match object names. For BigQuery dataset assets, these are interpreted
30338        /// as patterns to match table names.
30339        pub include_patterns: std::vec::Vec<std::string::String>,
30340
30341        /// Optional. The list of patterns to apply for selecting data to exclude
30342        /// during discovery.  For Cloud Storage bucket assets, these are interpreted
30343        /// as glob patterns used to match object names. For BigQuery dataset assets,
30344        /// these are interpreted as patterns to match table names.
30345        pub exclude_patterns: std::vec::Vec<std::string::String>,
30346
30347        /// Optional. Configuration for CSV data.
30348        pub csv_options: std::option::Option<crate::model::asset::discovery_spec::CsvOptions>,
30349
30350        /// Optional. Configuration for Json data.
30351        pub json_options: std::option::Option<crate::model::asset::discovery_spec::JsonOptions>,
30352
30353        /// Determines when discovery is triggered.
30354        pub trigger: std::option::Option<crate::model::asset::discovery_spec::Trigger>,
30355
30356        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30357    }
30358
30359    impl DiscoverySpec {
30360        pub fn new() -> Self {
30361            std::default::Default::default()
30362        }
30363
30364        /// Sets the value of [enabled][crate::model::asset::DiscoverySpec::enabled].
30365        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
30366            self.enabled = v.into();
30367            self
30368        }
30369
30370        /// Sets the value of [include_patterns][crate::model::asset::DiscoverySpec::include_patterns].
30371        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
30372        where
30373            T: std::iter::IntoIterator<Item = V>,
30374            V: std::convert::Into<std::string::String>,
30375        {
30376            use std::iter::Iterator;
30377            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
30378            self
30379        }
30380
30381        /// Sets the value of [exclude_patterns][crate::model::asset::DiscoverySpec::exclude_patterns].
30382        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
30383        where
30384            T: std::iter::IntoIterator<Item = V>,
30385            V: std::convert::Into<std::string::String>,
30386        {
30387            use std::iter::Iterator;
30388            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
30389            self
30390        }
30391
30392        /// Sets the value of [csv_options][crate::model::asset::DiscoverySpec::csv_options].
30393        pub fn set_csv_options<T>(mut self, v: T) -> Self
30394        where
30395            T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
30396        {
30397            self.csv_options = std::option::Option::Some(v.into());
30398            self
30399        }
30400
30401        /// Sets or clears the value of [csv_options][crate::model::asset::DiscoverySpec::csv_options].
30402        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
30403        where
30404            T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
30405        {
30406            self.csv_options = v.map(|x| x.into());
30407            self
30408        }
30409
30410        /// Sets the value of [json_options][crate::model::asset::DiscoverySpec::json_options].
30411        pub fn set_json_options<T>(mut self, v: T) -> Self
30412        where
30413            T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
30414        {
30415            self.json_options = std::option::Option::Some(v.into());
30416            self
30417        }
30418
30419        /// Sets or clears the value of [json_options][crate::model::asset::DiscoverySpec::json_options].
30420        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
30421        where
30422            T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
30423        {
30424            self.json_options = v.map(|x| x.into());
30425            self
30426        }
30427
30428        /// Sets the value of [trigger][crate::model::asset::DiscoverySpec::trigger].
30429        ///
30430        /// Note that all the setters affecting `trigger` are mutually
30431        /// exclusive.
30432        pub fn set_trigger<
30433            T: std::convert::Into<std::option::Option<crate::model::asset::discovery_spec::Trigger>>,
30434        >(
30435            mut self,
30436            v: T,
30437        ) -> Self {
30438            self.trigger = v.into();
30439            self
30440        }
30441
30442        /// The value of [trigger][crate::model::asset::DiscoverySpec::trigger]
30443        /// if it holds a `Schedule`, `None` if the field is not set or
30444        /// holds a different branch.
30445        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
30446            #[allow(unreachable_patterns)]
30447            self.trigger.as_ref().and_then(|v| match v {
30448                crate::model::asset::discovery_spec::Trigger::Schedule(v) => {
30449                    std::option::Option::Some(v)
30450                }
30451                _ => std::option::Option::None,
30452            })
30453        }
30454
30455        /// Sets the value of [trigger][crate::model::asset::DiscoverySpec::trigger]
30456        /// to hold a `Schedule`.
30457        ///
30458        /// Note that all the setters affecting `trigger` are
30459        /// mutually exclusive.
30460        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30461            self.trigger = std::option::Option::Some(
30462                crate::model::asset::discovery_spec::Trigger::Schedule(v.into()),
30463            );
30464            self
30465        }
30466    }
30467
30468    impl wkt::message::Message for DiscoverySpec {
30469        fn typename() -> &'static str {
30470            "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec"
30471        }
30472    }
30473
30474    /// Defines additional types related to [DiscoverySpec].
30475    pub mod discovery_spec {
30476        #[allow(unused_imports)]
30477        use super::*;
30478
30479        /// Describe CSV and similar semi-structured data formats.
30480        #[derive(Clone, Default, PartialEq)]
30481        #[non_exhaustive]
30482        pub struct CsvOptions {
30483            /// Optional. The number of rows to interpret as header rows that should be
30484            /// skipped when reading data rows.
30485            pub header_rows: i32,
30486
30487            /// Optional. The delimiter being used to separate values. This defaults to
30488            /// ','.
30489            pub delimiter: std::string::String,
30490
30491            /// Optional. The character encoding of the data. The default is UTF-8.
30492            pub encoding: std::string::String,
30493
30494            /// Optional. Whether to disable the inference of data type for CSV data.
30495            /// If true, all columns will be registered as strings.
30496            pub disable_type_inference: bool,
30497
30498            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30499        }
30500
30501        impl CsvOptions {
30502            pub fn new() -> Self {
30503                std::default::Default::default()
30504            }
30505
30506            /// Sets the value of [header_rows][crate::model::asset::discovery_spec::CsvOptions::header_rows].
30507            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
30508                self.header_rows = v.into();
30509                self
30510            }
30511
30512            /// Sets the value of [delimiter][crate::model::asset::discovery_spec::CsvOptions::delimiter].
30513            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
30514                mut self,
30515                v: T,
30516            ) -> Self {
30517                self.delimiter = v.into();
30518                self
30519            }
30520
30521            /// Sets the value of [encoding][crate::model::asset::discovery_spec::CsvOptions::encoding].
30522            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
30523                mut self,
30524                v: T,
30525            ) -> Self {
30526                self.encoding = v.into();
30527                self
30528            }
30529
30530            /// Sets the value of [disable_type_inference][crate::model::asset::discovery_spec::CsvOptions::disable_type_inference].
30531            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
30532                self.disable_type_inference = v.into();
30533                self
30534            }
30535        }
30536
30537        impl wkt::message::Message for CsvOptions {
30538            fn typename() -> &'static str {
30539                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions"
30540            }
30541        }
30542
30543        /// Describe JSON data format.
30544        #[derive(Clone, Default, PartialEq)]
30545        #[non_exhaustive]
30546        pub struct JsonOptions {
30547            /// Optional. The character encoding of the data. The default is UTF-8.
30548            pub encoding: std::string::String,
30549
30550            /// Optional. Whether to disable the inference of data type for Json data.
30551            /// If true, all columns will be registered as their primitive types
30552            /// (strings, number or boolean).
30553            pub disable_type_inference: bool,
30554
30555            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30556        }
30557
30558        impl JsonOptions {
30559            pub fn new() -> Self {
30560                std::default::Default::default()
30561            }
30562
30563            /// Sets the value of [encoding][crate::model::asset::discovery_spec::JsonOptions::encoding].
30564            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
30565                mut self,
30566                v: T,
30567            ) -> Self {
30568                self.encoding = v.into();
30569                self
30570            }
30571
30572            /// Sets the value of [disable_type_inference][crate::model::asset::discovery_spec::JsonOptions::disable_type_inference].
30573            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
30574                self.disable_type_inference = v.into();
30575                self
30576            }
30577        }
30578
30579        impl wkt::message::Message for JsonOptions {
30580            fn typename() -> &'static str {
30581                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions"
30582            }
30583        }
30584
30585        /// Determines when discovery is triggered.
30586        #[derive(Clone, Debug, PartialEq)]
30587        #[non_exhaustive]
30588        pub enum Trigger {
30589            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
30590            /// running discovery periodically. Successive discovery runs must be
30591            /// scheduled at least 60 minutes apart. The default value is to run
30592            /// discovery every 60 minutes.
30593            ///
30594            /// To explicitly set a timezone to the cron tab, apply a prefix in the
30595            /// cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}".
30596            /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
30597            /// database. For example, `CRON_TZ=America/New_York 1 * * * *`, or
30598            /// `TZ=America/New_York 1 * * * *`.
30599            Schedule(std::string::String),
30600        }
30601    }
30602
30603    /// Identifies the cloud resource that is referenced by this asset.
30604    #[derive(Clone, Default, PartialEq)]
30605    #[non_exhaustive]
30606    pub struct ResourceSpec {
30607        /// Immutable. Relative name of the cloud resource that contains the data
30608        /// that is being managed within a lake. For example:
30609        /// `projects/{project_number}/buckets/{bucket_id}`
30610        /// `projects/{project_number}/datasets/{dataset_id}`
30611        pub name: std::string::String,
30612
30613        /// Required. Immutable. Type of resource.
30614        pub r#type: crate::model::asset::resource_spec::Type,
30615
30616        /// Optional. Determines how read permissions are handled for each asset and
30617        /// their associated tables. Only available to storage buckets assets.
30618        pub read_access_mode: crate::model::asset::resource_spec::AccessMode,
30619
30620        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30621    }
30622
30623    impl ResourceSpec {
30624        pub fn new() -> Self {
30625            std::default::Default::default()
30626        }
30627
30628        /// Sets the value of [name][crate::model::asset::ResourceSpec::name].
30629        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30630            self.name = v.into();
30631            self
30632        }
30633
30634        /// Sets the value of [r#type][crate::model::asset::ResourceSpec::type].
30635        pub fn set_type<T: std::convert::Into<crate::model::asset::resource_spec::Type>>(
30636            mut self,
30637            v: T,
30638        ) -> Self {
30639            self.r#type = v.into();
30640            self
30641        }
30642
30643        /// Sets the value of [read_access_mode][crate::model::asset::ResourceSpec::read_access_mode].
30644        pub fn set_read_access_mode<
30645            T: std::convert::Into<crate::model::asset::resource_spec::AccessMode>,
30646        >(
30647            mut self,
30648            v: T,
30649        ) -> Self {
30650            self.read_access_mode = v.into();
30651            self
30652        }
30653    }
30654
30655    impl wkt::message::Message for ResourceSpec {
30656        fn typename() -> &'static str {
30657            "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceSpec"
30658        }
30659    }
30660
30661    /// Defines additional types related to [ResourceSpec].
30662    pub mod resource_spec {
30663        #[allow(unused_imports)]
30664        use super::*;
30665
30666        /// Type of resource.
30667        ///
30668        /// # Working with unknown values
30669        ///
30670        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30671        /// additional enum variants at any time. Adding new variants is not considered
30672        /// a breaking change. Applications should write their code in anticipation of:
30673        ///
30674        /// - New values appearing in future releases of the client library, **and**
30675        /// - New values received dynamically, without application changes.
30676        ///
30677        /// Please consult the [Working with enums] section in the user guide for some
30678        /// guidelines.
30679        ///
30680        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30681        #[derive(Clone, Debug, PartialEq)]
30682        #[non_exhaustive]
30683        pub enum Type {
30684            /// Type not specified.
30685            Unspecified,
30686            /// Cloud Storage bucket.
30687            StorageBucket,
30688            /// BigQuery dataset.
30689            BigqueryDataset,
30690            /// If set, the enum was initialized with an unknown value.
30691            ///
30692            /// Applications can examine the value using [Type::value] or
30693            /// [Type::name].
30694            UnknownValue(r#type::UnknownValue),
30695        }
30696
30697        #[doc(hidden)]
30698        pub mod r#type {
30699            #[allow(unused_imports)]
30700            use super::*;
30701            #[derive(Clone, Debug, PartialEq)]
30702            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30703        }
30704
30705        impl Type {
30706            /// Gets the enum value.
30707            ///
30708            /// Returns `None` if the enum contains an unknown value deserialized from
30709            /// the string representation of enums.
30710            pub fn value(&self) -> std::option::Option<i32> {
30711                match self {
30712                    Self::Unspecified => std::option::Option::Some(0),
30713                    Self::StorageBucket => std::option::Option::Some(1),
30714                    Self::BigqueryDataset => std::option::Option::Some(2),
30715                    Self::UnknownValue(u) => u.0.value(),
30716                }
30717            }
30718
30719            /// Gets the enum value as a string.
30720            ///
30721            /// Returns `None` if the enum contains an unknown value deserialized from
30722            /// the integer representation of enums.
30723            pub fn name(&self) -> std::option::Option<&str> {
30724                match self {
30725                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
30726                    Self::StorageBucket => std::option::Option::Some("STORAGE_BUCKET"),
30727                    Self::BigqueryDataset => std::option::Option::Some("BIGQUERY_DATASET"),
30728                    Self::UnknownValue(u) => u.0.name(),
30729                }
30730            }
30731        }
30732
30733        impl std::default::Default for Type {
30734            fn default() -> Self {
30735                use std::convert::From;
30736                Self::from(0)
30737            }
30738        }
30739
30740        impl std::fmt::Display for Type {
30741            fn fmt(
30742                &self,
30743                f: &mut std::fmt::Formatter<'_>,
30744            ) -> std::result::Result<(), std::fmt::Error> {
30745                wkt::internal::display_enum(f, self.name(), self.value())
30746            }
30747        }
30748
30749        impl std::convert::From<i32> for Type {
30750            fn from(value: i32) -> Self {
30751                match value {
30752                    0 => Self::Unspecified,
30753                    1 => Self::StorageBucket,
30754                    2 => Self::BigqueryDataset,
30755                    _ => Self::UnknownValue(r#type::UnknownValue(
30756                        wkt::internal::UnknownEnumValue::Integer(value),
30757                    )),
30758                }
30759            }
30760        }
30761
30762        impl std::convert::From<&str> for Type {
30763            fn from(value: &str) -> Self {
30764                use std::string::ToString;
30765                match value {
30766                    "TYPE_UNSPECIFIED" => Self::Unspecified,
30767                    "STORAGE_BUCKET" => Self::StorageBucket,
30768                    "BIGQUERY_DATASET" => Self::BigqueryDataset,
30769                    _ => Self::UnknownValue(r#type::UnknownValue(
30770                        wkt::internal::UnknownEnumValue::String(value.to_string()),
30771                    )),
30772                }
30773            }
30774        }
30775
30776        impl serde::ser::Serialize for Type {
30777            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30778            where
30779                S: serde::Serializer,
30780            {
30781                match self {
30782                    Self::Unspecified => serializer.serialize_i32(0),
30783                    Self::StorageBucket => serializer.serialize_i32(1),
30784                    Self::BigqueryDataset => serializer.serialize_i32(2),
30785                    Self::UnknownValue(u) => u.0.serialize(serializer),
30786                }
30787            }
30788        }
30789
30790        impl<'de> serde::de::Deserialize<'de> for Type {
30791            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30792            where
30793                D: serde::Deserializer<'de>,
30794            {
30795                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
30796                    ".google.cloud.dataplex.v1.Asset.ResourceSpec.Type",
30797                ))
30798            }
30799        }
30800
30801        /// Access Mode determines how data stored within the resource is read. This
30802        /// is only applicable to storage bucket assets.
30803        ///
30804        /// # Working with unknown values
30805        ///
30806        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30807        /// additional enum variants at any time. Adding new variants is not considered
30808        /// a breaking change. Applications should write their code in anticipation of:
30809        ///
30810        /// - New values appearing in future releases of the client library, **and**
30811        /// - New values received dynamically, without application changes.
30812        ///
30813        /// Please consult the [Working with enums] section in the user guide for some
30814        /// guidelines.
30815        ///
30816        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30817        #[derive(Clone, Debug, PartialEq)]
30818        #[non_exhaustive]
30819        pub enum AccessMode {
30820            /// Access mode unspecified.
30821            Unspecified,
30822            /// Default. Data is accessed directly using storage APIs.
30823            Direct,
30824            /// Data is accessed through a managed interface using BigQuery APIs.
30825            Managed,
30826            /// If set, the enum was initialized with an unknown value.
30827            ///
30828            /// Applications can examine the value using [AccessMode::value] or
30829            /// [AccessMode::name].
30830            UnknownValue(access_mode::UnknownValue),
30831        }
30832
30833        #[doc(hidden)]
30834        pub mod access_mode {
30835            #[allow(unused_imports)]
30836            use super::*;
30837            #[derive(Clone, Debug, PartialEq)]
30838            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30839        }
30840
30841        impl AccessMode {
30842            /// Gets the enum value.
30843            ///
30844            /// Returns `None` if the enum contains an unknown value deserialized from
30845            /// the string representation of enums.
30846            pub fn value(&self) -> std::option::Option<i32> {
30847                match self {
30848                    Self::Unspecified => std::option::Option::Some(0),
30849                    Self::Direct => std::option::Option::Some(1),
30850                    Self::Managed => std::option::Option::Some(2),
30851                    Self::UnknownValue(u) => u.0.value(),
30852                }
30853            }
30854
30855            /// Gets the enum value as a string.
30856            ///
30857            /// Returns `None` if the enum contains an unknown value deserialized from
30858            /// the integer representation of enums.
30859            pub fn name(&self) -> std::option::Option<&str> {
30860                match self {
30861                    Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
30862                    Self::Direct => std::option::Option::Some("DIRECT"),
30863                    Self::Managed => std::option::Option::Some("MANAGED"),
30864                    Self::UnknownValue(u) => u.0.name(),
30865                }
30866            }
30867        }
30868
30869        impl std::default::Default for AccessMode {
30870            fn default() -> Self {
30871                use std::convert::From;
30872                Self::from(0)
30873            }
30874        }
30875
30876        impl std::fmt::Display for AccessMode {
30877            fn fmt(
30878                &self,
30879                f: &mut std::fmt::Formatter<'_>,
30880            ) -> std::result::Result<(), std::fmt::Error> {
30881                wkt::internal::display_enum(f, self.name(), self.value())
30882            }
30883        }
30884
30885        impl std::convert::From<i32> for AccessMode {
30886            fn from(value: i32) -> Self {
30887                match value {
30888                    0 => Self::Unspecified,
30889                    1 => Self::Direct,
30890                    2 => Self::Managed,
30891                    _ => Self::UnknownValue(access_mode::UnknownValue(
30892                        wkt::internal::UnknownEnumValue::Integer(value),
30893                    )),
30894                }
30895            }
30896        }
30897
30898        impl std::convert::From<&str> for AccessMode {
30899            fn from(value: &str) -> Self {
30900                use std::string::ToString;
30901                match value {
30902                    "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
30903                    "DIRECT" => Self::Direct,
30904                    "MANAGED" => Self::Managed,
30905                    _ => Self::UnknownValue(access_mode::UnknownValue(
30906                        wkt::internal::UnknownEnumValue::String(value.to_string()),
30907                    )),
30908                }
30909            }
30910        }
30911
30912        impl serde::ser::Serialize for AccessMode {
30913            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30914            where
30915                S: serde::Serializer,
30916            {
30917                match self {
30918                    Self::Unspecified => serializer.serialize_i32(0),
30919                    Self::Direct => serializer.serialize_i32(1),
30920                    Self::Managed => serializer.serialize_i32(2),
30921                    Self::UnknownValue(u) => u.0.serialize(serializer),
30922                }
30923            }
30924        }
30925
30926        impl<'de> serde::de::Deserialize<'de> for AccessMode {
30927            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30928            where
30929                D: serde::Deserializer<'de>,
30930            {
30931                deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
30932                    ".google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode",
30933                ))
30934            }
30935        }
30936    }
30937
30938    /// Status of the resource referenced by an asset.
30939    #[derive(Clone, Default, PartialEq)]
30940    #[non_exhaustive]
30941    pub struct ResourceStatus {
30942        /// The current state of the managed resource.
30943        pub state: crate::model::asset::resource_status::State,
30944
30945        /// Additional information about the current state.
30946        pub message: std::string::String,
30947
30948        /// Last update time of the status.
30949        pub update_time: std::option::Option<wkt::Timestamp>,
30950
30951        /// Output only. Service account associated with the BigQuery Connection.
30952        pub managed_access_identity: std::string::String,
30953
30954        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30955    }
30956
30957    impl ResourceStatus {
30958        pub fn new() -> Self {
30959            std::default::Default::default()
30960        }
30961
30962        /// Sets the value of [state][crate::model::asset::ResourceStatus::state].
30963        pub fn set_state<T: std::convert::Into<crate::model::asset::resource_status::State>>(
30964            mut self,
30965            v: T,
30966        ) -> Self {
30967            self.state = v.into();
30968            self
30969        }
30970
30971        /// Sets the value of [message][crate::model::asset::ResourceStatus::message].
30972        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30973            self.message = v.into();
30974            self
30975        }
30976
30977        /// Sets the value of [update_time][crate::model::asset::ResourceStatus::update_time].
30978        pub fn set_update_time<T>(mut self, v: T) -> Self
30979        where
30980            T: std::convert::Into<wkt::Timestamp>,
30981        {
30982            self.update_time = std::option::Option::Some(v.into());
30983            self
30984        }
30985
30986        /// Sets or clears the value of [update_time][crate::model::asset::ResourceStatus::update_time].
30987        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
30988        where
30989            T: std::convert::Into<wkt::Timestamp>,
30990        {
30991            self.update_time = v.map(|x| x.into());
30992            self
30993        }
30994
30995        /// Sets the value of [managed_access_identity][crate::model::asset::ResourceStatus::managed_access_identity].
30996        pub fn set_managed_access_identity<T: std::convert::Into<std::string::String>>(
30997            mut self,
30998            v: T,
30999        ) -> Self {
31000            self.managed_access_identity = v.into();
31001            self
31002        }
31003    }
31004
31005    impl wkt::message::Message for ResourceStatus {
31006        fn typename() -> &'static str {
31007            "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceStatus"
31008        }
31009    }
31010
31011    /// Defines additional types related to [ResourceStatus].
31012    pub mod resource_status {
31013        #[allow(unused_imports)]
31014        use super::*;
31015
31016        /// The state of a resource.
31017        ///
31018        /// # Working with unknown values
31019        ///
31020        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31021        /// additional enum variants at any time. Adding new variants is not considered
31022        /// a breaking change. Applications should write their code in anticipation of:
31023        ///
31024        /// - New values appearing in future releases of the client library, **and**
31025        /// - New values received dynamically, without application changes.
31026        ///
31027        /// Please consult the [Working with enums] section in the user guide for some
31028        /// guidelines.
31029        ///
31030        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31031        #[derive(Clone, Debug, PartialEq)]
31032        #[non_exhaustive]
31033        pub enum State {
31034            /// State unspecified.
31035            Unspecified,
31036            /// Resource does not have any errors.
31037            Ready,
31038            /// Resource has errors.
31039            Error,
31040            /// If set, the enum was initialized with an unknown value.
31041            ///
31042            /// Applications can examine the value using [State::value] or
31043            /// [State::name].
31044            UnknownValue(state::UnknownValue),
31045        }
31046
31047        #[doc(hidden)]
31048        pub mod state {
31049            #[allow(unused_imports)]
31050            use super::*;
31051            #[derive(Clone, Debug, PartialEq)]
31052            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31053        }
31054
31055        impl State {
31056            /// Gets the enum value.
31057            ///
31058            /// Returns `None` if the enum contains an unknown value deserialized from
31059            /// the string representation of enums.
31060            pub fn value(&self) -> std::option::Option<i32> {
31061                match self {
31062                    Self::Unspecified => std::option::Option::Some(0),
31063                    Self::Ready => std::option::Option::Some(1),
31064                    Self::Error => std::option::Option::Some(2),
31065                    Self::UnknownValue(u) => u.0.value(),
31066                }
31067            }
31068
31069            /// Gets the enum value as a string.
31070            ///
31071            /// Returns `None` if the enum contains an unknown value deserialized from
31072            /// the integer representation of enums.
31073            pub fn name(&self) -> std::option::Option<&str> {
31074                match self {
31075                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
31076                    Self::Ready => std::option::Option::Some("READY"),
31077                    Self::Error => std::option::Option::Some("ERROR"),
31078                    Self::UnknownValue(u) => u.0.name(),
31079                }
31080            }
31081        }
31082
31083        impl std::default::Default for State {
31084            fn default() -> Self {
31085                use std::convert::From;
31086                Self::from(0)
31087            }
31088        }
31089
31090        impl std::fmt::Display for State {
31091            fn fmt(
31092                &self,
31093                f: &mut std::fmt::Formatter<'_>,
31094            ) -> std::result::Result<(), std::fmt::Error> {
31095                wkt::internal::display_enum(f, self.name(), self.value())
31096            }
31097        }
31098
31099        impl std::convert::From<i32> for State {
31100            fn from(value: i32) -> Self {
31101                match value {
31102                    0 => Self::Unspecified,
31103                    1 => Self::Ready,
31104                    2 => Self::Error,
31105                    _ => Self::UnknownValue(state::UnknownValue(
31106                        wkt::internal::UnknownEnumValue::Integer(value),
31107                    )),
31108                }
31109            }
31110        }
31111
31112        impl std::convert::From<&str> for State {
31113            fn from(value: &str) -> Self {
31114                use std::string::ToString;
31115                match value {
31116                    "STATE_UNSPECIFIED" => Self::Unspecified,
31117                    "READY" => Self::Ready,
31118                    "ERROR" => Self::Error,
31119                    _ => Self::UnknownValue(state::UnknownValue(
31120                        wkt::internal::UnknownEnumValue::String(value.to_string()),
31121                    )),
31122                }
31123            }
31124        }
31125
31126        impl serde::ser::Serialize for State {
31127            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31128            where
31129                S: serde::Serializer,
31130            {
31131                match self {
31132                    Self::Unspecified => serializer.serialize_i32(0),
31133                    Self::Ready => serializer.serialize_i32(1),
31134                    Self::Error => serializer.serialize_i32(2),
31135                    Self::UnknownValue(u) => u.0.serialize(serializer),
31136                }
31137            }
31138        }
31139
31140        impl<'de> serde::de::Deserialize<'de> for State {
31141            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31142            where
31143                D: serde::Deserializer<'de>,
31144            {
31145                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
31146                    ".google.cloud.dataplex.v1.Asset.ResourceStatus.State",
31147                ))
31148            }
31149        }
31150    }
31151
31152    /// Status of discovery for an asset.
31153    #[derive(Clone, Default, PartialEq)]
31154    #[non_exhaustive]
31155    pub struct DiscoveryStatus {
31156        /// The current status of the discovery feature.
31157        pub state: crate::model::asset::discovery_status::State,
31158
31159        /// Additional information about the current state.
31160        pub message: std::string::String,
31161
31162        /// Last update time of the status.
31163        pub update_time: std::option::Option<wkt::Timestamp>,
31164
31165        /// The start time of the last discovery run.
31166        pub last_run_time: std::option::Option<wkt::Timestamp>,
31167
31168        /// Data Stats of the asset reported by discovery.
31169        pub stats: std::option::Option<crate::model::asset::discovery_status::Stats>,
31170
31171        /// The duration of the last discovery run.
31172        pub last_run_duration: std::option::Option<wkt::Duration>,
31173
31174        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31175    }
31176
31177    impl DiscoveryStatus {
31178        pub fn new() -> Self {
31179            std::default::Default::default()
31180        }
31181
31182        /// Sets the value of [state][crate::model::asset::DiscoveryStatus::state].
31183        pub fn set_state<T: std::convert::Into<crate::model::asset::discovery_status::State>>(
31184            mut self,
31185            v: T,
31186        ) -> Self {
31187            self.state = v.into();
31188            self
31189        }
31190
31191        /// Sets the value of [message][crate::model::asset::DiscoveryStatus::message].
31192        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31193            self.message = v.into();
31194            self
31195        }
31196
31197        /// Sets the value of [update_time][crate::model::asset::DiscoveryStatus::update_time].
31198        pub fn set_update_time<T>(mut self, v: T) -> Self
31199        where
31200            T: std::convert::Into<wkt::Timestamp>,
31201        {
31202            self.update_time = std::option::Option::Some(v.into());
31203            self
31204        }
31205
31206        /// Sets or clears the value of [update_time][crate::model::asset::DiscoveryStatus::update_time].
31207        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
31208        where
31209            T: std::convert::Into<wkt::Timestamp>,
31210        {
31211            self.update_time = v.map(|x| x.into());
31212            self
31213        }
31214
31215        /// Sets the value of [last_run_time][crate::model::asset::DiscoveryStatus::last_run_time].
31216        pub fn set_last_run_time<T>(mut self, v: T) -> Self
31217        where
31218            T: std::convert::Into<wkt::Timestamp>,
31219        {
31220            self.last_run_time = std::option::Option::Some(v.into());
31221            self
31222        }
31223
31224        /// Sets or clears the value of [last_run_time][crate::model::asset::DiscoveryStatus::last_run_time].
31225        pub fn set_or_clear_last_run_time<T>(mut self, v: std::option::Option<T>) -> Self
31226        where
31227            T: std::convert::Into<wkt::Timestamp>,
31228        {
31229            self.last_run_time = v.map(|x| x.into());
31230            self
31231        }
31232
31233        /// Sets the value of [stats][crate::model::asset::DiscoveryStatus::stats].
31234        pub fn set_stats<T>(mut self, v: T) -> Self
31235        where
31236            T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
31237        {
31238            self.stats = std::option::Option::Some(v.into());
31239            self
31240        }
31241
31242        /// Sets or clears the value of [stats][crate::model::asset::DiscoveryStatus::stats].
31243        pub fn set_or_clear_stats<T>(mut self, v: std::option::Option<T>) -> Self
31244        where
31245            T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
31246        {
31247            self.stats = v.map(|x| x.into());
31248            self
31249        }
31250
31251        /// Sets the value of [last_run_duration][crate::model::asset::DiscoveryStatus::last_run_duration].
31252        pub fn set_last_run_duration<T>(mut self, v: T) -> Self
31253        where
31254            T: std::convert::Into<wkt::Duration>,
31255        {
31256            self.last_run_duration = std::option::Option::Some(v.into());
31257            self
31258        }
31259
31260        /// Sets or clears the value of [last_run_duration][crate::model::asset::DiscoveryStatus::last_run_duration].
31261        pub fn set_or_clear_last_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
31262        where
31263            T: std::convert::Into<wkt::Duration>,
31264        {
31265            self.last_run_duration = v.map(|x| x.into());
31266            self
31267        }
31268    }
31269
31270    impl wkt::message::Message for DiscoveryStatus {
31271        fn typename() -> &'static str {
31272            "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus"
31273        }
31274    }
31275
31276    /// Defines additional types related to [DiscoveryStatus].
31277    pub mod discovery_status {
31278        #[allow(unused_imports)]
31279        use super::*;
31280
31281        /// The aggregated data statistics for the asset reported by discovery.
31282        #[derive(Clone, Default, PartialEq)]
31283        #[non_exhaustive]
31284        pub struct Stats {
31285            /// The count of data items within the referenced resource.
31286            pub data_items: i64,
31287
31288            /// The number of stored data bytes within the referenced resource.
31289            pub data_size: i64,
31290
31291            /// The count of table entities within the referenced resource.
31292            pub tables: i64,
31293
31294            /// The count of fileset entities within the referenced resource.
31295            pub filesets: i64,
31296
31297            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31298        }
31299
31300        impl Stats {
31301            pub fn new() -> Self {
31302                std::default::Default::default()
31303            }
31304
31305            /// Sets the value of [data_items][crate::model::asset::discovery_status::Stats::data_items].
31306            pub fn set_data_items<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31307                self.data_items = v.into();
31308                self
31309            }
31310
31311            /// Sets the value of [data_size][crate::model::asset::discovery_status::Stats::data_size].
31312            pub fn set_data_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31313                self.data_size = v.into();
31314                self
31315            }
31316
31317            /// Sets the value of [tables][crate::model::asset::discovery_status::Stats::tables].
31318            pub fn set_tables<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31319                self.tables = v.into();
31320                self
31321            }
31322
31323            /// Sets the value of [filesets][crate::model::asset::discovery_status::Stats::filesets].
31324            pub fn set_filesets<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31325                self.filesets = v.into();
31326                self
31327            }
31328        }
31329
31330        impl wkt::message::Message for Stats {
31331            fn typename() -> &'static str {
31332                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats"
31333            }
31334        }
31335
31336        /// Current state of discovery.
31337        ///
31338        /// # Working with unknown values
31339        ///
31340        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31341        /// additional enum variants at any time. Adding new variants is not considered
31342        /// a breaking change. Applications should write their code in anticipation of:
31343        ///
31344        /// - New values appearing in future releases of the client library, **and**
31345        /// - New values received dynamically, without application changes.
31346        ///
31347        /// Please consult the [Working with enums] section in the user guide for some
31348        /// guidelines.
31349        ///
31350        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31351        #[derive(Clone, Debug, PartialEq)]
31352        #[non_exhaustive]
31353        pub enum State {
31354            /// State is unspecified.
31355            Unspecified,
31356            /// Discovery for the asset is scheduled.
31357            Scheduled,
31358            /// Discovery for the asset is running.
31359            InProgress,
31360            /// Discovery for the asset is currently paused (e.g. due to a lack
31361            /// of available resources). It will be automatically resumed.
31362            Paused,
31363            /// Discovery for the asset is disabled.
31364            Disabled,
31365            /// If set, the enum was initialized with an unknown value.
31366            ///
31367            /// Applications can examine the value using [State::value] or
31368            /// [State::name].
31369            UnknownValue(state::UnknownValue),
31370        }
31371
31372        #[doc(hidden)]
31373        pub mod state {
31374            #[allow(unused_imports)]
31375            use super::*;
31376            #[derive(Clone, Debug, PartialEq)]
31377            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31378        }
31379
31380        impl State {
31381            /// Gets the enum value.
31382            ///
31383            /// Returns `None` if the enum contains an unknown value deserialized from
31384            /// the string representation of enums.
31385            pub fn value(&self) -> std::option::Option<i32> {
31386                match self {
31387                    Self::Unspecified => std::option::Option::Some(0),
31388                    Self::Scheduled => std::option::Option::Some(1),
31389                    Self::InProgress => std::option::Option::Some(2),
31390                    Self::Paused => std::option::Option::Some(3),
31391                    Self::Disabled => std::option::Option::Some(5),
31392                    Self::UnknownValue(u) => u.0.value(),
31393                }
31394            }
31395
31396            /// Gets the enum value as a string.
31397            ///
31398            /// Returns `None` if the enum contains an unknown value deserialized from
31399            /// the integer representation of enums.
31400            pub fn name(&self) -> std::option::Option<&str> {
31401                match self {
31402                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
31403                    Self::Scheduled => std::option::Option::Some("SCHEDULED"),
31404                    Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
31405                    Self::Paused => std::option::Option::Some("PAUSED"),
31406                    Self::Disabled => std::option::Option::Some("DISABLED"),
31407                    Self::UnknownValue(u) => u.0.name(),
31408                }
31409            }
31410        }
31411
31412        impl std::default::Default for State {
31413            fn default() -> Self {
31414                use std::convert::From;
31415                Self::from(0)
31416            }
31417        }
31418
31419        impl std::fmt::Display for State {
31420            fn fmt(
31421                &self,
31422                f: &mut std::fmt::Formatter<'_>,
31423            ) -> std::result::Result<(), std::fmt::Error> {
31424                wkt::internal::display_enum(f, self.name(), self.value())
31425            }
31426        }
31427
31428        impl std::convert::From<i32> for State {
31429            fn from(value: i32) -> Self {
31430                match value {
31431                    0 => Self::Unspecified,
31432                    1 => Self::Scheduled,
31433                    2 => Self::InProgress,
31434                    3 => Self::Paused,
31435                    5 => Self::Disabled,
31436                    _ => Self::UnknownValue(state::UnknownValue(
31437                        wkt::internal::UnknownEnumValue::Integer(value),
31438                    )),
31439                }
31440            }
31441        }
31442
31443        impl std::convert::From<&str> for State {
31444            fn from(value: &str) -> Self {
31445                use std::string::ToString;
31446                match value {
31447                    "STATE_UNSPECIFIED" => Self::Unspecified,
31448                    "SCHEDULED" => Self::Scheduled,
31449                    "IN_PROGRESS" => Self::InProgress,
31450                    "PAUSED" => Self::Paused,
31451                    "DISABLED" => Self::Disabled,
31452                    _ => Self::UnknownValue(state::UnknownValue(
31453                        wkt::internal::UnknownEnumValue::String(value.to_string()),
31454                    )),
31455                }
31456            }
31457        }
31458
31459        impl serde::ser::Serialize for State {
31460            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31461            where
31462                S: serde::Serializer,
31463            {
31464                match self {
31465                    Self::Unspecified => serializer.serialize_i32(0),
31466                    Self::Scheduled => serializer.serialize_i32(1),
31467                    Self::InProgress => serializer.serialize_i32(2),
31468                    Self::Paused => serializer.serialize_i32(3),
31469                    Self::Disabled => serializer.serialize_i32(5),
31470                    Self::UnknownValue(u) => u.0.serialize(serializer),
31471                }
31472            }
31473        }
31474
31475        impl<'de> serde::de::Deserialize<'de> for State {
31476            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31477            where
31478                D: serde::Deserializer<'de>,
31479            {
31480                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
31481                    ".google.cloud.dataplex.v1.Asset.DiscoveryStatus.State",
31482                ))
31483            }
31484        }
31485    }
31486}
31487
31488/// ResourceAccessSpec holds the access control configuration to be enforced
31489/// on the resources, for example, Cloud Storage bucket, BigQuery dataset,
31490/// BigQuery table.
31491#[derive(Clone, Default, PartialEq)]
31492#[non_exhaustive]
31493pub struct ResourceAccessSpec {
31494    /// Optional. The format of strings follows the pattern followed by IAM in the
31495    /// bindings. user:{email}, serviceAccount:{email} group:{email}.
31496    /// The set of principals to be granted reader role on the resource.
31497    pub readers: std::vec::Vec<std::string::String>,
31498
31499    /// Optional. The set of principals to be granted writer role on the resource.
31500    pub writers: std::vec::Vec<std::string::String>,
31501
31502    /// Optional. The set of principals to be granted owner role on the resource.
31503    pub owners: std::vec::Vec<std::string::String>,
31504
31505    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31506}
31507
31508impl ResourceAccessSpec {
31509    pub fn new() -> Self {
31510        std::default::Default::default()
31511    }
31512
31513    /// Sets the value of [readers][crate::model::ResourceAccessSpec::readers].
31514    pub fn set_readers<T, V>(mut self, v: T) -> Self
31515    where
31516        T: std::iter::IntoIterator<Item = V>,
31517        V: std::convert::Into<std::string::String>,
31518    {
31519        use std::iter::Iterator;
31520        self.readers = v.into_iter().map(|i| i.into()).collect();
31521        self
31522    }
31523
31524    /// Sets the value of [writers][crate::model::ResourceAccessSpec::writers].
31525    pub fn set_writers<T, V>(mut self, v: T) -> Self
31526    where
31527        T: std::iter::IntoIterator<Item = V>,
31528        V: std::convert::Into<std::string::String>,
31529    {
31530        use std::iter::Iterator;
31531        self.writers = v.into_iter().map(|i| i.into()).collect();
31532        self
31533    }
31534
31535    /// Sets the value of [owners][crate::model::ResourceAccessSpec::owners].
31536    pub fn set_owners<T, V>(mut self, v: T) -> Self
31537    where
31538        T: std::iter::IntoIterator<Item = V>,
31539        V: std::convert::Into<std::string::String>,
31540    {
31541        use std::iter::Iterator;
31542        self.owners = v.into_iter().map(|i| i.into()).collect();
31543        self
31544    }
31545}
31546
31547impl wkt::message::Message for ResourceAccessSpec {
31548    fn typename() -> &'static str {
31549        "type.googleapis.com/google.cloud.dataplex.v1.ResourceAccessSpec"
31550    }
31551}
31552
31553/// DataAccessSpec holds the access control configuration to be enforced on data
31554/// stored within resources (eg: rows, columns in BigQuery Tables). When
31555/// associated with data, the data is only accessible to
31556/// principals explicitly granted access through the DataAccessSpec. Principals
31557/// with access to the containing resource are not implicitly granted access.
31558#[derive(Clone, Default, PartialEq)]
31559#[non_exhaustive]
31560pub struct DataAccessSpec {
31561    /// Optional. The format of strings follows the pattern followed by IAM in the
31562    /// bindings. user:{email}, serviceAccount:{email} group:{email}.
31563    /// The set of principals to be granted reader role on data
31564    /// stored within resources.
31565    pub readers: std::vec::Vec<std::string::String>,
31566
31567    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31568}
31569
31570impl DataAccessSpec {
31571    pub fn new() -> Self {
31572        std::default::Default::default()
31573    }
31574
31575    /// Sets the value of [readers][crate::model::DataAccessSpec::readers].
31576    pub fn set_readers<T, V>(mut self, v: T) -> Self
31577    where
31578        T: std::iter::IntoIterator<Item = V>,
31579        V: std::convert::Into<std::string::String>,
31580    {
31581        use std::iter::Iterator;
31582        self.readers = v.into_iter().map(|i| i.into()).collect();
31583        self
31584    }
31585}
31586
31587impl wkt::message::Message for DataAccessSpec {
31588    fn typename() -> &'static str {
31589        "type.googleapis.com/google.cloud.dataplex.v1.DataAccessSpec"
31590    }
31591}
31592
31593/// Create lake request.
31594#[derive(Clone, Default, PartialEq)]
31595#[non_exhaustive]
31596pub struct CreateLakeRequest {
31597    /// Required. The resource name of the lake location, of the form:
31598    /// projects/{project_number}/locations/{location_id}
31599    /// where `location_id` refers to a Google Cloud region.
31600    pub parent: std::string::String,
31601
31602    /// Required. Lake identifier.
31603    /// This ID will be used to generate names such as database and dataset names
31604    /// when publishing metadata to Hive Metastore and BigQuery.
31605    ///
31606    /// * Must contain only lowercase letters, numbers and hyphens.
31607    /// * Must start with a letter.
31608    /// * Must end with a number or a letter.
31609    /// * Must be between 1-63 characters.
31610    /// * Must be unique within the customer project / location.
31611    pub lake_id: std::string::String,
31612
31613    /// Required. Lake resource
31614    pub lake: std::option::Option<crate::model::Lake>,
31615
31616    /// Optional. Only validate the request, but do not perform mutations.
31617    /// The default is false.
31618    pub validate_only: bool,
31619
31620    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31621}
31622
31623impl CreateLakeRequest {
31624    pub fn new() -> Self {
31625        std::default::Default::default()
31626    }
31627
31628    /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
31629    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31630        self.parent = v.into();
31631        self
31632    }
31633
31634    /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
31635    pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31636        self.lake_id = v.into();
31637        self
31638    }
31639
31640    /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
31641    pub fn set_lake<T>(mut self, v: T) -> Self
31642    where
31643        T: std::convert::Into<crate::model::Lake>,
31644    {
31645        self.lake = std::option::Option::Some(v.into());
31646        self
31647    }
31648
31649    /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
31650    pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
31651    where
31652        T: std::convert::Into<crate::model::Lake>,
31653    {
31654        self.lake = v.map(|x| x.into());
31655        self
31656    }
31657
31658    /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
31659    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31660        self.validate_only = v.into();
31661        self
31662    }
31663}
31664
31665impl wkt::message::Message for CreateLakeRequest {
31666    fn typename() -> &'static str {
31667        "type.googleapis.com/google.cloud.dataplex.v1.CreateLakeRequest"
31668    }
31669}
31670
31671/// Update lake request.
31672#[derive(Clone, Default, PartialEq)]
31673#[non_exhaustive]
31674pub struct UpdateLakeRequest {
31675    /// Required. Mask of fields to update.
31676    pub update_mask: std::option::Option<wkt::FieldMask>,
31677
31678    /// Required. Update description.
31679    /// Only fields specified in `update_mask` are updated.
31680    pub lake: std::option::Option<crate::model::Lake>,
31681
31682    /// Optional. Only validate the request, but do not perform mutations.
31683    /// The default is false.
31684    pub validate_only: bool,
31685
31686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31687}
31688
31689impl UpdateLakeRequest {
31690    pub fn new() -> Self {
31691        std::default::Default::default()
31692    }
31693
31694    /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
31695    pub fn set_update_mask<T>(mut self, v: T) -> Self
31696    where
31697        T: std::convert::Into<wkt::FieldMask>,
31698    {
31699        self.update_mask = std::option::Option::Some(v.into());
31700        self
31701    }
31702
31703    /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
31704    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
31705    where
31706        T: std::convert::Into<wkt::FieldMask>,
31707    {
31708        self.update_mask = v.map(|x| x.into());
31709        self
31710    }
31711
31712    /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
31713    pub fn set_lake<T>(mut self, v: T) -> Self
31714    where
31715        T: std::convert::Into<crate::model::Lake>,
31716    {
31717        self.lake = std::option::Option::Some(v.into());
31718        self
31719    }
31720
31721    /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
31722    pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
31723    where
31724        T: std::convert::Into<crate::model::Lake>,
31725    {
31726        self.lake = v.map(|x| x.into());
31727        self
31728    }
31729
31730    /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
31731    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31732        self.validate_only = v.into();
31733        self
31734    }
31735}
31736
31737impl wkt::message::Message for UpdateLakeRequest {
31738    fn typename() -> &'static str {
31739        "type.googleapis.com/google.cloud.dataplex.v1.UpdateLakeRequest"
31740    }
31741}
31742
31743/// Delete lake request.
31744#[derive(Clone, Default, PartialEq)]
31745#[non_exhaustive]
31746pub struct DeleteLakeRequest {
31747    /// Required. The resource name of the lake:
31748    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
31749    pub name: std::string::String,
31750
31751    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31752}
31753
31754impl DeleteLakeRequest {
31755    pub fn new() -> Self {
31756        std::default::Default::default()
31757    }
31758
31759    /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
31760    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31761        self.name = v.into();
31762        self
31763    }
31764}
31765
31766impl wkt::message::Message for DeleteLakeRequest {
31767    fn typename() -> &'static str {
31768        "type.googleapis.com/google.cloud.dataplex.v1.DeleteLakeRequest"
31769    }
31770}
31771
31772/// List lakes request.
31773#[derive(Clone, Default, PartialEq)]
31774#[non_exhaustive]
31775pub struct ListLakesRequest {
31776    /// Required. The resource name of the lake location, of the form:
31777    /// `projects/{project_number}/locations/{location_id}`
31778    /// where `location_id` refers to a Google Cloud region.
31779    pub parent: std::string::String,
31780
31781    /// Optional. Maximum number of Lakes to return. The service may return fewer
31782    /// than this value. If unspecified, at most 10 lakes will be returned. The
31783    /// maximum value is 1000; values above 1000 will be coerced to 1000.
31784    pub page_size: i32,
31785
31786    /// Optional. Page token received from a previous `ListLakes` call. Provide
31787    /// this to retrieve the subsequent page. When paginating, all other parameters
31788    /// provided to `ListLakes` must match the call that provided the page token.
31789    pub page_token: std::string::String,
31790
31791    /// Optional. Filter request.
31792    pub filter: std::string::String,
31793
31794    /// Optional. Order by fields for the result.
31795    pub order_by: std::string::String,
31796
31797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31798}
31799
31800impl ListLakesRequest {
31801    pub fn new() -> Self {
31802        std::default::Default::default()
31803    }
31804
31805    /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
31806    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31807        self.parent = v.into();
31808        self
31809    }
31810
31811    /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
31812    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
31813        self.page_size = v.into();
31814        self
31815    }
31816
31817    /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
31818    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31819        self.page_token = v.into();
31820        self
31821    }
31822
31823    /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
31824    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31825        self.filter = v.into();
31826        self
31827    }
31828
31829    /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
31830    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31831        self.order_by = v.into();
31832        self
31833    }
31834}
31835
31836impl wkt::message::Message for ListLakesRequest {
31837    fn typename() -> &'static str {
31838        "type.googleapis.com/google.cloud.dataplex.v1.ListLakesRequest"
31839    }
31840}
31841
31842/// List lakes response.
31843#[derive(Clone, Default, PartialEq)]
31844#[non_exhaustive]
31845pub struct ListLakesResponse {
31846    /// Lakes under the given parent location.
31847    pub lakes: std::vec::Vec<crate::model::Lake>,
31848
31849    /// Token to retrieve the next page of results, or empty if there are no more
31850    /// results in the list.
31851    pub next_page_token: std::string::String,
31852
31853    /// Locations that could not be reached.
31854    pub unreachable_locations: std::vec::Vec<std::string::String>,
31855
31856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31857}
31858
31859impl ListLakesResponse {
31860    pub fn new() -> Self {
31861        std::default::Default::default()
31862    }
31863
31864    /// Sets the value of [lakes][crate::model::ListLakesResponse::lakes].
31865    pub fn set_lakes<T, V>(mut self, v: T) -> Self
31866    where
31867        T: std::iter::IntoIterator<Item = V>,
31868        V: std::convert::Into<crate::model::Lake>,
31869    {
31870        use std::iter::Iterator;
31871        self.lakes = v.into_iter().map(|i| i.into()).collect();
31872        self
31873    }
31874
31875    /// Sets the value of [next_page_token][crate::model::ListLakesResponse::next_page_token].
31876    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31877        self.next_page_token = v.into();
31878        self
31879    }
31880
31881    /// Sets the value of [unreachable_locations][crate::model::ListLakesResponse::unreachable_locations].
31882    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
31883    where
31884        T: std::iter::IntoIterator<Item = V>,
31885        V: std::convert::Into<std::string::String>,
31886    {
31887        use std::iter::Iterator;
31888        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
31889        self
31890    }
31891}
31892
31893impl wkt::message::Message for ListLakesResponse {
31894    fn typename() -> &'static str {
31895        "type.googleapis.com/google.cloud.dataplex.v1.ListLakesResponse"
31896    }
31897}
31898
31899#[doc(hidden)]
31900impl gax::paginator::internal::PageableResponse for ListLakesResponse {
31901    type PageItem = crate::model::Lake;
31902
31903    fn items(self) -> std::vec::Vec<Self::PageItem> {
31904        self.lakes
31905    }
31906
31907    fn next_page_token(&self) -> std::string::String {
31908        use std::clone::Clone;
31909        self.next_page_token.clone()
31910    }
31911}
31912
31913/// List lake actions request.
31914#[derive(Clone, Default, PartialEq)]
31915#[non_exhaustive]
31916pub struct ListLakeActionsRequest {
31917    /// Required. The resource name of the parent lake:
31918    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
31919    pub parent: std::string::String,
31920
31921    /// Optional. Maximum number of actions to return. The service may return fewer
31922    /// than this value. If unspecified, at most 10 actions will be returned. The
31923    /// maximum value is 1000; values above 1000 will be coerced to 1000.
31924    pub page_size: i32,
31925
31926    /// Optional. Page token received from a previous `ListLakeActions` call.
31927    /// Provide this to retrieve the subsequent page. When paginating, all other
31928    /// parameters provided to `ListLakeActions` must match the call that provided
31929    /// the page token.
31930    pub page_token: std::string::String,
31931
31932    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31933}
31934
31935impl ListLakeActionsRequest {
31936    pub fn new() -> Self {
31937        std::default::Default::default()
31938    }
31939
31940    /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
31941    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31942        self.parent = v.into();
31943        self
31944    }
31945
31946    /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
31947    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
31948        self.page_size = v.into();
31949        self
31950    }
31951
31952    /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
31953    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31954        self.page_token = v.into();
31955        self
31956    }
31957}
31958
31959impl wkt::message::Message for ListLakeActionsRequest {
31960    fn typename() -> &'static str {
31961        "type.googleapis.com/google.cloud.dataplex.v1.ListLakeActionsRequest"
31962    }
31963}
31964
31965/// List actions response.
31966#[derive(Clone, Default, PartialEq)]
31967#[non_exhaustive]
31968pub struct ListActionsResponse {
31969    /// Actions under the given parent lake/zone/asset.
31970    pub actions: std::vec::Vec<crate::model::Action>,
31971
31972    /// Token to retrieve the next page of results, or empty if there are no more
31973    /// results in the list.
31974    pub next_page_token: std::string::String,
31975
31976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31977}
31978
31979impl ListActionsResponse {
31980    pub fn new() -> Self {
31981        std::default::Default::default()
31982    }
31983
31984    /// Sets the value of [actions][crate::model::ListActionsResponse::actions].
31985    pub fn set_actions<T, V>(mut self, v: T) -> Self
31986    where
31987        T: std::iter::IntoIterator<Item = V>,
31988        V: std::convert::Into<crate::model::Action>,
31989    {
31990        use std::iter::Iterator;
31991        self.actions = v.into_iter().map(|i| i.into()).collect();
31992        self
31993    }
31994
31995    /// Sets the value of [next_page_token][crate::model::ListActionsResponse::next_page_token].
31996    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31997        self.next_page_token = v.into();
31998        self
31999    }
32000}
32001
32002impl wkt::message::Message for ListActionsResponse {
32003    fn typename() -> &'static str {
32004        "type.googleapis.com/google.cloud.dataplex.v1.ListActionsResponse"
32005    }
32006}
32007
32008#[doc(hidden)]
32009impl gax::paginator::internal::PageableResponse for ListActionsResponse {
32010    type PageItem = crate::model::Action;
32011
32012    fn items(self) -> std::vec::Vec<Self::PageItem> {
32013        self.actions
32014    }
32015
32016    fn next_page_token(&self) -> std::string::String {
32017        use std::clone::Clone;
32018        self.next_page_token.clone()
32019    }
32020}
32021
32022/// Get lake request.
32023#[derive(Clone, Default, PartialEq)]
32024#[non_exhaustive]
32025pub struct GetLakeRequest {
32026    /// Required. The resource name of the lake:
32027    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
32028    pub name: std::string::String,
32029
32030    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32031}
32032
32033impl GetLakeRequest {
32034    pub fn new() -> Self {
32035        std::default::Default::default()
32036    }
32037
32038    /// Sets the value of [name][crate::model::GetLakeRequest::name].
32039    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32040        self.name = v.into();
32041        self
32042    }
32043}
32044
32045impl wkt::message::Message for GetLakeRequest {
32046    fn typename() -> &'static str {
32047        "type.googleapis.com/google.cloud.dataplex.v1.GetLakeRequest"
32048    }
32049}
32050
32051/// Create zone request.
32052#[derive(Clone, Default, PartialEq)]
32053#[non_exhaustive]
32054pub struct CreateZoneRequest {
32055    /// Required. The resource name of the parent lake:
32056    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
32057    pub parent: std::string::String,
32058
32059    /// Required. Zone identifier.
32060    /// This ID will be used to generate names such as database and dataset names
32061    /// when publishing metadata to Hive Metastore and BigQuery.
32062    ///
32063    /// * Must contain only lowercase letters, numbers and hyphens.
32064    /// * Must start with a letter.
32065    /// * Must end with a number or a letter.
32066    /// * Must be between 1-63 characters.
32067    /// * Must be unique across all lakes from all locations in a project.
32068    /// * Must not be one of the reserved IDs (i.e. "default", "global-temp")
32069    pub zone_id: std::string::String,
32070
32071    /// Required. Zone resource.
32072    pub zone: std::option::Option<crate::model::Zone>,
32073
32074    /// Optional. Only validate the request, but do not perform mutations.
32075    /// The default is false.
32076    pub validate_only: bool,
32077
32078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32079}
32080
32081impl CreateZoneRequest {
32082    pub fn new() -> Self {
32083        std::default::Default::default()
32084    }
32085
32086    /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
32087    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32088        self.parent = v.into();
32089        self
32090    }
32091
32092    /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
32093    pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32094        self.zone_id = v.into();
32095        self
32096    }
32097
32098    /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
32099    pub fn set_zone<T>(mut self, v: T) -> Self
32100    where
32101        T: std::convert::Into<crate::model::Zone>,
32102    {
32103        self.zone = std::option::Option::Some(v.into());
32104        self
32105    }
32106
32107    /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
32108    pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
32109    where
32110        T: std::convert::Into<crate::model::Zone>,
32111    {
32112        self.zone = v.map(|x| x.into());
32113        self
32114    }
32115
32116    /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
32117    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32118        self.validate_only = v.into();
32119        self
32120    }
32121}
32122
32123impl wkt::message::Message for CreateZoneRequest {
32124    fn typename() -> &'static str {
32125        "type.googleapis.com/google.cloud.dataplex.v1.CreateZoneRequest"
32126    }
32127}
32128
32129/// Update zone request.
32130#[derive(Clone, Default, PartialEq)]
32131#[non_exhaustive]
32132pub struct UpdateZoneRequest {
32133    /// Required. Mask of fields to update.
32134    pub update_mask: std::option::Option<wkt::FieldMask>,
32135
32136    /// Required. Update description.
32137    /// Only fields specified in `update_mask` are updated.
32138    pub zone: std::option::Option<crate::model::Zone>,
32139
32140    /// Optional. Only validate the request, but do not perform mutations.
32141    /// The default is false.
32142    pub validate_only: bool,
32143
32144    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32145}
32146
32147impl UpdateZoneRequest {
32148    pub fn new() -> Self {
32149        std::default::Default::default()
32150    }
32151
32152    /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
32153    pub fn set_update_mask<T>(mut self, v: T) -> Self
32154    where
32155        T: std::convert::Into<wkt::FieldMask>,
32156    {
32157        self.update_mask = std::option::Option::Some(v.into());
32158        self
32159    }
32160
32161    /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
32162    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
32163    where
32164        T: std::convert::Into<wkt::FieldMask>,
32165    {
32166        self.update_mask = v.map(|x| x.into());
32167        self
32168    }
32169
32170    /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
32171    pub fn set_zone<T>(mut self, v: T) -> Self
32172    where
32173        T: std::convert::Into<crate::model::Zone>,
32174    {
32175        self.zone = std::option::Option::Some(v.into());
32176        self
32177    }
32178
32179    /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
32180    pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
32181    where
32182        T: std::convert::Into<crate::model::Zone>,
32183    {
32184        self.zone = v.map(|x| x.into());
32185        self
32186    }
32187
32188    /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
32189    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32190        self.validate_only = v.into();
32191        self
32192    }
32193}
32194
32195impl wkt::message::Message for UpdateZoneRequest {
32196    fn typename() -> &'static str {
32197        "type.googleapis.com/google.cloud.dataplex.v1.UpdateZoneRequest"
32198    }
32199}
32200
32201/// Delete zone request.
32202#[derive(Clone, Default, PartialEq)]
32203#[non_exhaustive]
32204pub struct DeleteZoneRequest {
32205    /// Required. The resource name of the zone:
32206    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
32207    pub name: std::string::String,
32208
32209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32210}
32211
32212impl DeleteZoneRequest {
32213    pub fn new() -> Self {
32214        std::default::Default::default()
32215    }
32216
32217    /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
32218    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32219        self.name = v.into();
32220        self
32221    }
32222}
32223
32224impl wkt::message::Message for DeleteZoneRequest {
32225    fn typename() -> &'static str {
32226        "type.googleapis.com/google.cloud.dataplex.v1.DeleteZoneRequest"
32227    }
32228}
32229
32230/// List zones request.
32231#[derive(Clone, Default, PartialEq)]
32232#[non_exhaustive]
32233pub struct ListZonesRequest {
32234    /// Required. The resource name of the parent lake:
32235    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
32236    pub parent: std::string::String,
32237
32238    /// Optional. Maximum number of zones to return. The service may return fewer
32239    /// than this value. If unspecified, at most 10 zones will be returned. The
32240    /// maximum value is 1000; values above 1000 will be coerced to 1000.
32241    pub page_size: i32,
32242
32243    /// Optional. Page token received from a previous `ListZones` call. Provide
32244    /// this to retrieve the subsequent page. When paginating, all other parameters
32245    /// provided to `ListZones` must match the call that provided the page token.
32246    pub page_token: std::string::String,
32247
32248    /// Optional. Filter request.
32249    pub filter: std::string::String,
32250
32251    /// Optional. Order by fields for the result.
32252    pub order_by: std::string::String,
32253
32254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32255}
32256
32257impl ListZonesRequest {
32258    pub fn new() -> Self {
32259        std::default::Default::default()
32260    }
32261
32262    /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
32263    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32264        self.parent = v.into();
32265        self
32266    }
32267
32268    /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
32269    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32270        self.page_size = v.into();
32271        self
32272    }
32273
32274    /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
32275    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32276        self.page_token = v.into();
32277        self
32278    }
32279
32280    /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
32281    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32282        self.filter = v.into();
32283        self
32284    }
32285
32286    /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
32287    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32288        self.order_by = v.into();
32289        self
32290    }
32291}
32292
32293impl wkt::message::Message for ListZonesRequest {
32294    fn typename() -> &'static str {
32295        "type.googleapis.com/google.cloud.dataplex.v1.ListZonesRequest"
32296    }
32297}
32298
32299/// List zones response.
32300#[derive(Clone, Default, PartialEq)]
32301#[non_exhaustive]
32302pub struct ListZonesResponse {
32303    /// Zones under the given parent lake.
32304    pub zones: std::vec::Vec<crate::model::Zone>,
32305
32306    /// Token to retrieve the next page of results, or empty if there are no more
32307    /// results in the list.
32308    pub next_page_token: std::string::String,
32309
32310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32311}
32312
32313impl ListZonesResponse {
32314    pub fn new() -> Self {
32315        std::default::Default::default()
32316    }
32317
32318    /// Sets the value of [zones][crate::model::ListZonesResponse::zones].
32319    pub fn set_zones<T, V>(mut self, v: T) -> Self
32320    where
32321        T: std::iter::IntoIterator<Item = V>,
32322        V: std::convert::Into<crate::model::Zone>,
32323    {
32324        use std::iter::Iterator;
32325        self.zones = v.into_iter().map(|i| i.into()).collect();
32326        self
32327    }
32328
32329    /// Sets the value of [next_page_token][crate::model::ListZonesResponse::next_page_token].
32330    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32331        self.next_page_token = v.into();
32332        self
32333    }
32334}
32335
32336impl wkt::message::Message for ListZonesResponse {
32337    fn typename() -> &'static str {
32338        "type.googleapis.com/google.cloud.dataplex.v1.ListZonesResponse"
32339    }
32340}
32341
32342#[doc(hidden)]
32343impl gax::paginator::internal::PageableResponse for ListZonesResponse {
32344    type PageItem = crate::model::Zone;
32345
32346    fn items(self) -> std::vec::Vec<Self::PageItem> {
32347        self.zones
32348    }
32349
32350    fn next_page_token(&self) -> std::string::String {
32351        use std::clone::Clone;
32352        self.next_page_token.clone()
32353    }
32354}
32355
32356/// List zone actions request.
32357#[derive(Clone, Default, PartialEq)]
32358#[non_exhaustive]
32359pub struct ListZoneActionsRequest {
32360    /// Required. The resource name of the parent zone:
32361    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
32362    pub parent: std::string::String,
32363
32364    /// Optional. Maximum number of actions to return. The service may return fewer
32365    /// than this value. If unspecified, at most 10 actions will be returned. The
32366    /// maximum value is 1000; values above 1000 will be coerced to 1000.
32367    pub page_size: i32,
32368
32369    /// Optional. Page token received from a previous `ListZoneActions` call.
32370    /// Provide this to retrieve the subsequent page. When paginating, all other
32371    /// parameters provided to `ListZoneActions` must match the call that provided
32372    /// the page token.
32373    pub page_token: std::string::String,
32374
32375    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32376}
32377
32378impl ListZoneActionsRequest {
32379    pub fn new() -> Self {
32380        std::default::Default::default()
32381    }
32382
32383    /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
32384    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32385        self.parent = v.into();
32386        self
32387    }
32388
32389    /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
32390    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32391        self.page_size = v.into();
32392        self
32393    }
32394
32395    /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
32396    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32397        self.page_token = v.into();
32398        self
32399    }
32400}
32401
32402impl wkt::message::Message for ListZoneActionsRequest {
32403    fn typename() -> &'static str {
32404        "type.googleapis.com/google.cloud.dataplex.v1.ListZoneActionsRequest"
32405    }
32406}
32407
32408/// Get zone request.
32409#[derive(Clone, Default, PartialEq)]
32410#[non_exhaustive]
32411pub struct GetZoneRequest {
32412    /// Required. The resource name of the zone:
32413    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
32414    pub name: std::string::String,
32415
32416    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32417}
32418
32419impl GetZoneRequest {
32420    pub fn new() -> Self {
32421        std::default::Default::default()
32422    }
32423
32424    /// Sets the value of [name][crate::model::GetZoneRequest::name].
32425    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32426        self.name = v.into();
32427        self
32428    }
32429}
32430
32431impl wkt::message::Message for GetZoneRequest {
32432    fn typename() -> &'static str {
32433        "type.googleapis.com/google.cloud.dataplex.v1.GetZoneRequest"
32434    }
32435}
32436
32437/// Create asset request.
32438#[derive(Clone, Default, PartialEq)]
32439#[non_exhaustive]
32440pub struct CreateAssetRequest {
32441    /// Required. The resource name of the parent zone:
32442    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
32443    pub parent: std::string::String,
32444
32445    /// Required. Asset identifier.
32446    /// This ID will be used to generate names such as table names when publishing
32447    /// metadata to Hive Metastore and BigQuery.
32448    ///
32449    /// * Must contain only lowercase letters, numbers and hyphens.
32450    /// * Must start with a letter.
32451    /// * Must end with a number or a letter.
32452    /// * Must be between 1-63 characters.
32453    /// * Must be unique within the zone.
32454    pub asset_id: std::string::String,
32455
32456    /// Required. Asset resource.
32457    pub asset: std::option::Option<crate::model::Asset>,
32458
32459    /// Optional. Only validate the request, but do not perform mutations.
32460    /// The default is false.
32461    pub validate_only: bool,
32462
32463    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32464}
32465
32466impl CreateAssetRequest {
32467    pub fn new() -> Self {
32468        std::default::Default::default()
32469    }
32470
32471    /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
32472    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32473        self.parent = v.into();
32474        self
32475    }
32476
32477    /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
32478    pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32479        self.asset_id = v.into();
32480        self
32481    }
32482
32483    /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
32484    pub fn set_asset<T>(mut self, v: T) -> Self
32485    where
32486        T: std::convert::Into<crate::model::Asset>,
32487    {
32488        self.asset = std::option::Option::Some(v.into());
32489        self
32490    }
32491
32492    /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
32493    pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
32494    where
32495        T: std::convert::Into<crate::model::Asset>,
32496    {
32497        self.asset = v.map(|x| x.into());
32498        self
32499    }
32500
32501    /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
32502    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32503        self.validate_only = v.into();
32504        self
32505    }
32506}
32507
32508impl wkt::message::Message for CreateAssetRequest {
32509    fn typename() -> &'static str {
32510        "type.googleapis.com/google.cloud.dataplex.v1.CreateAssetRequest"
32511    }
32512}
32513
32514/// Update asset request.
32515#[derive(Clone, Default, PartialEq)]
32516#[non_exhaustive]
32517pub struct UpdateAssetRequest {
32518    /// Required. Mask of fields to update.
32519    pub update_mask: std::option::Option<wkt::FieldMask>,
32520
32521    /// Required. Update description.
32522    /// Only fields specified in `update_mask` are updated.
32523    pub asset: std::option::Option<crate::model::Asset>,
32524
32525    /// Optional. Only validate the request, but do not perform mutations.
32526    /// The default is false.
32527    pub validate_only: bool,
32528
32529    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32530}
32531
32532impl UpdateAssetRequest {
32533    pub fn new() -> Self {
32534        std::default::Default::default()
32535    }
32536
32537    /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
32538    pub fn set_update_mask<T>(mut self, v: T) -> Self
32539    where
32540        T: std::convert::Into<wkt::FieldMask>,
32541    {
32542        self.update_mask = std::option::Option::Some(v.into());
32543        self
32544    }
32545
32546    /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
32547    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
32548    where
32549        T: std::convert::Into<wkt::FieldMask>,
32550    {
32551        self.update_mask = v.map(|x| x.into());
32552        self
32553    }
32554
32555    /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
32556    pub fn set_asset<T>(mut self, v: T) -> Self
32557    where
32558        T: std::convert::Into<crate::model::Asset>,
32559    {
32560        self.asset = std::option::Option::Some(v.into());
32561        self
32562    }
32563
32564    /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
32565    pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
32566    where
32567        T: std::convert::Into<crate::model::Asset>,
32568    {
32569        self.asset = v.map(|x| x.into());
32570        self
32571    }
32572
32573    /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
32574    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32575        self.validate_only = v.into();
32576        self
32577    }
32578}
32579
32580impl wkt::message::Message for UpdateAssetRequest {
32581    fn typename() -> &'static str {
32582        "type.googleapis.com/google.cloud.dataplex.v1.UpdateAssetRequest"
32583    }
32584}
32585
32586/// Delete asset request.
32587#[derive(Clone, Default, PartialEq)]
32588#[non_exhaustive]
32589pub struct DeleteAssetRequest {
32590    /// Required. The resource name of the asset:
32591    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
32592    pub name: std::string::String,
32593
32594    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32595}
32596
32597impl DeleteAssetRequest {
32598    pub fn new() -> Self {
32599        std::default::Default::default()
32600    }
32601
32602    /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
32603    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32604        self.name = v.into();
32605        self
32606    }
32607}
32608
32609impl wkt::message::Message for DeleteAssetRequest {
32610    fn typename() -> &'static str {
32611        "type.googleapis.com/google.cloud.dataplex.v1.DeleteAssetRequest"
32612    }
32613}
32614
32615/// List assets request.
32616#[derive(Clone, Default, PartialEq)]
32617#[non_exhaustive]
32618pub struct ListAssetsRequest {
32619    /// Required. The resource name of the parent zone:
32620    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
32621    pub parent: std::string::String,
32622
32623    /// Optional. Maximum number of asset to return. The service may return fewer
32624    /// than this value. If unspecified, at most 10 assets will be returned. The
32625    /// maximum value is 1000; values above 1000 will be coerced to 1000.
32626    pub page_size: i32,
32627
32628    /// Optional. Page token received from a previous `ListAssets` call. Provide
32629    /// this to retrieve the subsequent page. When paginating, all other parameters
32630    /// provided to `ListAssets` must match the call that provided the page
32631    /// token.
32632    pub page_token: std::string::String,
32633
32634    /// Optional. Filter request.
32635    pub filter: std::string::String,
32636
32637    /// Optional. Order by fields for the result.
32638    pub order_by: std::string::String,
32639
32640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32641}
32642
32643impl ListAssetsRequest {
32644    pub fn new() -> Self {
32645        std::default::Default::default()
32646    }
32647
32648    /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
32649    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32650        self.parent = v.into();
32651        self
32652    }
32653
32654    /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
32655    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32656        self.page_size = v.into();
32657        self
32658    }
32659
32660    /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
32661    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32662        self.page_token = v.into();
32663        self
32664    }
32665
32666    /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
32667    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32668        self.filter = v.into();
32669        self
32670    }
32671
32672    /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
32673    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32674        self.order_by = v.into();
32675        self
32676    }
32677}
32678
32679impl wkt::message::Message for ListAssetsRequest {
32680    fn typename() -> &'static str {
32681        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsRequest"
32682    }
32683}
32684
32685/// List assets response.
32686#[derive(Clone, Default, PartialEq)]
32687#[non_exhaustive]
32688pub struct ListAssetsResponse {
32689    /// Asset under the given parent zone.
32690    pub assets: std::vec::Vec<crate::model::Asset>,
32691
32692    /// Token to retrieve the next page of results, or empty if there are no more
32693    /// results in the list.
32694    pub next_page_token: std::string::String,
32695
32696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32697}
32698
32699impl ListAssetsResponse {
32700    pub fn new() -> Self {
32701        std::default::Default::default()
32702    }
32703
32704    /// Sets the value of [assets][crate::model::ListAssetsResponse::assets].
32705    pub fn set_assets<T, V>(mut self, v: T) -> Self
32706    where
32707        T: std::iter::IntoIterator<Item = V>,
32708        V: std::convert::Into<crate::model::Asset>,
32709    {
32710        use std::iter::Iterator;
32711        self.assets = v.into_iter().map(|i| i.into()).collect();
32712        self
32713    }
32714
32715    /// Sets the value of [next_page_token][crate::model::ListAssetsResponse::next_page_token].
32716    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32717        self.next_page_token = v.into();
32718        self
32719    }
32720}
32721
32722impl wkt::message::Message for ListAssetsResponse {
32723    fn typename() -> &'static str {
32724        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsResponse"
32725    }
32726}
32727
32728#[doc(hidden)]
32729impl gax::paginator::internal::PageableResponse for ListAssetsResponse {
32730    type PageItem = crate::model::Asset;
32731
32732    fn items(self) -> std::vec::Vec<Self::PageItem> {
32733        self.assets
32734    }
32735
32736    fn next_page_token(&self) -> std::string::String {
32737        use std::clone::Clone;
32738        self.next_page_token.clone()
32739    }
32740}
32741
32742/// List asset actions request.
32743#[derive(Clone, Default, PartialEq)]
32744#[non_exhaustive]
32745pub struct ListAssetActionsRequest {
32746    /// Required. The resource name of the parent asset:
32747    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
32748    pub parent: std::string::String,
32749
32750    /// Optional. Maximum number of actions to return. The service may return fewer
32751    /// than this value. If unspecified, at most 10 actions will be returned. The
32752    /// maximum value is 1000; values above 1000 will be coerced to 1000.
32753    pub page_size: i32,
32754
32755    /// Optional. Page token received from a previous `ListAssetActions` call.
32756    /// Provide this to retrieve the subsequent page. When paginating, all other
32757    /// parameters provided to `ListAssetActions` must match the call that provided
32758    /// the page token.
32759    pub page_token: std::string::String,
32760
32761    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32762}
32763
32764impl ListAssetActionsRequest {
32765    pub fn new() -> Self {
32766        std::default::Default::default()
32767    }
32768
32769    /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
32770    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32771        self.parent = v.into();
32772        self
32773    }
32774
32775    /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
32776    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32777        self.page_size = v.into();
32778        self
32779    }
32780
32781    /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
32782    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32783        self.page_token = v.into();
32784        self
32785    }
32786}
32787
32788impl wkt::message::Message for ListAssetActionsRequest {
32789    fn typename() -> &'static str {
32790        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetActionsRequest"
32791    }
32792}
32793
32794/// Get asset request.
32795#[derive(Clone, Default, PartialEq)]
32796#[non_exhaustive]
32797pub struct GetAssetRequest {
32798    /// Required. The resource name of the asset:
32799    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
32800    pub name: std::string::String,
32801
32802    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32803}
32804
32805impl GetAssetRequest {
32806    pub fn new() -> Self {
32807        std::default::Default::default()
32808    }
32809
32810    /// Sets the value of [name][crate::model::GetAssetRequest::name].
32811    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32812        self.name = v.into();
32813        self
32814    }
32815}
32816
32817impl wkt::message::Message for GetAssetRequest {
32818    fn typename() -> &'static str {
32819        "type.googleapis.com/google.cloud.dataplex.v1.GetAssetRequest"
32820    }
32821}
32822
32823/// Represents the metadata of a long-running operation.
32824#[derive(Clone, Default, PartialEq)]
32825#[non_exhaustive]
32826pub struct OperationMetadata {
32827    /// Output only. The time the operation was created.
32828    pub create_time: std::option::Option<wkt::Timestamp>,
32829
32830    /// Output only. The time the operation finished running.
32831    pub end_time: std::option::Option<wkt::Timestamp>,
32832
32833    /// Output only. Server-defined resource path for the target of the operation.
32834    pub target: std::string::String,
32835
32836    /// Output only. Name of the verb executed by the operation.
32837    pub verb: std::string::String,
32838
32839    /// Output only. Human-readable status of the operation, if any.
32840    pub status_message: std::string::String,
32841
32842    /// Output only. Identifies whether the user has requested cancellation
32843    /// of the operation. Operations that have successfully been cancelled
32844    /// have [Operation.error][] value with a
32845    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
32846    /// `Code.CANCELLED`.
32847    ///
32848    /// [google.rpc.Status.code]: rpc::model::Status::code
32849    pub requested_cancellation: bool,
32850
32851    /// Output only. API version used to start the operation.
32852    pub api_version: std::string::String,
32853
32854    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32855}
32856
32857impl OperationMetadata {
32858    pub fn new() -> Self {
32859        std::default::Default::default()
32860    }
32861
32862    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
32863    pub fn set_create_time<T>(mut self, v: T) -> Self
32864    where
32865        T: std::convert::Into<wkt::Timestamp>,
32866    {
32867        self.create_time = std::option::Option::Some(v.into());
32868        self
32869    }
32870
32871    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
32872    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
32873    where
32874        T: std::convert::Into<wkt::Timestamp>,
32875    {
32876        self.create_time = v.map(|x| x.into());
32877        self
32878    }
32879
32880    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
32881    pub fn set_end_time<T>(mut self, v: T) -> Self
32882    where
32883        T: std::convert::Into<wkt::Timestamp>,
32884    {
32885        self.end_time = std::option::Option::Some(v.into());
32886        self
32887    }
32888
32889    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
32890    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
32891    where
32892        T: std::convert::Into<wkt::Timestamp>,
32893    {
32894        self.end_time = v.map(|x| x.into());
32895        self
32896    }
32897
32898    /// Sets the value of [target][crate::model::OperationMetadata::target].
32899    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32900        self.target = v.into();
32901        self
32902    }
32903
32904    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
32905    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32906        self.verb = v.into();
32907        self
32908    }
32909
32910    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
32911    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32912        self.status_message = v.into();
32913        self
32914    }
32915
32916    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
32917    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32918        self.requested_cancellation = v.into();
32919        self
32920    }
32921
32922    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
32923    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32924        self.api_version = v.into();
32925        self
32926    }
32927}
32928
32929impl wkt::message::Message for OperationMetadata {
32930    fn typename() -> &'static str {
32931        "type.googleapis.com/google.cloud.dataplex.v1.OperationMetadata"
32932    }
32933}
32934
32935/// Create task request.
32936#[derive(Clone, Default, PartialEq)]
32937#[non_exhaustive]
32938pub struct CreateTaskRequest {
32939    /// Required. The resource name of the parent lake:
32940    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
32941    pub parent: std::string::String,
32942
32943    /// Required. Task identifier.
32944    pub task_id: std::string::String,
32945
32946    /// Required. Task resource.
32947    pub task: std::option::Option<crate::model::Task>,
32948
32949    /// Optional. Only validate the request, but do not perform mutations.
32950    /// The default is false.
32951    pub validate_only: bool,
32952
32953    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32954}
32955
32956impl CreateTaskRequest {
32957    pub fn new() -> Self {
32958        std::default::Default::default()
32959    }
32960
32961    /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
32962    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32963        self.parent = v.into();
32964        self
32965    }
32966
32967    /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
32968    pub fn set_task_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32969        self.task_id = v.into();
32970        self
32971    }
32972
32973    /// Sets the value of [task][crate::model::CreateTaskRequest::task].
32974    pub fn set_task<T>(mut self, v: T) -> Self
32975    where
32976        T: std::convert::Into<crate::model::Task>,
32977    {
32978        self.task = std::option::Option::Some(v.into());
32979        self
32980    }
32981
32982    /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
32983    pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
32984    where
32985        T: std::convert::Into<crate::model::Task>,
32986    {
32987        self.task = v.map(|x| x.into());
32988        self
32989    }
32990
32991    /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
32992    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32993        self.validate_only = v.into();
32994        self
32995    }
32996}
32997
32998impl wkt::message::Message for CreateTaskRequest {
32999    fn typename() -> &'static str {
33000        "type.googleapis.com/google.cloud.dataplex.v1.CreateTaskRequest"
33001    }
33002}
33003
33004/// Update task request.
33005#[derive(Clone, Default, PartialEq)]
33006#[non_exhaustive]
33007pub struct UpdateTaskRequest {
33008    /// Required. Mask of fields to update.
33009    pub update_mask: std::option::Option<wkt::FieldMask>,
33010
33011    /// Required. Update description.
33012    /// Only fields specified in `update_mask` are updated.
33013    pub task: std::option::Option<crate::model::Task>,
33014
33015    /// Optional. Only validate the request, but do not perform mutations.
33016    /// The default is false.
33017    pub validate_only: bool,
33018
33019    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33020}
33021
33022impl UpdateTaskRequest {
33023    pub fn new() -> Self {
33024        std::default::Default::default()
33025    }
33026
33027    /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
33028    pub fn set_update_mask<T>(mut self, v: T) -> Self
33029    where
33030        T: std::convert::Into<wkt::FieldMask>,
33031    {
33032        self.update_mask = std::option::Option::Some(v.into());
33033        self
33034    }
33035
33036    /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
33037    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
33038    where
33039        T: std::convert::Into<wkt::FieldMask>,
33040    {
33041        self.update_mask = v.map(|x| x.into());
33042        self
33043    }
33044
33045    /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
33046    pub fn set_task<T>(mut self, v: T) -> Self
33047    where
33048        T: std::convert::Into<crate::model::Task>,
33049    {
33050        self.task = std::option::Option::Some(v.into());
33051        self
33052    }
33053
33054    /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
33055    pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
33056    where
33057        T: std::convert::Into<crate::model::Task>,
33058    {
33059        self.task = v.map(|x| x.into());
33060        self
33061    }
33062
33063    /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
33064    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33065        self.validate_only = v.into();
33066        self
33067    }
33068}
33069
33070impl wkt::message::Message for UpdateTaskRequest {
33071    fn typename() -> &'static str {
33072        "type.googleapis.com/google.cloud.dataplex.v1.UpdateTaskRequest"
33073    }
33074}
33075
33076/// Delete task request.
33077#[derive(Clone, Default, PartialEq)]
33078#[non_exhaustive]
33079pub struct DeleteTaskRequest {
33080    /// Required. The resource name of the task:
33081    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.
33082    pub name: std::string::String,
33083
33084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33085}
33086
33087impl DeleteTaskRequest {
33088    pub fn new() -> Self {
33089        std::default::Default::default()
33090    }
33091
33092    /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
33093    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33094        self.name = v.into();
33095        self
33096    }
33097}
33098
33099impl wkt::message::Message for DeleteTaskRequest {
33100    fn typename() -> &'static str {
33101        "type.googleapis.com/google.cloud.dataplex.v1.DeleteTaskRequest"
33102    }
33103}
33104
33105/// List tasks request.
33106#[derive(Clone, Default, PartialEq)]
33107#[non_exhaustive]
33108pub struct ListTasksRequest {
33109    /// Required. The resource name of the parent lake:
33110    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
33111    pub parent: std::string::String,
33112
33113    /// Optional. Maximum number of tasks to return. The service may return fewer
33114    /// than this value. If unspecified, at most 10 tasks will be returned. The
33115    /// maximum value is 1000; values above 1000 will be coerced to 1000.
33116    pub page_size: i32,
33117
33118    /// Optional. Page token received from a previous `ListZones` call. Provide
33119    /// this to retrieve the subsequent page. When paginating, all other parameters
33120    /// provided to `ListZones` must match the call that provided the page token.
33121    pub page_token: std::string::String,
33122
33123    /// Optional. Filter request.
33124    pub filter: std::string::String,
33125
33126    /// Optional. Order by fields for the result.
33127    pub order_by: std::string::String,
33128
33129    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33130}
33131
33132impl ListTasksRequest {
33133    pub fn new() -> Self {
33134        std::default::Default::default()
33135    }
33136
33137    /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
33138    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33139        self.parent = v.into();
33140        self
33141    }
33142
33143    /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
33144    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33145        self.page_size = v.into();
33146        self
33147    }
33148
33149    /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
33150    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33151        self.page_token = v.into();
33152        self
33153    }
33154
33155    /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
33156    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33157        self.filter = v.into();
33158        self
33159    }
33160
33161    /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
33162    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33163        self.order_by = v.into();
33164        self
33165    }
33166}
33167
33168impl wkt::message::Message for ListTasksRequest {
33169    fn typename() -> &'static str {
33170        "type.googleapis.com/google.cloud.dataplex.v1.ListTasksRequest"
33171    }
33172}
33173
33174/// List tasks response.
33175#[derive(Clone, Default, PartialEq)]
33176#[non_exhaustive]
33177pub struct ListTasksResponse {
33178    /// Tasks under the given parent lake.
33179    pub tasks: std::vec::Vec<crate::model::Task>,
33180
33181    /// Token to retrieve the next page of results, or empty if there are no more
33182    /// results in the list.
33183    pub next_page_token: std::string::String,
33184
33185    /// Locations that could not be reached.
33186    pub unreachable_locations: std::vec::Vec<std::string::String>,
33187
33188    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33189}
33190
33191impl ListTasksResponse {
33192    pub fn new() -> Self {
33193        std::default::Default::default()
33194    }
33195
33196    /// Sets the value of [tasks][crate::model::ListTasksResponse::tasks].
33197    pub fn set_tasks<T, V>(mut self, v: T) -> Self
33198    where
33199        T: std::iter::IntoIterator<Item = V>,
33200        V: std::convert::Into<crate::model::Task>,
33201    {
33202        use std::iter::Iterator;
33203        self.tasks = v.into_iter().map(|i| i.into()).collect();
33204        self
33205    }
33206
33207    /// Sets the value of [next_page_token][crate::model::ListTasksResponse::next_page_token].
33208    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33209        self.next_page_token = v.into();
33210        self
33211    }
33212
33213    /// Sets the value of [unreachable_locations][crate::model::ListTasksResponse::unreachable_locations].
33214    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
33215    where
33216        T: std::iter::IntoIterator<Item = V>,
33217        V: std::convert::Into<std::string::String>,
33218    {
33219        use std::iter::Iterator;
33220        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
33221        self
33222    }
33223}
33224
33225impl wkt::message::Message for ListTasksResponse {
33226    fn typename() -> &'static str {
33227        "type.googleapis.com/google.cloud.dataplex.v1.ListTasksResponse"
33228    }
33229}
33230
33231#[doc(hidden)]
33232impl gax::paginator::internal::PageableResponse for ListTasksResponse {
33233    type PageItem = crate::model::Task;
33234
33235    fn items(self) -> std::vec::Vec<Self::PageItem> {
33236        self.tasks
33237    }
33238
33239    fn next_page_token(&self) -> std::string::String {
33240        use std::clone::Clone;
33241        self.next_page_token.clone()
33242    }
33243}
33244
33245/// Get task request.
33246#[derive(Clone, Default, PartialEq)]
33247#[non_exhaustive]
33248pub struct GetTaskRequest {
33249    /// Required. The resource name of the task:
33250    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.
33251    pub name: std::string::String,
33252
33253    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33254}
33255
33256impl GetTaskRequest {
33257    pub fn new() -> Self {
33258        std::default::Default::default()
33259    }
33260
33261    /// Sets the value of [name][crate::model::GetTaskRequest::name].
33262    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33263        self.name = v.into();
33264        self
33265    }
33266}
33267
33268impl wkt::message::Message for GetTaskRequest {
33269    fn typename() -> &'static str {
33270        "type.googleapis.com/google.cloud.dataplex.v1.GetTaskRequest"
33271    }
33272}
33273
33274/// Get job request.
33275#[derive(Clone, Default, PartialEq)]
33276#[non_exhaustive]
33277pub struct GetJobRequest {
33278    /// Required. The resource name of the job:
33279    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
33280    pub name: std::string::String,
33281
33282    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33283}
33284
33285impl GetJobRequest {
33286    pub fn new() -> Self {
33287        std::default::Default::default()
33288    }
33289
33290    /// Sets the value of [name][crate::model::GetJobRequest::name].
33291    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33292        self.name = v.into();
33293        self
33294    }
33295}
33296
33297impl wkt::message::Message for GetJobRequest {
33298    fn typename() -> &'static str {
33299        "type.googleapis.com/google.cloud.dataplex.v1.GetJobRequest"
33300    }
33301}
33302
33303#[derive(Clone, Default, PartialEq)]
33304#[non_exhaustive]
33305pub struct RunTaskRequest {
33306    /// Required. The resource name of the task:
33307    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
33308    pub name: std::string::String,
33309
33310    /// Optional. User-defined labels for the task. If the map is left empty, the
33311    /// task will run with existing labels from task definition. If the map
33312    /// contains an entry with a new key, the same will be added to existing set of
33313    /// labels. If the map contains an entry with an existing label key in task
33314    /// definition, the task will run with new label value for that entry. Clearing
33315    /// an existing label will require label value to be explicitly set to a hyphen
33316    /// "-". The label value cannot be empty.
33317    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
33318
33319    /// Optional. Execution spec arguments. If the map is left empty, the task will
33320    /// run with existing execution spec args from task definition. If the map
33321    /// contains an entry with a new key, the same will be added to existing set of
33322    /// args. If the map contains an entry with an existing arg key in task
33323    /// definition, the task will run with new arg value for that entry. Clearing
33324    /// an existing arg will require arg value to be explicitly set to a hyphen
33325    /// "-". The arg value cannot be empty.
33326    pub args: std::collections::HashMap<std::string::String, std::string::String>,
33327
33328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33329}
33330
33331impl RunTaskRequest {
33332    pub fn new() -> Self {
33333        std::default::Default::default()
33334    }
33335
33336    /// Sets the value of [name][crate::model::RunTaskRequest::name].
33337    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33338        self.name = v.into();
33339        self
33340    }
33341
33342    /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
33343    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
33344    where
33345        T: std::iter::IntoIterator<Item = (K, V)>,
33346        K: std::convert::Into<std::string::String>,
33347        V: std::convert::Into<std::string::String>,
33348    {
33349        use std::iter::Iterator;
33350        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
33351        self
33352    }
33353
33354    /// Sets the value of [args][crate::model::RunTaskRequest::args].
33355    pub fn set_args<T, K, V>(mut self, v: T) -> Self
33356    where
33357        T: std::iter::IntoIterator<Item = (K, V)>,
33358        K: std::convert::Into<std::string::String>,
33359        V: std::convert::Into<std::string::String>,
33360    {
33361        use std::iter::Iterator;
33362        self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
33363        self
33364    }
33365}
33366
33367impl wkt::message::Message for RunTaskRequest {
33368    fn typename() -> &'static str {
33369        "type.googleapis.com/google.cloud.dataplex.v1.RunTaskRequest"
33370    }
33371}
33372
33373#[derive(Clone, Default, PartialEq)]
33374#[non_exhaustive]
33375pub struct RunTaskResponse {
33376    /// Jobs created by RunTask API.
33377    pub job: std::option::Option<crate::model::Job>,
33378
33379    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33380}
33381
33382impl RunTaskResponse {
33383    pub fn new() -> Self {
33384        std::default::Default::default()
33385    }
33386
33387    /// Sets the value of [job][crate::model::RunTaskResponse::job].
33388    pub fn set_job<T>(mut self, v: T) -> Self
33389    where
33390        T: std::convert::Into<crate::model::Job>,
33391    {
33392        self.job = std::option::Option::Some(v.into());
33393        self
33394    }
33395
33396    /// Sets or clears the value of [job][crate::model::RunTaskResponse::job].
33397    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
33398    where
33399        T: std::convert::Into<crate::model::Job>,
33400    {
33401        self.job = v.map(|x| x.into());
33402        self
33403    }
33404}
33405
33406impl wkt::message::Message for RunTaskResponse {
33407    fn typename() -> &'static str {
33408        "type.googleapis.com/google.cloud.dataplex.v1.RunTaskResponse"
33409    }
33410}
33411
33412/// List jobs request.
33413#[derive(Clone, Default, PartialEq)]
33414#[non_exhaustive]
33415pub struct ListJobsRequest {
33416    /// Required. The resource name of the parent environment:
33417    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
33418    pub parent: std::string::String,
33419
33420    /// Optional. Maximum number of jobs to return. The service may return fewer
33421    /// than this value. If unspecified, at most 10 jobs will be returned. The
33422    /// maximum value is 1000; values above 1000 will be coerced to 1000.
33423    pub page_size: i32,
33424
33425    /// Optional. Page token received from a previous `ListJobs` call. Provide this
33426    /// to retrieve the subsequent page. When paginating, all other parameters
33427    /// provided to `ListJobs` must match the call that provided the page
33428    /// token.
33429    pub page_token: std::string::String,
33430
33431    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33432}
33433
33434impl ListJobsRequest {
33435    pub fn new() -> Self {
33436        std::default::Default::default()
33437    }
33438
33439    /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
33440    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33441        self.parent = v.into();
33442        self
33443    }
33444
33445    /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
33446    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33447        self.page_size = v.into();
33448        self
33449    }
33450
33451    /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
33452    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33453        self.page_token = v.into();
33454        self
33455    }
33456}
33457
33458impl wkt::message::Message for ListJobsRequest {
33459    fn typename() -> &'static str {
33460        "type.googleapis.com/google.cloud.dataplex.v1.ListJobsRequest"
33461    }
33462}
33463
33464/// List jobs response.
33465#[derive(Clone, Default, PartialEq)]
33466#[non_exhaustive]
33467pub struct ListJobsResponse {
33468    /// Jobs under a given task.
33469    pub jobs: std::vec::Vec<crate::model::Job>,
33470
33471    /// Token to retrieve the next page of results, or empty if there are no more
33472    /// results in the list.
33473    pub next_page_token: std::string::String,
33474
33475    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33476}
33477
33478impl ListJobsResponse {
33479    pub fn new() -> Self {
33480        std::default::Default::default()
33481    }
33482
33483    /// Sets the value of [jobs][crate::model::ListJobsResponse::jobs].
33484    pub fn set_jobs<T, V>(mut self, v: T) -> Self
33485    where
33486        T: std::iter::IntoIterator<Item = V>,
33487        V: std::convert::Into<crate::model::Job>,
33488    {
33489        use std::iter::Iterator;
33490        self.jobs = v.into_iter().map(|i| i.into()).collect();
33491        self
33492    }
33493
33494    /// Sets the value of [next_page_token][crate::model::ListJobsResponse::next_page_token].
33495    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33496        self.next_page_token = v.into();
33497        self
33498    }
33499}
33500
33501impl wkt::message::Message for ListJobsResponse {
33502    fn typename() -> &'static str {
33503        "type.googleapis.com/google.cloud.dataplex.v1.ListJobsResponse"
33504    }
33505}
33506
33507#[doc(hidden)]
33508impl gax::paginator::internal::PageableResponse for ListJobsResponse {
33509    type PageItem = crate::model::Job;
33510
33511    fn items(self) -> std::vec::Vec<Self::PageItem> {
33512        self.jobs
33513    }
33514
33515    fn next_page_token(&self) -> std::string::String {
33516        use std::clone::Clone;
33517        self.next_page_token.clone()
33518    }
33519}
33520
33521/// Cancel task jobs.
33522#[derive(Clone, Default, PartialEq)]
33523#[non_exhaustive]
33524pub struct CancelJobRequest {
33525    /// Required. The resource name of the job:
33526    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.
33527    pub name: std::string::String,
33528
33529    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33530}
33531
33532impl CancelJobRequest {
33533    pub fn new() -> Self {
33534        std::default::Default::default()
33535    }
33536
33537    /// Sets the value of [name][crate::model::CancelJobRequest::name].
33538    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33539        self.name = v.into();
33540        self
33541    }
33542}
33543
33544impl wkt::message::Message for CancelJobRequest {
33545    fn typename() -> &'static str {
33546        "type.googleapis.com/google.cloud.dataplex.v1.CancelJobRequest"
33547    }
33548}
33549
33550/// Create environment request.
33551#[derive(Clone, Default, PartialEq)]
33552#[non_exhaustive]
33553pub struct CreateEnvironmentRequest {
33554    /// Required. The resource name of the parent lake:
33555    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
33556    pub parent: std::string::String,
33557
33558    /// Required. Environment identifier.
33559    ///
33560    /// * Must contain only lowercase letters, numbers and hyphens.
33561    /// * Must start with a letter.
33562    /// * Must be between 1-63 characters.
33563    /// * Must end with a number or a letter.
33564    /// * Must be unique within the lake.
33565    pub environment_id: std::string::String,
33566
33567    /// Required. Environment resource.
33568    pub environment: std::option::Option<crate::model::Environment>,
33569
33570    /// Optional. Only validate the request, but do not perform mutations.
33571    /// The default is false.
33572    pub validate_only: bool,
33573
33574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33575}
33576
33577impl CreateEnvironmentRequest {
33578    pub fn new() -> Self {
33579        std::default::Default::default()
33580    }
33581
33582    /// Sets the value of [parent][crate::model::CreateEnvironmentRequest::parent].
33583    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33584        self.parent = v.into();
33585        self
33586    }
33587
33588    /// Sets the value of [environment_id][crate::model::CreateEnvironmentRequest::environment_id].
33589    pub fn set_environment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33590        self.environment_id = v.into();
33591        self
33592    }
33593
33594    /// Sets the value of [environment][crate::model::CreateEnvironmentRequest::environment].
33595    pub fn set_environment<T>(mut self, v: T) -> Self
33596    where
33597        T: std::convert::Into<crate::model::Environment>,
33598    {
33599        self.environment = std::option::Option::Some(v.into());
33600        self
33601    }
33602
33603    /// Sets or clears the value of [environment][crate::model::CreateEnvironmentRequest::environment].
33604    pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
33605    where
33606        T: std::convert::Into<crate::model::Environment>,
33607    {
33608        self.environment = v.map(|x| x.into());
33609        self
33610    }
33611
33612    /// Sets the value of [validate_only][crate::model::CreateEnvironmentRequest::validate_only].
33613    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33614        self.validate_only = v.into();
33615        self
33616    }
33617}
33618
33619impl wkt::message::Message for CreateEnvironmentRequest {
33620    fn typename() -> &'static str {
33621        "type.googleapis.com/google.cloud.dataplex.v1.CreateEnvironmentRequest"
33622    }
33623}
33624
33625/// Update environment request.
33626#[derive(Clone, Default, PartialEq)]
33627#[non_exhaustive]
33628pub struct UpdateEnvironmentRequest {
33629    /// Required. Mask of fields to update.
33630    pub update_mask: std::option::Option<wkt::FieldMask>,
33631
33632    /// Required. Update description.
33633    /// Only fields specified in `update_mask` are updated.
33634    pub environment: std::option::Option<crate::model::Environment>,
33635
33636    /// Optional. Only validate the request, but do not perform mutations.
33637    /// The default is false.
33638    pub validate_only: bool,
33639
33640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33641}
33642
33643impl UpdateEnvironmentRequest {
33644    pub fn new() -> Self {
33645        std::default::Default::default()
33646    }
33647
33648    /// Sets the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
33649    pub fn set_update_mask<T>(mut self, v: T) -> Self
33650    where
33651        T: std::convert::Into<wkt::FieldMask>,
33652    {
33653        self.update_mask = std::option::Option::Some(v.into());
33654        self
33655    }
33656
33657    /// Sets or clears the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
33658    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
33659    where
33660        T: std::convert::Into<wkt::FieldMask>,
33661    {
33662        self.update_mask = v.map(|x| x.into());
33663        self
33664    }
33665
33666    /// Sets the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
33667    pub fn set_environment<T>(mut self, v: T) -> Self
33668    where
33669        T: std::convert::Into<crate::model::Environment>,
33670    {
33671        self.environment = std::option::Option::Some(v.into());
33672        self
33673    }
33674
33675    /// Sets or clears the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
33676    pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
33677    where
33678        T: std::convert::Into<crate::model::Environment>,
33679    {
33680        self.environment = v.map(|x| x.into());
33681        self
33682    }
33683
33684    /// Sets the value of [validate_only][crate::model::UpdateEnvironmentRequest::validate_only].
33685    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33686        self.validate_only = v.into();
33687        self
33688    }
33689}
33690
33691impl wkt::message::Message for UpdateEnvironmentRequest {
33692    fn typename() -> &'static str {
33693        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEnvironmentRequest"
33694    }
33695}
33696
33697/// Delete environment request.
33698#[derive(Clone, Default, PartialEq)]
33699#[non_exhaustive]
33700pub struct DeleteEnvironmentRequest {
33701    /// Required. The resource name of the environment:
33702    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
33703    pub name: std::string::String,
33704
33705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33706}
33707
33708impl DeleteEnvironmentRequest {
33709    pub fn new() -> Self {
33710        std::default::Default::default()
33711    }
33712
33713    /// Sets the value of [name][crate::model::DeleteEnvironmentRequest::name].
33714    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33715        self.name = v.into();
33716        self
33717    }
33718}
33719
33720impl wkt::message::Message for DeleteEnvironmentRequest {
33721    fn typename() -> &'static str {
33722        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEnvironmentRequest"
33723    }
33724}
33725
33726/// List environments request.
33727#[derive(Clone, Default, PartialEq)]
33728#[non_exhaustive]
33729pub struct ListEnvironmentsRequest {
33730    /// Required. The resource name of the parent lake:
33731    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
33732    pub parent: std::string::String,
33733
33734    /// Optional. Maximum number of environments to return. The service may return
33735    /// fewer than this value. If unspecified, at most 10 environments will be
33736    /// returned. The maximum value is 1000; values above 1000 will be coerced to
33737    /// 1000.
33738    pub page_size: i32,
33739
33740    /// Optional. Page token received from a previous `ListEnvironments` call.
33741    /// Provide this to retrieve the subsequent page. When paginating, all other
33742    /// parameters provided to `ListEnvironments` must match the call that provided
33743    /// the page token.
33744    pub page_token: std::string::String,
33745
33746    /// Optional. Filter request.
33747    pub filter: std::string::String,
33748
33749    /// Optional. Order by fields for the result.
33750    pub order_by: std::string::String,
33751
33752    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33753}
33754
33755impl ListEnvironmentsRequest {
33756    pub fn new() -> Self {
33757        std::default::Default::default()
33758    }
33759
33760    /// Sets the value of [parent][crate::model::ListEnvironmentsRequest::parent].
33761    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33762        self.parent = v.into();
33763        self
33764    }
33765
33766    /// Sets the value of [page_size][crate::model::ListEnvironmentsRequest::page_size].
33767    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33768        self.page_size = v.into();
33769        self
33770    }
33771
33772    /// Sets the value of [page_token][crate::model::ListEnvironmentsRequest::page_token].
33773    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33774        self.page_token = v.into();
33775        self
33776    }
33777
33778    /// Sets the value of [filter][crate::model::ListEnvironmentsRequest::filter].
33779    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33780        self.filter = v.into();
33781        self
33782    }
33783
33784    /// Sets the value of [order_by][crate::model::ListEnvironmentsRequest::order_by].
33785    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33786        self.order_by = v.into();
33787        self
33788    }
33789}
33790
33791impl wkt::message::Message for ListEnvironmentsRequest {
33792    fn typename() -> &'static str {
33793        "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsRequest"
33794    }
33795}
33796
33797/// List environments response.
33798#[derive(Clone, Default, PartialEq)]
33799#[non_exhaustive]
33800pub struct ListEnvironmentsResponse {
33801    /// Environments under the given parent lake.
33802    pub environments: std::vec::Vec<crate::model::Environment>,
33803
33804    /// Token to retrieve the next page of results, or empty if there are no more
33805    /// results in the list.
33806    pub next_page_token: std::string::String,
33807
33808    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33809}
33810
33811impl ListEnvironmentsResponse {
33812    pub fn new() -> Self {
33813        std::default::Default::default()
33814    }
33815
33816    /// Sets the value of [environments][crate::model::ListEnvironmentsResponse::environments].
33817    pub fn set_environments<T, V>(mut self, v: T) -> Self
33818    where
33819        T: std::iter::IntoIterator<Item = V>,
33820        V: std::convert::Into<crate::model::Environment>,
33821    {
33822        use std::iter::Iterator;
33823        self.environments = v.into_iter().map(|i| i.into()).collect();
33824        self
33825    }
33826
33827    /// Sets the value of [next_page_token][crate::model::ListEnvironmentsResponse::next_page_token].
33828    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33829        self.next_page_token = v.into();
33830        self
33831    }
33832}
33833
33834impl wkt::message::Message for ListEnvironmentsResponse {
33835    fn typename() -> &'static str {
33836        "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsResponse"
33837    }
33838}
33839
33840#[doc(hidden)]
33841impl gax::paginator::internal::PageableResponse for ListEnvironmentsResponse {
33842    type PageItem = crate::model::Environment;
33843
33844    fn items(self) -> std::vec::Vec<Self::PageItem> {
33845        self.environments
33846    }
33847
33848    fn next_page_token(&self) -> std::string::String {
33849        use std::clone::Clone;
33850        self.next_page_token.clone()
33851    }
33852}
33853
33854/// Get environment request.
33855#[derive(Clone, Default, PartialEq)]
33856#[non_exhaustive]
33857pub struct GetEnvironmentRequest {
33858    /// Required. The resource name of the environment:
33859    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
33860    pub name: std::string::String,
33861
33862    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33863}
33864
33865impl GetEnvironmentRequest {
33866    pub fn new() -> Self {
33867        std::default::Default::default()
33868    }
33869
33870    /// Sets the value of [name][crate::model::GetEnvironmentRequest::name].
33871    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33872        self.name = v.into();
33873        self
33874    }
33875}
33876
33877impl wkt::message::Message for GetEnvironmentRequest {
33878    fn typename() -> &'static str {
33879        "type.googleapis.com/google.cloud.dataplex.v1.GetEnvironmentRequest"
33880    }
33881}
33882
33883/// List sessions request.
33884#[derive(Clone, Default, PartialEq)]
33885#[non_exhaustive]
33886pub struct ListSessionsRequest {
33887    /// Required. The resource name of the parent environment:
33888    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.
33889    pub parent: std::string::String,
33890
33891    /// Optional. Maximum number of sessions to return. The service may return
33892    /// fewer than this value. If unspecified, at most 10 sessions will be
33893    /// returned. The maximum value is 1000; values above 1000 will be coerced to
33894    /// 1000.
33895    pub page_size: i32,
33896
33897    /// Optional. Page token received from a previous `ListSessions` call. Provide
33898    /// this to retrieve the subsequent page. When paginating, all other parameters
33899    /// provided to `ListSessions` must match the call that provided the page
33900    /// token.
33901    pub page_token: std::string::String,
33902
33903    /// Optional. Filter request. The following `mode` filter is supported to
33904    /// return only the sessions belonging to the requester when the mode is USER
33905    /// and return sessions of all the users when the mode is ADMIN. When no filter
33906    /// is sent default to USER mode. NOTE: When the mode is ADMIN, the requester
33907    /// should have `dataplex.environments.listAllSessions` permission to list all
33908    /// sessions, in absence of the permission, the request fails.
33909    ///
33910    /// mode = ADMIN | USER
33911    pub filter: std::string::String,
33912
33913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33914}
33915
33916impl ListSessionsRequest {
33917    pub fn new() -> Self {
33918        std::default::Default::default()
33919    }
33920
33921    /// Sets the value of [parent][crate::model::ListSessionsRequest::parent].
33922    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33923        self.parent = v.into();
33924        self
33925    }
33926
33927    /// Sets the value of [page_size][crate::model::ListSessionsRequest::page_size].
33928    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33929        self.page_size = v.into();
33930        self
33931    }
33932
33933    /// Sets the value of [page_token][crate::model::ListSessionsRequest::page_token].
33934    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33935        self.page_token = v.into();
33936        self
33937    }
33938
33939    /// Sets the value of [filter][crate::model::ListSessionsRequest::filter].
33940    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33941        self.filter = v.into();
33942        self
33943    }
33944}
33945
33946impl wkt::message::Message for ListSessionsRequest {
33947    fn typename() -> &'static str {
33948        "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsRequest"
33949    }
33950}
33951
33952/// List sessions response.
33953#[derive(Clone, Default, PartialEq)]
33954#[non_exhaustive]
33955pub struct ListSessionsResponse {
33956    /// Sessions under a given environment.
33957    pub sessions: std::vec::Vec<crate::model::Session>,
33958
33959    /// Token to retrieve the next page of results, or empty if there are no more
33960    /// results in the list.
33961    pub next_page_token: std::string::String,
33962
33963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33964}
33965
33966impl ListSessionsResponse {
33967    pub fn new() -> Self {
33968        std::default::Default::default()
33969    }
33970
33971    /// Sets the value of [sessions][crate::model::ListSessionsResponse::sessions].
33972    pub fn set_sessions<T, V>(mut self, v: T) -> Self
33973    where
33974        T: std::iter::IntoIterator<Item = V>,
33975        V: std::convert::Into<crate::model::Session>,
33976    {
33977        use std::iter::Iterator;
33978        self.sessions = v.into_iter().map(|i| i.into()).collect();
33979        self
33980    }
33981
33982    /// Sets the value of [next_page_token][crate::model::ListSessionsResponse::next_page_token].
33983    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33984        self.next_page_token = v.into();
33985        self
33986    }
33987}
33988
33989impl wkt::message::Message for ListSessionsResponse {
33990    fn typename() -> &'static str {
33991        "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsResponse"
33992    }
33993}
33994
33995#[doc(hidden)]
33996impl gax::paginator::internal::PageableResponse for ListSessionsResponse {
33997    type PageItem = crate::model::Session;
33998
33999    fn items(self) -> std::vec::Vec<Self::PageItem> {
34000        self.sessions
34001    }
34002
34003    fn next_page_token(&self) -> std::string::String {
34004        use std::clone::Clone;
34005        self.next_page_token.clone()
34006    }
34007}
34008
34009/// A task represents a user-visible job.
34010#[derive(Clone, Default, PartialEq)]
34011#[non_exhaustive]
34012pub struct Task {
34013    /// Output only. The relative resource name of the task, of the form:
34014    /// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/
34015    /// tasks/{task_id}.
34016    pub name: std::string::String,
34017
34018    /// Output only. System generated globally unique ID for the task. This ID will
34019    /// be different if the task is deleted and re-created with the same name.
34020    pub uid: std::string::String,
34021
34022    /// Output only. The time when the task was created.
34023    pub create_time: std::option::Option<wkt::Timestamp>,
34024
34025    /// Output only. The time when the task was last updated.
34026    pub update_time: std::option::Option<wkt::Timestamp>,
34027
34028    /// Optional. Description of the task.
34029    pub description: std::string::String,
34030
34031    /// Optional. User friendly display name.
34032    pub display_name: std::string::String,
34033
34034    /// Output only. Current state of the task.
34035    pub state: crate::model::State,
34036
34037    /// Optional. User-defined labels for the task.
34038    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
34039
34040    /// Required. Spec related to how often and when a task should be triggered.
34041    pub trigger_spec: std::option::Option<crate::model::task::TriggerSpec>,
34042
34043    /// Required. Spec related to how a task is executed.
34044    pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
34045
34046    /// Output only. Status of the latest task executions.
34047    pub execution_status: std::option::Option<crate::model::task::ExecutionStatus>,
34048
34049    /// Task template specific user-specified config.
34050    pub config: std::option::Option<crate::model::task::Config>,
34051
34052    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34053}
34054
34055impl Task {
34056    pub fn new() -> Self {
34057        std::default::Default::default()
34058    }
34059
34060    /// Sets the value of [name][crate::model::Task::name].
34061    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34062        self.name = v.into();
34063        self
34064    }
34065
34066    /// Sets the value of [uid][crate::model::Task::uid].
34067    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34068        self.uid = v.into();
34069        self
34070    }
34071
34072    /// Sets the value of [create_time][crate::model::Task::create_time].
34073    pub fn set_create_time<T>(mut self, v: T) -> Self
34074    where
34075        T: std::convert::Into<wkt::Timestamp>,
34076    {
34077        self.create_time = std::option::Option::Some(v.into());
34078        self
34079    }
34080
34081    /// Sets or clears the value of [create_time][crate::model::Task::create_time].
34082    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
34083    where
34084        T: std::convert::Into<wkt::Timestamp>,
34085    {
34086        self.create_time = v.map(|x| x.into());
34087        self
34088    }
34089
34090    /// Sets the value of [update_time][crate::model::Task::update_time].
34091    pub fn set_update_time<T>(mut self, v: T) -> Self
34092    where
34093        T: std::convert::Into<wkt::Timestamp>,
34094    {
34095        self.update_time = std::option::Option::Some(v.into());
34096        self
34097    }
34098
34099    /// Sets or clears the value of [update_time][crate::model::Task::update_time].
34100    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
34101    where
34102        T: std::convert::Into<wkt::Timestamp>,
34103    {
34104        self.update_time = v.map(|x| x.into());
34105        self
34106    }
34107
34108    /// Sets the value of [description][crate::model::Task::description].
34109    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34110        self.description = v.into();
34111        self
34112    }
34113
34114    /// Sets the value of [display_name][crate::model::Task::display_name].
34115    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34116        self.display_name = v.into();
34117        self
34118    }
34119
34120    /// Sets the value of [state][crate::model::Task::state].
34121    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
34122        self.state = v.into();
34123        self
34124    }
34125
34126    /// Sets the value of [labels][crate::model::Task::labels].
34127    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
34128    where
34129        T: std::iter::IntoIterator<Item = (K, V)>,
34130        K: std::convert::Into<std::string::String>,
34131        V: std::convert::Into<std::string::String>,
34132    {
34133        use std::iter::Iterator;
34134        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
34135        self
34136    }
34137
34138    /// Sets the value of [trigger_spec][crate::model::Task::trigger_spec].
34139    pub fn set_trigger_spec<T>(mut self, v: T) -> Self
34140    where
34141        T: std::convert::Into<crate::model::task::TriggerSpec>,
34142    {
34143        self.trigger_spec = std::option::Option::Some(v.into());
34144        self
34145    }
34146
34147    /// Sets or clears the value of [trigger_spec][crate::model::Task::trigger_spec].
34148    pub fn set_or_clear_trigger_spec<T>(mut self, v: std::option::Option<T>) -> Self
34149    where
34150        T: std::convert::Into<crate::model::task::TriggerSpec>,
34151    {
34152        self.trigger_spec = v.map(|x| x.into());
34153        self
34154    }
34155
34156    /// Sets the value of [execution_spec][crate::model::Task::execution_spec].
34157    pub fn set_execution_spec<T>(mut self, v: T) -> Self
34158    where
34159        T: std::convert::Into<crate::model::task::ExecutionSpec>,
34160    {
34161        self.execution_spec = std::option::Option::Some(v.into());
34162        self
34163    }
34164
34165    /// Sets or clears the value of [execution_spec][crate::model::Task::execution_spec].
34166    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
34167    where
34168        T: std::convert::Into<crate::model::task::ExecutionSpec>,
34169    {
34170        self.execution_spec = v.map(|x| x.into());
34171        self
34172    }
34173
34174    /// Sets the value of [execution_status][crate::model::Task::execution_status].
34175    pub fn set_execution_status<T>(mut self, v: T) -> Self
34176    where
34177        T: std::convert::Into<crate::model::task::ExecutionStatus>,
34178    {
34179        self.execution_status = std::option::Option::Some(v.into());
34180        self
34181    }
34182
34183    /// Sets or clears the value of [execution_status][crate::model::Task::execution_status].
34184    pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
34185    where
34186        T: std::convert::Into<crate::model::task::ExecutionStatus>,
34187    {
34188        self.execution_status = v.map(|x| x.into());
34189        self
34190    }
34191
34192    /// Sets the value of [config][crate::model::Task::config].
34193    ///
34194    /// Note that all the setters affecting `config` are mutually
34195    /// exclusive.
34196    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::task::Config>>>(
34197        mut self,
34198        v: T,
34199    ) -> Self {
34200        self.config = v.into();
34201        self
34202    }
34203
34204    /// The value of [config][crate::model::Task::config]
34205    /// if it holds a `Spark`, `None` if the field is not set or
34206    /// holds a different branch.
34207    pub fn spark(
34208        &self,
34209    ) -> std::option::Option<&std::boxed::Box<crate::model::task::SparkTaskConfig>> {
34210        #[allow(unreachable_patterns)]
34211        self.config.as_ref().and_then(|v| match v {
34212            crate::model::task::Config::Spark(v) => std::option::Option::Some(v),
34213            _ => std::option::Option::None,
34214        })
34215    }
34216
34217    /// Sets the value of [config][crate::model::Task::config]
34218    /// to hold a `Spark`.
34219    ///
34220    /// Note that all the setters affecting `config` are
34221    /// mutually exclusive.
34222    pub fn set_spark<
34223        T: std::convert::Into<std::boxed::Box<crate::model::task::SparkTaskConfig>>,
34224    >(
34225        mut self,
34226        v: T,
34227    ) -> Self {
34228        self.config = std::option::Option::Some(crate::model::task::Config::Spark(v.into()));
34229        self
34230    }
34231
34232    /// The value of [config][crate::model::Task::config]
34233    /// if it holds a `Notebook`, `None` if the field is not set or
34234    /// holds a different branch.
34235    pub fn notebook(
34236        &self,
34237    ) -> std::option::Option<&std::boxed::Box<crate::model::task::NotebookTaskConfig>> {
34238        #[allow(unreachable_patterns)]
34239        self.config.as_ref().and_then(|v| match v {
34240            crate::model::task::Config::Notebook(v) => std::option::Option::Some(v),
34241            _ => std::option::Option::None,
34242        })
34243    }
34244
34245    /// Sets the value of [config][crate::model::Task::config]
34246    /// to hold a `Notebook`.
34247    ///
34248    /// Note that all the setters affecting `config` are
34249    /// mutually exclusive.
34250    pub fn set_notebook<
34251        T: std::convert::Into<std::boxed::Box<crate::model::task::NotebookTaskConfig>>,
34252    >(
34253        mut self,
34254        v: T,
34255    ) -> Self {
34256        self.config = std::option::Option::Some(crate::model::task::Config::Notebook(v.into()));
34257        self
34258    }
34259}
34260
34261impl wkt::message::Message for Task {
34262    fn typename() -> &'static str {
34263        "type.googleapis.com/google.cloud.dataplex.v1.Task"
34264    }
34265}
34266
34267/// Defines additional types related to [Task].
34268pub mod task {
34269    #[allow(unused_imports)]
34270    use super::*;
34271
34272    /// Configuration for the underlying infrastructure used to run workloads.
34273    #[derive(Clone, Default, PartialEq)]
34274    #[non_exhaustive]
34275    pub struct InfrastructureSpec {
34276        /// Hardware config.
34277        pub resources: std::option::Option<crate::model::task::infrastructure_spec::Resources>,
34278
34279        /// Software config.
34280        pub runtime: std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
34281
34282        /// Networking config.
34283        pub network: std::option::Option<crate::model::task::infrastructure_spec::Network>,
34284
34285        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34286    }
34287
34288    impl InfrastructureSpec {
34289        pub fn new() -> Self {
34290            std::default::Default::default()
34291        }
34292
34293        /// Sets the value of [resources][crate::model::task::InfrastructureSpec::resources].
34294        ///
34295        /// Note that all the setters affecting `resources` are mutually
34296        /// exclusive.
34297        pub fn set_resources<
34298            T: std::convert::Into<
34299                    std::option::Option<crate::model::task::infrastructure_spec::Resources>,
34300                >,
34301        >(
34302            mut self,
34303            v: T,
34304        ) -> Self {
34305            self.resources = v.into();
34306            self
34307        }
34308
34309        /// The value of [resources][crate::model::task::InfrastructureSpec::resources]
34310        /// if it holds a `Batch`, `None` if the field is not set or
34311        /// holds a different branch.
34312        pub fn batch(
34313            &self,
34314        ) -> std::option::Option<
34315            &std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
34316        > {
34317            #[allow(unreachable_patterns)]
34318            self.resources.as_ref().and_then(|v| match v {
34319                crate::model::task::infrastructure_spec::Resources::Batch(v) => {
34320                    std::option::Option::Some(v)
34321                }
34322                _ => std::option::Option::None,
34323            })
34324        }
34325
34326        /// Sets the value of [resources][crate::model::task::InfrastructureSpec::resources]
34327        /// to hold a `Batch`.
34328        ///
34329        /// Note that all the setters affecting `resources` are
34330        /// mutually exclusive.
34331        pub fn set_batch<
34332            T: std::convert::Into<
34333                    std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
34334                >,
34335        >(
34336            mut self,
34337            v: T,
34338        ) -> Self {
34339            self.resources = std::option::Option::Some(
34340                crate::model::task::infrastructure_spec::Resources::Batch(v.into()),
34341            );
34342            self
34343        }
34344
34345        /// Sets the value of [runtime][crate::model::task::InfrastructureSpec::runtime].
34346        ///
34347        /// Note that all the setters affecting `runtime` are mutually
34348        /// exclusive.
34349        pub fn set_runtime<
34350            T: std::convert::Into<
34351                    std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
34352                >,
34353        >(
34354            mut self,
34355            v: T,
34356        ) -> Self {
34357            self.runtime = v.into();
34358            self
34359        }
34360
34361        /// The value of [runtime][crate::model::task::InfrastructureSpec::runtime]
34362        /// if it holds a `ContainerImage`, `None` if the field is not set or
34363        /// holds a different branch.
34364        pub fn container_image(
34365            &self,
34366        ) -> std::option::Option<
34367            &std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
34368        > {
34369            #[allow(unreachable_patterns)]
34370            self.runtime.as_ref().and_then(|v| match v {
34371                crate::model::task::infrastructure_spec::Runtime::ContainerImage(v) => {
34372                    std::option::Option::Some(v)
34373                }
34374                _ => std::option::Option::None,
34375            })
34376        }
34377
34378        /// Sets the value of [runtime][crate::model::task::InfrastructureSpec::runtime]
34379        /// to hold a `ContainerImage`.
34380        ///
34381        /// Note that all the setters affecting `runtime` are
34382        /// mutually exclusive.
34383        pub fn set_container_image<
34384            T: std::convert::Into<
34385                    std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
34386                >,
34387        >(
34388            mut self,
34389            v: T,
34390        ) -> Self {
34391            self.runtime = std::option::Option::Some(
34392                crate::model::task::infrastructure_spec::Runtime::ContainerImage(v.into()),
34393            );
34394            self
34395        }
34396
34397        /// Sets the value of [network][crate::model::task::InfrastructureSpec::network].
34398        ///
34399        /// Note that all the setters affecting `network` are mutually
34400        /// exclusive.
34401        pub fn set_network<
34402            T: std::convert::Into<
34403                    std::option::Option<crate::model::task::infrastructure_spec::Network>,
34404                >,
34405        >(
34406            mut self,
34407            v: T,
34408        ) -> Self {
34409            self.network = v.into();
34410            self
34411        }
34412
34413        /// The value of [network][crate::model::task::InfrastructureSpec::network]
34414        /// if it holds a `VpcNetwork`, `None` if the field is not set or
34415        /// holds a different branch.
34416        pub fn vpc_network(
34417            &self,
34418        ) -> std::option::Option<
34419            &std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
34420        > {
34421            #[allow(unreachable_patterns)]
34422            self.network.as_ref().and_then(|v| match v {
34423                crate::model::task::infrastructure_spec::Network::VpcNetwork(v) => {
34424                    std::option::Option::Some(v)
34425                }
34426                _ => std::option::Option::None,
34427            })
34428        }
34429
34430        /// Sets the value of [network][crate::model::task::InfrastructureSpec::network]
34431        /// to hold a `VpcNetwork`.
34432        ///
34433        /// Note that all the setters affecting `network` are
34434        /// mutually exclusive.
34435        pub fn set_vpc_network<
34436            T: std::convert::Into<
34437                    std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
34438                >,
34439        >(
34440            mut self,
34441            v: T,
34442        ) -> Self {
34443            self.network = std::option::Option::Some(
34444                crate::model::task::infrastructure_spec::Network::VpcNetwork(v.into()),
34445            );
34446            self
34447        }
34448    }
34449
34450    impl wkt::message::Message for InfrastructureSpec {
34451        fn typename() -> &'static str {
34452            "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec"
34453        }
34454    }
34455
34456    /// Defines additional types related to [InfrastructureSpec].
34457    pub mod infrastructure_spec {
34458        #[allow(unused_imports)]
34459        use super::*;
34460
34461        /// Batch compute resources associated with the task.
34462        #[derive(Clone, Default, PartialEq)]
34463        #[non_exhaustive]
34464        pub struct BatchComputeResources {
34465            /// Optional. Total number of job executors.
34466            /// Executor Count should be between 2 and 100. [Default=2]
34467            pub executors_count: i32,
34468
34469            /// Optional. Max configurable executors.
34470            /// If max_executors_count > executors_count, then auto-scaling is enabled.
34471            /// Max Executor Count should be between 2 and 1000. [Default=1000]
34472            pub max_executors_count: i32,
34473
34474            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34475        }
34476
34477        impl BatchComputeResources {
34478            pub fn new() -> Self {
34479                std::default::Default::default()
34480            }
34481
34482            /// Sets the value of [executors_count][crate::model::task::infrastructure_spec::BatchComputeResources::executors_count].
34483            pub fn set_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34484                self.executors_count = v.into();
34485                self
34486            }
34487
34488            /// Sets the value of [max_executors_count][crate::model::task::infrastructure_spec::BatchComputeResources::max_executors_count].
34489            pub fn set_max_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34490                self.max_executors_count = v.into();
34491                self
34492            }
34493        }
34494
34495        impl wkt::message::Message for BatchComputeResources {
34496            fn typename() -> &'static str {
34497                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"
34498            }
34499        }
34500
34501        /// Container Image Runtime Configuration used with Batch execution.
34502        #[derive(Clone, Default, PartialEq)]
34503        #[non_exhaustive]
34504        pub struct ContainerImageRuntime {
34505            /// Optional. Container image to use.
34506            pub image: std::string::String,
34507
34508            /// Optional. A list of Java JARS to add to the classpath.
34509            /// Valid input includes Cloud Storage URIs to Jar binaries.
34510            /// For example, gs://bucket-name/my/path/to/file.jar
34511            pub java_jars: std::vec::Vec<std::string::String>,
34512
34513            /// Optional. A list of python packages to be installed.
34514            /// Valid formats include Cloud Storage URI to a PIP installable library.
34515            /// For example, gs://bucket-name/my/path/to/lib.tar.gz
34516            pub python_packages: std::vec::Vec<std::string::String>,
34517
34518            /// Optional. Override to common configuration of open source components
34519            /// installed on the Dataproc cluster. The properties to set on daemon
34520            /// config files. Property keys are specified in `prefix:property` format,
34521            /// for example `core:hadoop.tmp.dir`. For more information, see [Cluster
34522            /// properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
34523            pub properties: std::collections::HashMap<std::string::String, std::string::String>,
34524
34525            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34526        }
34527
34528        impl ContainerImageRuntime {
34529            pub fn new() -> Self {
34530                std::default::Default::default()
34531            }
34532
34533            /// Sets the value of [image][crate::model::task::infrastructure_spec::ContainerImageRuntime::image].
34534            pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34535                self.image = v.into();
34536                self
34537            }
34538
34539            /// Sets the value of [java_jars][crate::model::task::infrastructure_spec::ContainerImageRuntime::java_jars].
34540            pub fn set_java_jars<T, V>(mut self, v: T) -> Self
34541            where
34542                T: std::iter::IntoIterator<Item = V>,
34543                V: std::convert::Into<std::string::String>,
34544            {
34545                use std::iter::Iterator;
34546                self.java_jars = v.into_iter().map(|i| i.into()).collect();
34547                self
34548            }
34549
34550            /// Sets the value of [python_packages][crate::model::task::infrastructure_spec::ContainerImageRuntime::python_packages].
34551            pub fn set_python_packages<T, V>(mut self, v: T) -> Self
34552            where
34553                T: std::iter::IntoIterator<Item = V>,
34554                V: std::convert::Into<std::string::String>,
34555            {
34556                use std::iter::Iterator;
34557                self.python_packages = v.into_iter().map(|i| i.into()).collect();
34558                self
34559            }
34560
34561            /// Sets the value of [properties][crate::model::task::infrastructure_spec::ContainerImageRuntime::properties].
34562            pub fn set_properties<T, K, V>(mut self, v: T) -> Self
34563            where
34564                T: std::iter::IntoIterator<Item = (K, V)>,
34565                K: std::convert::Into<std::string::String>,
34566                V: std::convert::Into<std::string::String>,
34567            {
34568                use std::iter::Iterator;
34569                self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
34570                self
34571            }
34572        }
34573
34574        impl wkt::message::Message for ContainerImageRuntime {
34575            fn typename() -> &'static str {
34576                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"
34577            }
34578        }
34579
34580        /// Cloud VPC Network used to run the infrastructure.
34581        #[derive(Clone, Default, PartialEq)]
34582        #[non_exhaustive]
34583        pub struct VpcNetwork {
34584            /// Optional. List of network tags to apply to the job.
34585            pub network_tags: std::vec::Vec<std::string::String>,
34586
34587            /// The Cloud VPC network identifier.
34588            pub network_name: std::option::Option<
34589                crate::model::task::infrastructure_spec::vpc_network::NetworkName,
34590            >,
34591
34592            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34593        }
34594
34595        impl VpcNetwork {
34596            pub fn new() -> Self {
34597                std::default::Default::default()
34598            }
34599
34600            /// Sets the value of [network_tags][crate::model::task::infrastructure_spec::VpcNetwork::network_tags].
34601            pub fn set_network_tags<T, V>(mut self, v: T) -> Self
34602            where
34603                T: std::iter::IntoIterator<Item = V>,
34604                V: std::convert::Into<std::string::String>,
34605            {
34606                use std::iter::Iterator;
34607                self.network_tags = v.into_iter().map(|i| i.into()).collect();
34608                self
34609            }
34610
34611            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name].
34612            ///
34613            /// Note that all the setters affecting `network_name` are mutually
34614            /// exclusive.
34615            pub fn set_network_name<
34616                T: std::convert::Into<
34617                        std::option::Option<
34618                            crate::model::task::infrastructure_spec::vpc_network::NetworkName,
34619                        >,
34620                    >,
34621            >(
34622                mut self,
34623                v: T,
34624            ) -> Self {
34625                self.network_name = v.into();
34626                self
34627            }
34628
34629            /// The value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
34630            /// if it holds a `Network`, `None` if the field is not set or
34631            /// holds a different branch.
34632            pub fn network(&self) -> std::option::Option<&std::string::String> {
34633                #[allow(unreachable_patterns)]
34634                self.network_name.as_ref().and_then(|v| match v {
34635                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
34636                        v,
34637                    ) => std::option::Option::Some(v),
34638                    _ => std::option::Option::None,
34639                })
34640            }
34641
34642            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
34643            /// to hold a `Network`.
34644            ///
34645            /// Note that all the setters affecting `network_name` are
34646            /// mutually exclusive.
34647            pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34648                self.network_name = std::option::Option::Some(
34649                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
34650                        v.into(),
34651                    ),
34652                );
34653                self
34654            }
34655
34656            /// The value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
34657            /// if it holds a `SubNetwork`, `None` if the field is not set or
34658            /// holds a different branch.
34659            pub fn sub_network(&self) -> std::option::Option<&std::string::String> {
34660                #[allow(unreachable_patterns)]
34661                self.network_name.as_ref().and_then(|v| match v {
34662                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(v) => std::option::Option::Some(v),
34663                    _ => std::option::Option::None,
34664                })
34665            }
34666
34667            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
34668            /// to hold a `SubNetwork`.
34669            ///
34670            /// Note that all the setters affecting `network_name` are
34671            /// mutually exclusive.
34672            pub fn set_sub_network<T: std::convert::Into<std::string::String>>(
34673                mut self,
34674                v: T,
34675            ) -> Self {
34676                self.network_name = std::option::Option::Some(
34677                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(
34678                        v.into(),
34679                    ),
34680                );
34681                self
34682            }
34683        }
34684
34685        impl wkt::message::Message for VpcNetwork {
34686            fn typename() -> &'static str {
34687                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"
34688            }
34689        }
34690
34691        /// Defines additional types related to [VpcNetwork].
34692        pub mod vpc_network {
34693            #[allow(unused_imports)]
34694            use super::*;
34695
34696            /// The Cloud VPC network identifier.
34697            #[derive(Clone, Debug, PartialEq)]
34698            #[non_exhaustive]
34699            pub enum NetworkName {
34700                /// Optional. The Cloud VPC network in which the job is run. By default,
34701                /// the Cloud VPC network named Default within the project is used.
34702                Network(std::string::String),
34703                /// Optional. The Cloud VPC sub-network in which the job is run.
34704                SubNetwork(std::string::String),
34705            }
34706        }
34707
34708        /// Hardware config.
34709        #[derive(Clone, Debug, PartialEq)]
34710        #[non_exhaustive]
34711        pub enum Resources {
34712            /// Compute resources needed for a Task when using Dataproc Serverless.
34713            Batch(std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>),
34714        }
34715
34716        /// Software config.
34717        #[derive(Clone, Debug, PartialEq)]
34718        #[non_exhaustive]
34719        pub enum Runtime {
34720            /// Container Image Runtime Configuration.
34721            ContainerImage(
34722                std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
34723            ),
34724        }
34725
34726        /// Networking config.
34727        #[derive(Clone, Debug, PartialEq)]
34728        #[non_exhaustive]
34729        pub enum Network {
34730            /// Vpc network.
34731            VpcNetwork(std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>),
34732        }
34733    }
34734
34735    /// Task scheduling and trigger settings.
34736    #[derive(Clone, Default, PartialEq)]
34737    #[non_exhaustive]
34738    pub struct TriggerSpec {
34739        /// Required. Immutable. Trigger type of the user-specified Task.
34740        pub r#type: crate::model::task::trigger_spec::Type,
34741
34742        /// Optional. The first run of the task will be after this time.
34743        /// If not specified, the task will run shortly after being submitted if
34744        /// ON_DEMAND and based on the schedule if RECURRING.
34745        pub start_time: std::option::Option<wkt::Timestamp>,
34746
34747        /// Optional. Prevent the task from executing.
34748        /// This does not cancel already running tasks. It is intended to temporarily
34749        /// disable RECURRING tasks.
34750        pub disabled: bool,
34751
34752        /// Optional. Number of retry attempts before aborting.
34753        /// Set to zero to never attempt to retry a failed task.
34754        pub max_retries: i32,
34755
34756        /// Trigger only applies for RECURRING tasks.
34757        pub trigger: std::option::Option<crate::model::task::trigger_spec::Trigger>,
34758
34759        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34760    }
34761
34762    impl TriggerSpec {
34763        pub fn new() -> Self {
34764            std::default::Default::default()
34765        }
34766
34767        /// Sets the value of [r#type][crate::model::task::TriggerSpec::type].
34768        pub fn set_type<T: std::convert::Into<crate::model::task::trigger_spec::Type>>(
34769            mut self,
34770            v: T,
34771        ) -> Self {
34772            self.r#type = v.into();
34773            self
34774        }
34775
34776        /// Sets the value of [start_time][crate::model::task::TriggerSpec::start_time].
34777        pub fn set_start_time<T>(mut self, v: T) -> Self
34778        where
34779            T: std::convert::Into<wkt::Timestamp>,
34780        {
34781            self.start_time = std::option::Option::Some(v.into());
34782            self
34783        }
34784
34785        /// Sets or clears the value of [start_time][crate::model::task::TriggerSpec::start_time].
34786        pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
34787        where
34788            T: std::convert::Into<wkt::Timestamp>,
34789        {
34790            self.start_time = v.map(|x| x.into());
34791            self
34792        }
34793
34794        /// Sets the value of [disabled][crate::model::task::TriggerSpec::disabled].
34795        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
34796            self.disabled = v.into();
34797            self
34798        }
34799
34800        /// Sets the value of [max_retries][crate::model::task::TriggerSpec::max_retries].
34801        pub fn set_max_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34802            self.max_retries = v.into();
34803            self
34804        }
34805
34806        /// Sets the value of [trigger][crate::model::task::TriggerSpec::trigger].
34807        ///
34808        /// Note that all the setters affecting `trigger` are mutually
34809        /// exclusive.
34810        pub fn set_trigger<
34811            T: std::convert::Into<std::option::Option<crate::model::task::trigger_spec::Trigger>>,
34812        >(
34813            mut self,
34814            v: T,
34815        ) -> Self {
34816            self.trigger = v.into();
34817            self
34818        }
34819
34820        /// The value of [trigger][crate::model::task::TriggerSpec::trigger]
34821        /// if it holds a `Schedule`, `None` if the field is not set or
34822        /// holds a different branch.
34823        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
34824            #[allow(unreachable_patterns)]
34825            self.trigger.as_ref().and_then(|v| match v {
34826                crate::model::task::trigger_spec::Trigger::Schedule(v) => {
34827                    std::option::Option::Some(v)
34828                }
34829                _ => std::option::Option::None,
34830            })
34831        }
34832
34833        /// Sets the value of [trigger][crate::model::task::TriggerSpec::trigger]
34834        /// to hold a `Schedule`.
34835        ///
34836        /// Note that all the setters affecting `trigger` are
34837        /// mutually exclusive.
34838        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34839            self.trigger = std::option::Option::Some(
34840                crate::model::task::trigger_spec::Trigger::Schedule(v.into()),
34841            );
34842            self
34843        }
34844    }
34845
34846    impl wkt::message::Message for TriggerSpec {
34847        fn typename() -> &'static str {
34848            "type.googleapis.com/google.cloud.dataplex.v1.Task.TriggerSpec"
34849        }
34850    }
34851
34852    /// Defines additional types related to [TriggerSpec].
34853    pub mod trigger_spec {
34854        #[allow(unused_imports)]
34855        use super::*;
34856
34857        /// Determines how often and when the job will run.
34858        ///
34859        /// # Working with unknown values
34860        ///
34861        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
34862        /// additional enum variants at any time. Adding new variants is not considered
34863        /// a breaking change. Applications should write their code in anticipation of:
34864        ///
34865        /// - New values appearing in future releases of the client library, **and**
34866        /// - New values received dynamically, without application changes.
34867        ///
34868        /// Please consult the [Working with enums] section in the user guide for some
34869        /// guidelines.
34870        ///
34871        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
34872        #[derive(Clone, Debug, PartialEq)]
34873        #[non_exhaustive]
34874        pub enum Type {
34875            /// Unspecified trigger type.
34876            Unspecified,
34877            /// The task runs one-time shortly after Task Creation.
34878            OnDemand,
34879            /// The task is scheduled to run periodically.
34880            Recurring,
34881            /// If set, the enum was initialized with an unknown value.
34882            ///
34883            /// Applications can examine the value using [Type::value] or
34884            /// [Type::name].
34885            UnknownValue(r#type::UnknownValue),
34886        }
34887
34888        #[doc(hidden)]
34889        pub mod r#type {
34890            #[allow(unused_imports)]
34891            use super::*;
34892            #[derive(Clone, Debug, PartialEq)]
34893            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34894        }
34895
34896        impl Type {
34897            /// Gets the enum value.
34898            ///
34899            /// Returns `None` if the enum contains an unknown value deserialized from
34900            /// the string representation of enums.
34901            pub fn value(&self) -> std::option::Option<i32> {
34902                match self {
34903                    Self::Unspecified => std::option::Option::Some(0),
34904                    Self::OnDemand => std::option::Option::Some(1),
34905                    Self::Recurring => std::option::Option::Some(2),
34906                    Self::UnknownValue(u) => u.0.value(),
34907                }
34908            }
34909
34910            /// Gets the enum value as a string.
34911            ///
34912            /// Returns `None` if the enum contains an unknown value deserialized from
34913            /// the integer representation of enums.
34914            pub fn name(&self) -> std::option::Option<&str> {
34915                match self {
34916                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
34917                    Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
34918                    Self::Recurring => std::option::Option::Some("RECURRING"),
34919                    Self::UnknownValue(u) => u.0.name(),
34920                }
34921            }
34922        }
34923
34924        impl std::default::Default for Type {
34925            fn default() -> Self {
34926                use std::convert::From;
34927                Self::from(0)
34928            }
34929        }
34930
34931        impl std::fmt::Display for Type {
34932            fn fmt(
34933                &self,
34934                f: &mut std::fmt::Formatter<'_>,
34935            ) -> std::result::Result<(), std::fmt::Error> {
34936                wkt::internal::display_enum(f, self.name(), self.value())
34937            }
34938        }
34939
34940        impl std::convert::From<i32> for Type {
34941            fn from(value: i32) -> Self {
34942                match value {
34943                    0 => Self::Unspecified,
34944                    1 => Self::OnDemand,
34945                    2 => Self::Recurring,
34946                    _ => Self::UnknownValue(r#type::UnknownValue(
34947                        wkt::internal::UnknownEnumValue::Integer(value),
34948                    )),
34949                }
34950            }
34951        }
34952
34953        impl std::convert::From<&str> for Type {
34954            fn from(value: &str) -> Self {
34955                use std::string::ToString;
34956                match value {
34957                    "TYPE_UNSPECIFIED" => Self::Unspecified,
34958                    "ON_DEMAND" => Self::OnDemand,
34959                    "RECURRING" => Self::Recurring,
34960                    _ => Self::UnknownValue(r#type::UnknownValue(
34961                        wkt::internal::UnknownEnumValue::String(value.to_string()),
34962                    )),
34963                }
34964            }
34965        }
34966
34967        impl serde::ser::Serialize for Type {
34968            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34969            where
34970                S: serde::Serializer,
34971            {
34972                match self {
34973                    Self::Unspecified => serializer.serialize_i32(0),
34974                    Self::OnDemand => serializer.serialize_i32(1),
34975                    Self::Recurring => serializer.serialize_i32(2),
34976                    Self::UnknownValue(u) => u.0.serialize(serializer),
34977                }
34978            }
34979        }
34980
34981        impl<'de> serde::de::Deserialize<'de> for Type {
34982            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34983            where
34984                D: serde::Deserializer<'de>,
34985            {
34986                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
34987                    ".google.cloud.dataplex.v1.Task.TriggerSpec.Type",
34988                ))
34989            }
34990        }
34991
34992        /// Trigger only applies for RECURRING tasks.
34993        #[derive(Clone, Debug, PartialEq)]
34994        #[non_exhaustive]
34995        pub enum Trigger {
34996            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
34997            /// running tasks periodically. To explicitly set a timezone to the cron
34998            /// tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
34999            /// "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid
35000            /// string from IANA time zone database. For example,
35001            /// `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * *
35002            /// *`. This field is required for RECURRING tasks.
35003            Schedule(std::string::String),
35004        }
35005    }
35006
35007    /// Execution related settings, like retry and service_account.
35008    #[derive(Clone, Default, PartialEq)]
35009    #[non_exhaustive]
35010    pub struct ExecutionSpec {
35011        /// Optional. The arguments to pass to the task.
35012        /// The args can use placeholders of the format ${placeholder} as
35013        /// part of key/value string. These will be interpolated before passing the
35014        /// args to the driver. Currently supported placeholders:
35015        ///
35016        /// - ${task_id}
35017        /// - ${job_time}
35018        ///   To pass positional args, set the key as TASK_ARGS. The value should be a
35019        ///   comma-separated string of all the positional arguments. To use a
35020        ///   delimiter other than comma, refer to
35021        ///   <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of
35022        ///   other keys being present in the args, then TASK_ARGS will be passed as
35023        ///   the last argument.
35024        pub args: std::collections::HashMap<std::string::String, std::string::String>,
35025
35026        /// Required. Service account to use to execute a task.
35027        /// If not provided, the default Compute service account for the project is
35028        /// used.
35029        pub service_account: std::string::String,
35030
35031        /// Optional. The project in which jobs are run. By default, the project
35032        /// containing the Lake is used. If a project is provided, the
35033        /// [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
35034        /// must belong to this project.
35035        ///
35036        /// [google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]: crate::model::task::ExecutionSpec::service_account
35037        pub project: std::string::String,
35038
35039        /// Optional. The maximum duration after which the job execution is expired.
35040        pub max_job_execution_lifetime: std::option::Option<wkt::Duration>,
35041
35042        /// Optional. The Cloud KMS key to use for encryption, of the form:
35043        /// `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`.
35044        pub kms_key: std::string::String,
35045
35046        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35047    }
35048
35049    impl ExecutionSpec {
35050        pub fn new() -> Self {
35051            std::default::Default::default()
35052        }
35053
35054        /// Sets the value of [args][crate::model::task::ExecutionSpec::args].
35055        pub fn set_args<T, K, V>(mut self, v: T) -> Self
35056        where
35057            T: std::iter::IntoIterator<Item = (K, V)>,
35058            K: std::convert::Into<std::string::String>,
35059            V: std::convert::Into<std::string::String>,
35060        {
35061            use std::iter::Iterator;
35062            self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
35063            self
35064        }
35065
35066        /// Sets the value of [service_account][crate::model::task::ExecutionSpec::service_account].
35067        pub fn set_service_account<T: std::convert::Into<std::string::String>>(
35068            mut self,
35069            v: T,
35070        ) -> Self {
35071            self.service_account = v.into();
35072            self
35073        }
35074
35075        /// Sets the value of [project][crate::model::task::ExecutionSpec::project].
35076        pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35077            self.project = v.into();
35078            self
35079        }
35080
35081        /// Sets the value of [max_job_execution_lifetime][crate::model::task::ExecutionSpec::max_job_execution_lifetime].
35082        pub fn set_max_job_execution_lifetime<T>(mut self, v: T) -> Self
35083        where
35084            T: std::convert::Into<wkt::Duration>,
35085        {
35086            self.max_job_execution_lifetime = std::option::Option::Some(v.into());
35087            self
35088        }
35089
35090        /// Sets or clears the value of [max_job_execution_lifetime][crate::model::task::ExecutionSpec::max_job_execution_lifetime].
35091        pub fn set_or_clear_max_job_execution_lifetime<T>(
35092            mut self,
35093            v: std::option::Option<T>,
35094        ) -> Self
35095        where
35096            T: std::convert::Into<wkt::Duration>,
35097        {
35098            self.max_job_execution_lifetime = v.map(|x| x.into());
35099            self
35100        }
35101
35102        /// Sets the value of [kms_key][crate::model::task::ExecutionSpec::kms_key].
35103        pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35104            self.kms_key = v.into();
35105            self
35106        }
35107    }
35108
35109    impl wkt::message::Message for ExecutionSpec {
35110        fn typename() -> &'static str {
35111            "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionSpec"
35112        }
35113    }
35114
35115    /// User-specified config for running a Spark task.
35116    #[derive(Clone, Default, PartialEq)]
35117    #[non_exhaustive]
35118    pub struct SparkTaskConfig {
35119        /// Optional. Cloud Storage URIs of files to be placed in the working
35120        /// directory of each executor.
35121        pub file_uris: std::vec::Vec<std::string::String>,
35122
35123        /// Optional. Cloud Storage URIs of archives to be extracted into the working
35124        /// directory of each executor. Supported file types: .jar, .tar, .tar.gz,
35125        /// .tgz, and .zip.
35126        pub archive_uris: std::vec::Vec<std::string::String>,
35127
35128        /// Optional. Infrastructure specification for the execution.
35129        pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
35130
35131        /// Required. The specification of the main method to call to drive the
35132        /// job. Specify either the jar file that contains the main class or the
35133        /// main class name.
35134        pub driver: std::option::Option<crate::model::task::spark_task_config::Driver>,
35135
35136        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35137    }
35138
35139    impl SparkTaskConfig {
35140        pub fn new() -> Self {
35141            std::default::Default::default()
35142        }
35143
35144        /// Sets the value of [file_uris][crate::model::task::SparkTaskConfig::file_uris].
35145        pub fn set_file_uris<T, V>(mut self, v: T) -> Self
35146        where
35147            T: std::iter::IntoIterator<Item = V>,
35148            V: std::convert::Into<std::string::String>,
35149        {
35150            use std::iter::Iterator;
35151            self.file_uris = v.into_iter().map(|i| i.into()).collect();
35152            self
35153        }
35154
35155        /// Sets the value of [archive_uris][crate::model::task::SparkTaskConfig::archive_uris].
35156        pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
35157        where
35158            T: std::iter::IntoIterator<Item = V>,
35159            V: std::convert::Into<std::string::String>,
35160        {
35161            use std::iter::Iterator;
35162            self.archive_uris = v.into_iter().map(|i| i.into()).collect();
35163            self
35164        }
35165
35166        /// Sets the value of [infrastructure_spec][crate::model::task::SparkTaskConfig::infrastructure_spec].
35167        pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
35168        where
35169            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35170        {
35171            self.infrastructure_spec = std::option::Option::Some(v.into());
35172            self
35173        }
35174
35175        /// Sets or clears the value of [infrastructure_spec][crate::model::task::SparkTaskConfig::infrastructure_spec].
35176        pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
35177        where
35178            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35179        {
35180            self.infrastructure_spec = v.map(|x| x.into());
35181            self
35182        }
35183
35184        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver].
35185        ///
35186        /// Note that all the setters affecting `driver` are mutually
35187        /// exclusive.
35188        pub fn set_driver<
35189            T: std::convert::Into<std::option::Option<crate::model::task::spark_task_config::Driver>>,
35190        >(
35191            mut self,
35192            v: T,
35193        ) -> Self {
35194            self.driver = v.into();
35195            self
35196        }
35197
35198        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
35199        /// if it holds a `MainJarFileUri`, `None` if the field is not set or
35200        /// holds a different branch.
35201        pub fn main_jar_file_uri(&self) -> std::option::Option<&std::string::String> {
35202            #[allow(unreachable_patterns)]
35203            self.driver.as_ref().and_then(|v| match v {
35204                crate::model::task::spark_task_config::Driver::MainJarFileUri(v) => {
35205                    std::option::Option::Some(v)
35206                }
35207                _ => std::option::Option::None,
35208            })
35209        }
35210
35211        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
35212        /// to hold a `MainJarFileUri`.
35213        ///
35214        /// Note that all the setters affecting `driver` are
35215        /// mutually exclusive.
35216        pub fn set_main_jar_file_uri<T: std::convert::Into<std::string::String>>(
35217            mut self,
35218            v: T,
35219        ) -> Self {
35220            self.driver = std::option::Option::Some(
35221                crate::model::task::spark_task_config::Driver::MainJarFileUri(v.into()),
35222            );
35223            self
35224        }
35225
35226        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
35227        /// if it holds a `MainClass`, `None` if the field is not set or
35228        /// holds a different branch.
35229        pub fn main_class(&self) -> std::option::Option<&std::string::String> {
35230            #[allow(unreachable_patterns)]
35231            self.driver.as_ref().and_then(|v| match v {
35232                crate::model::task::spark_task_config::Driver::MainClass(v) => {
35233                    std::option::Option::Some(v)
35234                }
35235                _ => std::option::Option::None,
35236            })
35237        }
35238
35239        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
35240        /// to hold a `MainClass`.
35241        ///
35242        /// Note that all the setters affecting `driver` are
35243        /// mutually exclusive.
35244        pub fn set_main_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35245            self.driver = std::option::Option::Some(
35246                crate::model::task::spark_task_config::Driver::MainClass(v.into()),
35247            );
35248            self
35249        }
35250
35251        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
35252        /// if it holds a `PythonScriptFile`, `None` if the field is not set or
35253        /// holds a different branch.
35254        pub fn python_script_file(&self) -> std::option::Option<&std::string::String> {
35255            #[allow(unreachable_patterns)]
35256            self.driver.as_ref().and_then(|v| match v {
35257                crate::model::task::spark_task_config::Driver::PythonScriptFile(v) => {
35258                    std::option::Option::Some(v)
35259                }
35260                _ => std::option::Option::None,
35261            })
35262        }
35263
35264        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
35265        /// to hold a `PythonScriptFile`.
35266        ///
35267        /// Note that all the setters affecting `driver` are
35268        /// mutually exclusive.
35269        pub fn set_python_script_file<T: std::convert::Into<std::string::String>>(
35270            mut self,
35271            v: T,
35272        ) -> Self {
35273            self.driver = std::option::Option::Some(
35274                crate::model::task::spark_task_config::Driver::PythonScriptFile(v.into()),
35275            );
35276            self
35277        }
35278
35279        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
35280        /// if it holds a `SqlScriptFile`, `None` if the field is not set or
35281        /// holds a different branch.
35282        pub fn sql_script_file(&self) -> std::option::Option<&std::string::String> {
35283            #[allow(unreachable_patterns)]
35284            self.driver.as_ref().and_then(|v| match v {
35285                crate::model::task::spark_task_config::Driver::SqlScriptFile(v) => {
35286                    std::option::Option::Some(v)
35287                }
35288                _ => std::option::Option::None,
35289            })
35290        }
35291
35292        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
35293        /// to hold a `SqlScriptFile`.
35294        ///
35295        /// Note that all the setters affecting `driver` are
35296        /// mutually exclusive.
35297        pub fn set_sql_script_file<T: std::convert::Into<std::string::String>>(
35298            mut self,
35299            v: T,
35300        ) -> Self {
35301            self.driver = std::option::Option::Some(
35302                crate::model::task::spark_task_config::Driver::SqlScriptFile(v.into()),
35303            );
35304            self
35305        }
35306
35307        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
35308        /// if it holds a `SqlScript`, `None` if the field is not set or
35309        /// holds a different branch.
35310        pub fn sql_script(&self) -> std::option::Option<&std::string::String> {
35311            #[allow(unreachable_patterns)]
35312            self.driver.as_ref().and_then(|v| match v {
35313                crate::model::task::spark_task_config::Driver::SqlScript(v) => {
35314                    std::option::Option::Some(v)
35315                }
35316                _ => std::option::Option::None,
35317            })
35318        }
35319
35320        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
35321        /// to hold a `SqlScript`.
35322        ///
35323        /// Note that all the setters affecting `driver` are
35324        /// mutually exclusive.
35325        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35326            self.driver = std::option::Option::Some(
35327                crate::model::task::spark_task_config::Driver::SqlScript(v.into()),
35328            );
35329            self
35330        }
35331    }
35332
35333    impl wkt::message::Message for SparkTaskConfig {
35334        fn typename() -> &'static str {
35335            "type.googleapis.com/google.cloud.dataplex.v1.Task.SparkTaskConfig"
35336        }
35337    }
35338
35339    /// Defines additional types related to [SparkTaskConfig].
35340    pub mod spark_task_config {
35341        #[allow(unused_imports)]
35342        use super::*;
35343
35344        /// Required. The specification of the main method to call to drive the
35345        /// job. Specify either the jar file that contains the main class or the
35346        /// main class name.
35347        #[derive(Clone, Debug, PartialEq)]
35348        #[non_exhaustive]
35349        pub enum Driver {
35350            /// The Cloud Storage URI of the jar file that contains the main class.
35351            /// The execution args are passed in as a sequence of named process
35352            /// arguments (`--key=value`).
35353            MainJarFileUri(std::string::String),
35354            /// The name of the driver's main class. The jar file that contains the
35355            /// class must be in the default CLASSPATH or specified in
35356            /// `jar_file_uris`.
35357            /// The execution args are passed in as a sequence of named process
35358            /// arguments (`--key=value`).
35359            MainClass(std::string::String),
35360            /// The Gcloud Storage URI of the main Python file to use as the driver.
35361            /// Must be a .py file. The execution args are passed in as a sequence of
35362            /// named process arguments (`--key=value`).
35363            PythonScriptFile(std::string::String),
35364            /// A reference to a query file. This should be the Cloud Storage URI of
35365            /// the query file. The execution args are used to declare a set of script
35366            /// variables (`set key="value";`).
35367            SqlScriptFile(std::string::String),
35368            /// The query text.
35369            /// The execution args are used to declare a set of script variables
35370            /// (`set key="value";`).
35371            SqlScript(std::string::String),
35372        }
35373    }
35374
35375    /// Config for running scheduled notebooks.
35376    #[derive(Clone, Default, PartialEq)]
35377    #[non_exhaustive]
35378    pub struct NotebookTaskConfig {
35379        /// Required. Path to input notebook. This can be the Cloud Storage URI of
35380        /// the notebook file or the path to a Notebook Content. The execution args
35381        /// are accessible as environment variables
35382        /// (`TASK_key=value`).
35383        pub notebook: std::string::String,
35384
35385        /// Optional. Infrastructure specification for the execution.
35386        pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
35387
35388        /// Optional. Cloud Storage URIs of files to be placed in the working
35389        /// directory of each executor.
35390        pub file_uris: std::vec::Vec<std::string::String>,
35391
35392        /// Optional. Cloud Storage URIs of archives to be extracted into the working
35393        /// directory of each executor. Supported file types: .jar, .tar, .tar.gz,
35394        /// .tgz, and .zip.
35395        pub archive_uris: std::vec::Vec<std::string::String>,
35396
35397        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35398    }
35399
35400    impl NotebookTaskConfig {
35401        pub fn new() -> Self {
35402            std::default::Default::default()
35403        }
35404
35405        /// Sets the value of [notebook][crate::model::task::NotebookTaskConfig::notebook].
35406        pub fn set_notebook<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35407            self.notebook = v.into();
35408            self
35409        }
35410
35411        /// Sets the value of [infrastructure_spec][crate::model::task::NotebookTaskConfig::infrastructure_spec].
35412        pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
35413        where
35414            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35415        {
35416            self.infrastructure_spec = std::option::Option::Some(v.into());
35417            self
35418        }
35419
35420        /// Sets or clears the value of [infrastructure_spec][crate::model::task::NotebookTaskConfig::infrastructure_spec].
35421        pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
35422        where
35423            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35424        {
35425            self.infrastructure_spec = v.map(|x| x.into());
35426            self
35427        }
35428
35429        /// Sets the value of [file_uris][crate::model::task::NotebookTaskConfig::file_uris].
35430        pub fn set_file_uris<T, V>(mut self, v: T) -> Self
35431        where
35432            T: std::iter::IntoIterator<Item = V>,
35433            V: std::convert::Into<std::string::String>,
35434        {
35435            use std::iter::Iterator;
35436            self.file_uris = v.into_iter().map(|i| i.into()).collect();
35437            self
35438        }
35439
35440        /// Sets the value of [archive_uris][crate::model::task::NotebookTaskConfig::archive_uris].
35441        pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
35442        where
35443            T: std::iter::IntoIterator<Item = V>,
35444            V: std::convert::Into<std::string::String>,
35445        {
35446            use std::iter::Iterator;
35447            self.archive_uris = v.into_iter().map(|i| i.into()).collect();
35448            self
35449        }
35450    }
35451
35452    impl wkt::message::Message for NotebookTaskConfig {
35453        fn typename() -> &'static str {
35454            "type.googleapis.com/google.cloud.dataplex.v1.Task.NotebookTaskConfig"
35455        }
35456    }
35457
35458    /// Status of the task execution (e.g. Jobs).
35459    #[derive(Clone, Default, PartialEq)]
35460    #[non_exhaustive]
35461    pub struct ExecutionStatus {
35462        /// Output only. Last update time of the status.
35463        pub update_time: std::option::Option<wkt::Timestamp>,
35464
35465        /// Output only. latest job execution
35466        pub latest_job: std::option::Option<crate::model::Job>,
35467
35468        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35469    }
35470
35471    impl ExecutionStatus {
35472        pub fn new() -> Self {
35473            std::default::Default::default()
35474        }
35475
35476        /// Sets the value of [update_time][crate::model::task::ExecutionStatus::update_time].
35477        pub fn set_update_time<T>(mut self, v: T) -> Self
35478        where
35479            T: std::convert::Into<wkt::Timestamp>,
35480        {
35481            self.update_time = std::option::Option::Some(v.into());
35482            self
35483        }
35484
35485        /// Sets or clears the value of [update_time][crate::model::task::ExecutionStatus::update_time].
35486        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
35487        where
35488            T: std::convert::Into<wkt::Timestamp>,
35489        {
35490            self.update_time = v.map(|x| x.into());
35491            self
35492        }
35493
35494        /// Sets the value of [latest_job][crate::model::task::ExecutionStatus::latest_job].
35495        pub fn set_latest_job<T>(mut self, v: T) -> Self
35496        where
35497            T: std::convert::Into<crate::model::Job>,
35498        {
35499            self.latest_job = std::option::Option::Some(v.into());
35500            self
35501        }
35502
35503        /// Sets or clears the value of [latest_job][crate::model::task::ExecutionStatus::latest_job].
35504        pub fn set_or_clear_latest_job<T>(mut self, v: std::option::Option<T>) -> Self
35505        where
35506            T: std::convert::Into<crate::model::Job>,
35507        {
35508            self.latest_job = v.map(|x| x.into());
35509            self
35510        }
35511    }
35512
35513    impl wkt::message::Message for ExecutionStatus {
35514        fn typename() -> &'static str {
35515            "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionStatus"
35516        }
35517    }
35518
35519    /// Task template specific user-specified config.
35520    #[derive(Clone, Debug, PartialEq)]
35521    #[non_exhaustive]
35522    pub enum Config {
35523        /// Config related to running custom Spark tasks.
35524        Spark(std::boxed::Box<crate::model::task::SparkTaskConfig>),
35525        /// Config related to running scheduled Notebooks.
35526        Notebook(std::boxed::Box<crate::model::task::NotebookTaskConfig>),
35527    }
35528}
35529
35530/// A job represents an instance of a task.
35531#[derive(Clone, Default, PartialEq)]
35532#[non_exhaustive]
35533pub struct Job {
35534    /// Output only. The relative resource name of the job, of the form:
35535    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
35536    pub name: std::string::String,
35537
35538    /// Output only. System generated globally unique ID for the job.
35539    pub uid: std::string::String,
35540
35541    /// Output only. The time when the job was started.
35542    pub start_time: std::option::Option<wkt::Timestamp>,
35543
35544    /// Output only. The time when the job ended.
35545    pub end_time: std::option::Option<wkt::Timestamp>,
35546
35547    /// Output only. Execution state for the job.
35548    pub state: crate::model::job::State,
35549
35550    /// Output only. The number of times the job has been retried (excluding the
35551    /// initial attempt).
35552    pub retry_count: u32,
35553
35554    /// Output only. The underlying service running a job.
35555    pub service: crate::model::job::Service,
35556
35557    /// Output only. The full resource name for the job run under a particular
35558    /// service.
35559    pub service_job: std::string::String,
35560
35561    /// Output only. Additional information about the current state.
35562    pub message: std::string::String,
35563
35564    /// Output only. User-defined labels for the task.
35565    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
35566
35567    /// Output only. Job execution trigger.
35568    pub trigger: crate::model::job::Trigger,
35569
35570    /// Output only. Spec related to how a task is executed.
35571    pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
35572
35573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35574}
35575
35576impl Job {
35577    pub fn new() -> Self {
35578        std::default::Default::default()
35579    }
35580
35581    /// Sets the value of [name][crate::model::Job::name].
35582    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35583        self.name = v.into();
35584        self
35585    }
35586
35587    /// Sets the value of [uid][crate::model::Job::uid].
35588    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35589        self.uid = v.into();
35590        self
35591    }
35592
35593    /// Sets the value of [start_time][crate::model::Job::start_time].
35594    pub fn set_start_time<T>(mut self, v: T) -> Self
35595    where
35596        T: std::convert::Into<wkt::Timestamp>,
35597    {
35598        self.start_time = std::option::Option::Some(v.into());
35599        self
35600    }
35601
35602    /// Sets or clears the value of [start_time][crate::model::Job::start_time].
35603    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
35604    where
35605        T: std::convert::Into<wkt::Timestamp>,
35606    {
35607        self.start_time = v.map(|x| x.into());
35608        self
35609    }
35610
35611    /// Sets the value of [end_time][crate::model::Job::end_time].
35612    pub fn set_end_time<T>(mut self, v: T) -> Self
35613    where
35614        T: std::convert::Into<wkt::Timestamp>,
35615    {
35616        self.end_time = std::option::Option::Some(v.into());
35617        self
35618    }
35619
35620    /// Sets or clears the value of [end_time][crate::model::Job::end_time].
35621    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
35622    where
35623        T: std::convert::Into<wkt::Timestamp>,
35624    {
35625        self.end_time = v.map(|x| x.into());
35626        self
35627    }
35628
35629    /// Sets the value of [state][crate::model::Job::state].
35630    pub fn set_state<T: std::convert::Into<crate::model::job::State>>(mut self, v: T) -> Self {
35631        self.state = v.into();
35632        self
35633    }
35634
35635    /// Sets the value of [retry_count][crate::model::Job::retry_count].
35636    pub fn set_retry_count<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
35637        self.retry_count = v.into();
35638        self
35639    }
35640
35641    /// Sets the value of [service][crate::model::Job::service].
35642    pub fn set_service<T: std::convert::Into<crate::model::job::Service>>(mut self, v: T) -> Self {
35643        self.service = v.into();
35644        self
35645    }
35646
35647    /// Sets the value of [service_job][crate::model::Job::service_job].
35648    pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35649        self.service_job = v.into();
35650        self
35651    }
35652
35653    /// Sets the value of [message][crate::model::Job::message].
35654    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35655        self.message = v.into();
35656        self
35657    }
35658
35659    /// Sets the value of [labels][crate::model::Job::labels].
35660    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
35661    where
35662        T: std::iter::IntoIterator<Item = (K, V)>,
35663        K: std::convert::Into<std::string::String>,
35664        V: std::convert::Into<std::string::String>,
35665    {
35666        use std::iter::Iterator;
35667        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
35668        self
35669    }
35670
35671    /// Sets the value of [trigger][crate::model::Job::trigger].
35672    pub fn set_trigger<T: std::convert::Into<crate::model::job::Trigger>>(mut self, v: T) -> Self {
35673        self.trigger = v.into();
35674        self
35675    }
35676
35677    /// Sets the value of [execution_spec][crate::model::Job::execution_spec].
35678    pub fn set_execution_spec<T>(mut self, v: T) -> Self
35679    where
35680        T: std::convert::Into<crate::model::task::ExecutionSpec>,
35681    {
35682        self.execution_spec = std::option::Option::Some(v.into());
35683        self
35684    }
35685
35686    /// Sets or clears the value of [execution_spec][crate::model::Job::execution_spec].
35687    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
35688    where
35689        T: std::convert::Into<crate::model::task::ExecutionSpec>,
35690    {
35691        self.execution_spec = v.map(|x| x.into());
35692        self
35693    }
35694}
35695
35696impl wkt::message::Message for Job {
35697    fn typename() -> &'static str {
35698        "type.googleapis.com/google.cloud.dataplex.v1.Job"
35699    }
35700}
35701
35702/// Defines additional types related to [Job].
35703pub mod job {
35704    #[allow(unused_imports)]
35705    use super::*;
35706
35707    ///
35708    /// # Working with unknown values
35709    ///
35710    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
35711    /// additional enum variants at any time. Adding new variants is not considered
35712    /// a breaking change. Applications should write their code in anticipation of:
35713    ///
35714    /// - New values appearing in future releases of the client library, **and**
35715    /// - New values received dynamically, without application changes.
35716    ///
35717    /// Please consult the [Working with enums] section in the user guide for some
35718    /// guidelines.
35719    ///
35720    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
35721    #[derive(Clone, Debug, PartialEq)]
35722    #[non_exhaustive]
35723    pub enum Service {
35724        /// Service used to run the job is unspecified.
35725        Unspecified,
35726        /// Dataproc service is used to run this job.
35727        Dataproc,
35728        /// If set, the enum was initialized with an unknown value.
35729        ///
35730        /// Applications can examine the value using [Service::value] or
35731        /// [Service::name].
35732        UnknownValue(service::UnknownValue),
35733    }
35734
35735    #[doc(hidden)]
35736    pub mod service {
35737        #[allow(unused_imports)]
35738        use super::*;
35739        #[derive(Clone, Debug, PartialEq)]
35740        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
35741    }
35742
35743    impl Service {
35744        /// Gets the enum value.
35745        ///
35746        /// Returns `None` if the enum contains an unknown value deserialized from
35747        /// the string representation of enums.
35748        pub fn value(&self) -> std::option::Option<i32> {
35749            match self {
35750                Self::Unspecified => std::option::Option::Some(0),
35751                Self::Dataproc => std::option::Option::Some(1),
35752                Self::UnknownValue(u) => u.0.value(),
35753            }
35754        }
35755
35756        /// Gets the enum value as a string.
35757        ///
35758        /// Returns `None` if the enum contains an unknown value deserialized from
35759        /// the integer representation of enums.
35760        pub fn name(&self) -> std::option::Option<&str> {
35761            match self {
35762                Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
35763                Self::Dataproc => std::option::Option::Some("DATAPROC"),
35764                Self::UnknownValue(u) => u.0.name(),
35765            }
35766        }
35767    }
35768
35769    impl std::default::Default for Service {
35770        fn default() -> Self {
35771            use std::convert::From;
35772            Self::from(0)
35773        }
35774    }
35775
35776    impl std::fmt::Display for Service {
35777        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
35778            wkt::internal::display_enum(f, self.name(), self.value())
35779        }
35780    }
35781
35782    impl std::convert::From<i32> for Service {
35783        fn from(value: i32) -> Self {
35784            match value {
35785                0 => Self::Unspecified,
35786                1 => Self::Dataproc,
35787                _ => Self::UnknownValue(service::UnknownValue(
35788                    wkt::internal::UnknownEnumValue::Integer(value),
35789                )),
35790            }
35791        }
35792    }
35793
35794    impl std::convert::From<&str> for Service {
35795        fn from(value: &str) -> Self {
35796            use std::string::ToString;
35797            match value {
35798                "SERVICE_UNSPECIFIED" => Self::Unspecified,
35799                "DATAPROC" => Self::Dataproc,
35800                _ => Self::UnknownValue(service::UnknownValue(
35801                    wkt::internal::UnknownEnumValue::String(value.to_string()),
35802                )),
35803            }
35804        }
35805    }
35806
35807    impl serde::ser::Serialize for Service {
35808        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
35809        where
35810            S: serde::Serializer,
35811        {
35812            match self {
35813                Self::Unspecified => serializer.serialize_i32(0),
35814                Self::Dataproc => serializer.serialize_i32(1),
35815                Self::UnknownValue(u) => u.0.serialize(serializer),
35816            }
35817        }
35818    }
35819
35820    impl<'de> serde::de::Deserialize<'de> for Service {
35821        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
35822        where
35823            D: serde::Deserializer<'de>,
35824        {
35825            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
35826                ".google.cloud.dataplex.v1.Job.Service",
35827            ))
35828        }
35829    }
35830
35831    ///
35832    /// # Working with unknown values
35833    ///
35834    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
35835    /// additional enum variants at any time. Adding new variants is not considered
35836    /// a breaking change. Applications should write their code in anticipation of:
35837    ///
35838    /// - New values appearing in future releases of the client library, **and**
35839    /// - New values received dynamically, without application changes.
35840    ///
35841    /// Please consult the [Working with enums] section in the user guide for some
35842    /// guidelines.
35843    ///
35844    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
35845    #[derive(Clone, Debug, PartialEq)]
35846    #[non_exhaustive]
35847    pub enum State {
35848        /// The job state is unknown.
35849        Unspecified,
35850        /// The job is running.
35851        Running,
35852        /// The job is cancelling.
35853        Cancelling,
35854        /// The job cancellation was successful.
35855        Cancelled,
35856        /// The job completed successfully.
35857        Succeeded,
35858        /// The job is no longer running due to an error.
35859        Failed,
35860        /// The job was cancelled outside of Dataplex Universal Catalog.
35861        Aborted,
35862        /// If set, the enum was initialized with an unknown value.
35863        ///
35864        /// Applications can examine the value using [State::value] or
35865        /// [State::name].
35866        UnknownValue(state::UnknownValue),
35867    }
35868
35869    #[doc(hidden)]
35870    pub mod state {
35871        #[allow(unused_imports)]
35872        use super::*;
35873        #[derive(Clone, Debug, PartialEq)]
35874        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
35875    }
35876
35877    impl State {
35878        /// Gets the enum value.
35879        ///
35880        /// Returns `None` if the enum contains an unknown value deserialized from
35881        /// the string representation of enums.
35882        pub fn value(&self) -> std::option::Option<i32> {
35883            match self {
35884                Self::Unspecified => std::option::Option::Some(0),
35885                Self::Running => std::option::Option::Some(1),
35886                Self::Cancelling => std::option::Option::Some(2),
35887                Self::Cancelled => std::option::Option::Some(3),
35888                Self::Succeeded => std::option::Option::Some(4),
35889                Self::Failed => std::option::Option::Some(5),
35890                Self::Aborted => std::option::Option::Some(6),
35891                Self::UnknownValue(u) => u.0.value(),
35892            }
35893        }
35894
35895        /// Gets the enum value as a string.
35896        ///
35897        /// Returns `None` if the enum contains an unknown value deserialized from
35898        /// the integer representation of enums.
35899        pub fn name(&self) -> std::option::Option<&str> {
35900            match self {
35901                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
35902                Self::Running => std::option::Option::Some("RUNNING"),
35903                Self::Cancelling => std::option::Option::Some("CANCELLING"),
35904                Self::Cancelled => std::option::Option::Some("CANCELLED"),
35905                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
35906                Self::Failed => std::option::Option::Some("FAILED"),
35907                Self::Aborted => std::option::Option::Some("ABORTED"),
35908                Self::UnknownValue(u) => u.0.name(),
35909            }
35910        }
35911    }
35912
35913    impl std::default::Default for State {
35914        fn default() -> Self {
35915            use std::convert::From;
35916            Self::from(0)
35917        }
35918    }
35919
35920    impl std::fmt::Display for State {
35921        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
35922            wkt::internal::display_enum(f, self.name(), self.value())
35923        }
35924    }
35925
35926    impl std::convert::From<i32> for State {
35927        fn from(value: i32) -> Self {
35928            match value {
35929                0 => Self::Unspecified,
35930                1 => Self::Running,
35931                2 => Self::Cancelling,
35932                3 => Self::Cancelled,
35933                4 => Self::Succeeded,
35934                5 => Self::Failed,
35935                6 => Self::Aborted,
35936                _ => Self::UnknownValue(state::UnknownValue(
35937                    wkt::internal::UnknownEnumValue::Integer(value),
35938                )),
35939            }
35940        }
35941    }
35942
35943    impl std::convert::From<&str> for State {
35944        fn from(value: &str) -> Self {
35945            use std::string::ToString;
35946            match value {
35947                "STATE_UNSPECIFIED" => Self::Unspecified,
35948                "RUNNING" => Self::Running,
35949                "CANCELLING" => Self::Cancelling,
35950                "CANCELLED" => Self::Cancelled,
35951                "SUCCEEDED" => Self::Succeeded,
35952                "FAILED" => Self::Failed,
35953                "ABORTED" => Self::Aborted,
35954                _ => Self::UnknownValue(state::UnknownValue(
35955                    wkt::internal::UnknownEnumValue::String(value.to_string()),
35956                )),
35957            }
35958        }
35959    }
35960
35961    impl serde::ser::Serialize for State {
35962        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
35963        where
35964            S: serde::Serializer,
35965        {
35966            match self {
35967                Self::Unspecified => serializer.serialize_i32(0),
35968                Self::Running => serializer.serialize_i32(1),
35969                Self::Cancelling => serializer.serialize_i32(2),
35970                Self::Cancelled => serializer.serialize_i32(3),
35971                Self::Succeeded => serializer.serialize_i32(4),
35972                Self::Failed => serializer.serialize_i32(5),
35973                Self::Aborted => serializer.serialize_i32(6),
35974                Self::UnknownValue(u) => u.0.serialize(serializer),
35975            }
35976        }
35977    }
35978
35979    impl<'de> serde::de::Deserialize<'de> for State {
35980        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
35981        where
35982            D: serde::Deserializer<'de>,
35983        {
35984            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
35985                ".google.cloud.dataplex.v1.Job.State",
35986            ))
35987        }
35988    }
35989
35990    /// Job execution trigger.
35991    ///
35992    /// # Working with unknown values
35993    ///
35994    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
35995    /// additional enum variants at any time. Adding new variants is not considered
35996    /// a breaking change. Applications should write their code in anticipation of:
35997    ///
35998    /// - New values appearing in future releases of the client library, **and**
35999    /// - New values received dynamically, without application changes.
36000    ///
36001    /// Please consult the [Working with enums] section in the user guide for some
36002    /// guidelines.
36003    ///
36004    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36005    #[derive(Clone, Debug, PartialEq)]
36006    #[non_exhaustive]
36007    pub enum Trigger {
36008        /// The trigger is unspecified.
36009        Unspecified,
36010        /// The job was triggered by Dataplex Universal Catalog based on trigger spec
36011        /// from task definition.
36012        TaskConfig,
36013        /// The job was triggered by the explicit call of Task API.
36014        RunRequest,
36015        /// If set, the enum was initialized with an unknown value.
36016        ///
36017        /// Applications can examine the value using [Trigger::value] or
36018        /// [Trigger::name].
36019        UnknownValue(trigger::UnknownValue),
36020    }
36021
36022    #[doc(hidden)]
36023    pub mod trigger {
36024        #[allow(unused_imports)]
36025        use super::*;
36026        #[derive(Clone, Debug, PartialEq)]
36027        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36028    }
36029
36030    impl Trigger {
36031        /// Gets the enum value.
36032        ///
36033        /// Returns `None` if the enum contains an unknown value deserialized from
36034        /// the string representation of enums.
36035        pub fn value(&self) -> std::option::Option<i32> {
36036            match self {
36037                Self::Unspecified => std::option::Option::Some(0),
36038                Self::TaskConfig => std::option::Option::Some(1),
36039                Self::RunRequest => std::option::Option::Some(2),
36040                Self::UnknownValue(u) => u.0.value(),
36041            }
36042        }
36043
36044        /// Gets the enum value as a string.
36045        ///
36046        /// Returns `None` if the enum contains an unknown value deserialized from
36047        /// the integer representation of enums.
36048        pub fn name(&self) -> std::option::Option<&str> {
36049            match self {
36050                Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
36051                Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
36052                Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
36053                Self::UnknownValue(u) => u.0.name(),
36054            }
36055        }
36056    }
36057
36058    impl std::default::Default for Trigger {
36059        fn default() -> Self {
36060            use std::convert::From;
36061            Self::from(0)
36062        }
36063    }
36064
36065    impl std::fmt::Display for Trigger {
36066        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36067            wkt::internal::display_enum(f, self.name(), self.value())
36068        }
36069    }
36070
36071    impl std::convert::From<i32> for Trigger {
36072        fn from(value: i32) -> Self {
36073            match value {
36074                0 => Self::Unspecified,
36075                1 => Self::TaskConfig,
36076                2 => Self::RunRequest,
36077                _ => Self::UnknownValue(trigger::UnknownValue(
36078                    wkt::internal::UnknownEnumValue::Integer(value),
36079                )),
36080            }
36081        }
36082    }
36083
36084    impl std::convert::From<&str> for Trigger {
36085        fn from(value: &str) -> Self {
36086            use std::string::ToString;
36087            match value {
36088                "TRIGGER_UNSPECIFIED" => Self::Unspecified,
36089                "TASK_CONFIG" => Self::TaskConfig,
36090                "RUN_REQUEST" => Self::RunRequest,
36091                _ => Self::UnknownValue(trigger::UnknownValue(
36092                    wkt::internal::UnknownEnumValue::String(value.to_string()),
36093                )),
36094            }
36095        }
36096    }
36097
36098    impl serde::ser::Serialize for Trigger {
36099        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36100        where
36101            S: serde::Serializer,
36102        {
36103            match self {
36104                Self::Unspecified => serializer.serialize_i32(0),
36105                Self::TaskConfig => serializer.serialize_i32(1),
36106                Self::RunRequest => serializer.serialize_i32(2),
36107                Self::UnknownValue(u) => u.0.serialize(serializer),
36108            }
36109        }
36110    }
36111
36112    impl<'de> serde::de::Deserialize<'de> for Trigger {
36113        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36114        where
36115            D: serde::Deserializer<'de>,
36116        {
36117            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
36118                ".google.cloud.dataplex.v1.Job.Trigger",
36119            ))
36120        }
36121    }
36122}
36123
36124/// View for controlling which parts of an entry are to be returned.
36125///
36126/// # Working with unknown values
36127///
36128/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36129/// additional enum variants at any time. Adding new variants is not considered
36130/// a breaking change. Applications should write their code in anticipation of:
36131///
36132/// - New values appearing in future releases of the client library, **and**
36133/// - New values received dynamically, without application changes.
36134///
36135/// Please consult the [Working with enums] section in the user guide for some
36136/// guidelines.
36137///
36138/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36139#[derive(Clone, Debug, PartialEq)]
36140#[non_exhaustive]
36141pub enum EntryView {
36142    /// Unspecified EntryView. Defaults to FULL.
36143    Unspecified,
36144    /// Returns entry only, without aspects.
36145    Basic,
36146    /// Returns all required aspects as well as the keys of all non-required
36147    /// aspects.
36148    Full,
36149    /// Returns aspects matching custom fields in GetEntryRequest. If the number of
36150    /// aspects exceeds 100, the first 100 will be returned.
36151    Custom,
36152    All,
36153    /// If set, the enum was initialized with an unknown value.
36154    ///
36155    /// Applications can examine the value using [EntryView::value] or
36156    /// [EntryView::name].
36157    UnknownValue(entry_view::UnknownValue),
36158}
36159
36160#[doc(hidden)]
36161pub mod entry_view {
36162    #[allow(unused_imports)]
36163    use super::*;
36164    #[derive(Clone, Debug, PartialEq)]
36165    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36166}
36167
36168impl EntryView {
36169    /// Gets the enum value.
36170    ///
36171    /// Returns `None` if the enum contains an unknown value deserialized from
36172    /// the string representation of enums.
36173    pub fn value(&self) -> std::option::Option<i32> {
36174        match self {
36175            Self::Unspecified => std::option::Option::Some(0),
36176            Self::Basic => std::option::Option::Some(1),
36177            Self::Full => std::option::Option::Some(2),
36178            Self::Custom => std::option::Option::Some(3),
36179            Self::All => std::option::Option::Some(4),
36180            Self::UnknownValue(u) => u.0.value(),
36181        }
36182    }
36183
36184    /// Gets the enum value as a string.
36185    ///
36186    /// Returns `None` if the enum contains an unknown value deserialized from
36187    /// the integer representation of enums.
36188    pub fn name(&self) -> std::option::Option<&str> {
36189        match self {
36190            Self::Unspecified => std::option::Option::Some("ENTRY_VIEW_UNSPECIFIED"),
36191            Self::Basic => std::option::Option::Some("BASIC"),
36192            Self::Full => std::option::Option::Some("FULL"),
36193            Self::Custom => std::option::Option::Some("CUSTOM"),
36194            Self::All => std::option::Option::Some("ALL"),
36195            Self::UnknownValue(u) => u.0.name(),
36196        }
36197    }
36198}
36199
36200impl std::default::Default for EntryView {
36201    fn default() -> Self {
36202        use std::convert::From;
36203        Self::from(0)
36204    }
36205}
36206
36207impl std::fmt::Display for EntryView {
36208    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36209        wkt::internal::display_enum(f, self.name(), self.value())
36210    }
36211}
36212
36213impl std::convert::From<i32> for EntryView {
36214    fn from(value: i32) -> Self {
36215        match value {
36216            0 => Self::Unspecified,
36217            1 => Self::Basic,
36218            2 => Self::Full,
36219            3 => Self::Custom,
36220            4 => Self::All,
36221            _ => Self::UnknownValue(entry_view::UnknownValue(
36222                wkt::internal::UnknownEnumValue::Integer(value),
36223            )),
36224        }
36225    }
36226}
36227
36228impl std::convert::From<&str> for EntryView {
36229    fn from(value: &str) -> Self {
36230        use std::string::ToString;
36231        match value {
36232            "ENTRY_VIEW_UNSPECIFIED" => Self::Unspecified,
36233            "BASIC" => Self::Basic,
36234            "FULL" => Self::Full,
36235            "CUSTOM" => Self::Custom,
36236            "ALL" => Self::All,
36237            _ => Self::UnknownValue(entry_view::UnknownValue(
36238                wkt::internal::UnknownEnumValue::String(value.to_string()),
36239            )),
36240        }
36241    }
36242}
36243
36244impl serde::ser::Serialize for EntryView {
36245    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36246    where
36247        S: serde::Serializer,
36248    {
36249        match self {
36250            Self::Unspecified => serializer.serialize_i32(0),
36251            Self::Basic => serializer.serialize_i32(1),
36252            Self::Full => serializer.serialize_i32(2),
36253            Self::Custom => serializer.serialize_i32(3),
36254            Self::All => serializer.serialize_i32(4),
36255            Self::UnknownValue(u) => u.0.serialize(serializer),
36256        }
36257    }
36258}
36259
36260impl<'de> serde::de::Deserialize<'de> for EntryView {
36261    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36262    where
36263        D: serde::Deserializer<'de>,
36264    {
36265        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntryView>::new(
36266            ".google.cloud.dataplex.v1.EntryView",
36267        ))
36268    }
36269}
36270
36271/// Denotes the transfer status of a resource. It is unspecified for resources
36272/// created from Dataplex API.
36273///
36274/// # Working with unknown values
36275///
36276/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36277/// additional enum variants at any time. Adding new variants is not considered
36278/// a breaking change. Applications should write their code in anticipation of:
36279///
36280/// - New values appearing in future releases of the client library, **and**
36281/// - New values received dynamically, without application changes.
36282///
36283/// Please consult the [Working with enums] section in the user guide for some
36284/// guidelines.
36285///
36286/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36287#[derive(Clone, Debug, PartialEq)]
36288#[non_exhaustive]
36289pub enum TransferStatus {
36290    /// The default value. It is set for resources that were not subject for
36291    /// migration from Data Catalog service.
36292    Unspecified,
36293    /// Indicates that a resource was migrated from Data Catalog service but it
36294    /// hasn't been transferred yet. In particular the resource cannot be updated
36295    /// from Dataplex API.
36296    Migrated,
36297    /// Indicates that a resource was transferred from Data Catalog service. The
36298    /// resource can only be updated from Dataplex API.
36299    Transferred,
36300    /// If set, the enum was initialized with an unknown value.
36301    ///
36302    /// Applications can examine the value using [TransferStatus::value] or
36303    /// [TransferStatus::name].
36304    UnknownValue(transfer_status::UnknownValue),
36305}
36306
36307#[doc(hidden)]
36308pub mod transfer_status {
36309    #[allow(unused_imports)]
36310    use super::*;
36311    #[derive(Clone, Debug, PartialEq)]
36312    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36313}
36314
36315impl TransferStatus {
36316    /// Gets the enum value.
36317    ///
36318    /// Returns `None` if the enum contains an unknown value deserialized from
36319    /// the string representation of enums.
36320    pub fn value(&self) -> std::option::Option<i32> {
36321        match self {
36322            Self::Unspecified => std::option::Option::Some(0),
36323            Self::Migrated => std::option::Option::Some(1),
36324            Self::Transferred => std::option::Option::Some(2),
36325            Self::UnknownValue(u) => u.0.value(),
36326        }
36327    }
36328
36329    /// Gets the enum value as a string.
36330    ///
36331    /// Returns `None` if the enum contains an unknown value deserialized from
36332    /// the integer representation of enums.
36333    pub fn name(&self) -> std::option::Option<&str> {
36334        match self {
36335            Self::Unspecified => std::option::Option::Some("TRANSFER_STATUS_UNSPECIFIED"),
36336            Self::Migrated => std::option::Option::Some("TRANSFER_STATUS_MIGRATED"),
36337            Self::Transferred => std::option::Option::Some("TRANSFER_STATUS_TRANSFERRED"),
36338            Self::UnknownValue(u) => u.0.name(),
36339        }
36340    }
36341}
36342
36343impl std::default::Default for TransferStatus {
36344    fn default() -> Self {
36345        use std::convert::From;
36346        Self::from(0)
36347    }
36348}
36349
36350impl std::fmt::Display for TransferStatus {
36351    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36352        wkt::internal::display_enum(f, self.name(), self.value())
36353    }
36354}
36355
36356impl std::convert::From<i32> for TransferStatus {
36357    fn from(value: i32) -> Self {
36358        match value {
36359            0 => Self::Unspecified,
36360            1 => Self::Migrated,
36361            2 => Self::Transferred,
36362            _ => Self::UnknownValue(transfer_status::UnknownValue(
36363                wkt::internal::UnknownEnumValue::Integer(value),
36364            )),
36365        }
36366    }
36367}
36368
36369impl std::convert::From<&str> for TransferStatus {
36370    fn from(value: &str) -> Self {
36371        use std::string::ToString;
36372        match value {
36373            "TRANSFER_STATUS_UNSPECIFIED" => Self::Unspecified,
36374            "TRANSFER_STATUS_MIGRATED" => Self::Migrated,
36375            "TRANSFER_STATUS_TRANSFERRED" => Self::Transferred,
36376            _ => Self::UnknownValue(transfer_status::UnknownValue(
36377                wkt::internal::UnknownEnumValue::String(value.to_string()),
36378            )),
36379        }
36380    }
36381}
36382
36383impl serde::ser::Serialize for TransferStatus {
36384    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36385    where
36386        S: serde::Serializer,
36387    {
36388        match self {
36389            Self::Unspecified => serializer.serialize_i32(0),
36390            Self::Migrated => serializer.serialize_i32(1),
36391            Self::Transferred => serializer.serialize_i32(2),
36392            Self::UnknownValue(u) => u.0.serialize(serializer),
36393        }
36394    }
36395}
36396
36397impl<'de> serde::de::Deserialize<'de> for TransferStatus {
36398    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36399    where
36400        D: serde::Deserializer<'de>,
36401    {
36402        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TransferStatus>::new(
36403            ".google.cloud.dataplex.v1.TransferStatus",
36404        ))
36405    }
36406}
36407
36408/// The type of data scan.
36409///
36410/// # Working with unknown values
36411///
36412/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36413/// additional enum variants at any time. Adding new variants is not considered
36414/// a breaking change. Applications should write their code in anticipation of:
36415///
36416/// - New values appearing in future releases of the client library, **and**
36417/// - New values received dynamically, without application changes.
36418///
36419/// Please consult the [Working with enums] section in the user guide for some
36420/// guidelines.
36421///
36422/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36423#[derive(Clone, Debug, PartialEq)]
36424#[non_exhaustive]
36425pub enum DataScanType {
36426    /// The data scan type is unspecified.
36427    Unspecified,
36428    /// Data quality scan.
36429    DataQuality,
36430    /// Data profile scan.
36431    DataProfile,
36432    /// Data discovery scan.
36433    DataDiscovery,
36434    /// Data documentation scan.
36435    DataDocumentation,
36436    /// If set, the enum was initialized with an unknown value.
36437    ///
36438    /// Applications can examine the value using [DataScanType::value] or
36439    /// [DataScanType::name].
36440    UnknownValue(data_scan_type::UnknownValue),
36441}
36442
36443#[doc(hidden)]
36444pub mod data_scan_type {
36445    #[allow(unused_imports)]
36446    use super::*;
36447    #[derive(Clone, Debug, PartialEq)]
36448    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36449}
36450
36451impl DataScanType {
36452    /// Gets the enum value.
36453    ///
36454    /// Returns `None` if the enum contains an unknown value deserialized from
36455    /// the string representation of enums.
36456    pub fn value(&self) -> std::option::Option<i32> {
36457        match self {
36458            Self::Unspecified => std::option::Option::Some(0),
36459            Self::DataQuality => std::option::Option::Some(1),
36460            Self::DataProfile => std::option::Option::Some(2),
36461            Self::DataDiscovery => std::option::Option::Some(3),
36462            Self::DataDocumentation => std::option::Option::Some(4),
36463            Self::UnknownValue(u) => u.0.value(),
36464        }
36465    }
36466
36467    /// Gets the enum value as a string.
36468    ///
36469    /// Returns `None` if the enum contains an unknown value deserialized from
36470    /// the integer representation of enums.
36471    pub fn name(&self) -> std::option::Option<&str> {
36472        match self {
36473            Self::Unspecified => std::option::Option::Some("DATA_SCAN_TYPE_UNSPECIFIED"),
36474            Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
36475            Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
36476            Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
36477            Self::DataDocumentation => std::option::Option::Some("DATA_DOCUMENTATION"),
36478            Self::UnknownValue(u) => u.0.name(),
36479        }
36480    }
36481}
36482
36483impl std::default::Default for DataScanType {
36484    fn default() -> Self {
36485        use std::convert::From;
36486        Self::from(0)
36487    }
36488}
36489
36490impl std::fmt::Display for DataScanType {
36491    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36492        wkt::internal::display_enum(f, self.name(), self.value())
36493    }
36494}
36495
36496impl std::convert::From<i32> for DataScanType {
36497    fn from(value: i32) -> Self {
36498        match value {
36499            0 => Self::Unspecified,
36500            1 => Self::DataQuality,
36501            2 => Self::DataProfile,
36502            3 => Self::DataDiscovery,
36503            4 => Self::DataDocumentation,
36504            _ => Self::UnknownValue(data_scan_type::UnknownValue(
36505                wkt::internal::UnknownEnumValue::Integer(value),
36506            )),
36507        }
36508    }
36509}
36510
36511impl std::convert::From<&str> for DataScanType {
36512    fn from(value: &str) -> Self {
36513        use std::string::ToString;
36514        match value {
36515            "DATA_SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
36516            "DATA_QUALITY" => Self::DataQuality,
36517            "DATA_PROFILE" => Self::DataProfile,
36518            "DATA_DISCOVERY" => Self::DataDiscovery,
36519            "DATA_DOCUMENTATION" => Self::DataDocumentation,
36520            _ => Self::UnknownValue(data_scan_type::UnknownValue(
36521                wkt::internal::UnknownEnumValue::String(value.to_string()),
36522            )),
36523        }
36524    }
36525}
36526
36527impl serde::ser::Serialize for DataScanType {
36528    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36529    where
36530        S: serde::Serializer,
36531    {
36532        match self {
36533            Self::Unspecified => serializer.serialize_i32(0),
36534            Self::DataQuality => serializer.serialize_i32(1),
36535            Self::DataProfile => serializer.serialize_i32(2),
36536            Self::DataDiscovery => serializer.serialize_i32(3),
36537            Self::DataDocumentation => serializer.serialize_i32(4),
36538            Self::UnknownValue(u) => u.0.serialize(serializer),
36539        }
36540    }
36541}
36542
36543impl<'de> serde::de::Deserialize<'de> for DataScanType {
36544    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36545    where
36546        D: serde::Deserializer<'de>,
36547    {
36548        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanType>::new(
36549            ".google.cloud.dataplex.v1.DataScanType",
36550        ))
36551    }
36552}
36553
36554/// Identifies the cloud system that manages the data storage.
36555///
36556/// # Working with unknown values
36557///
36558/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36559/// additional enum variants at any time. Adding new variants is not considered
36560/// a breaking change. Applications should write their code in anticipation of:
36561///
36562/// - New values appearing in future releases of the client library, **and**
36563/// - New values received dynamically, without application changes.
36564///
36565/// Please consult the [Working with enums] section in the user guide for some
36566/// guidelines.
36567///
36568/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36569#[derive(Clone, Debug, PartialEq)]
36570#[non_exhaustive]
36571pub enum StorageSystem {
36572    /// Storage system unspecified.
36573    Unspecified,
36574    /// The entity data is contained within a Cloud Storage bucket.
36575    CloudStorage,
36576    /// The entity data is contained within a BigQuery dataset.
36577    Bigquery,
36578    /// If set, the enum was initialized with an unknown value.
36579    ///
36580    /// Applications can examine the value using [StorageSystem::value] or
36581    /// [StorageSystem::name].
36582    UnknownValue(storage_system::UnknownValue),
36583}
36584
36585#[doc(hidden)]
36586pub mod storage_system {
36587    #[allow(unused_imports)]
36588    use super::*;
36589    #[derive(Clone, Debug, PartialEq)]
36590    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36591}
36592
36593impl StorageSystem {
36594    /// Gets the enum value.
36595    ///
36596    /// Returns `None` if the enum contains an unknown value deserialized from
36597    /// the string representation of enums.
36598    pub fn value(&self) -> std::option::Option<i32> {
36599        match self {
36600            Self::Unspecified => std::option::Option::Some(0),
36601            Self::CloudStorage => std::option::Option::Some(1),
36602            Self::Bigquery => std::option::Option::Some(2),
36603            Self::UnknownValue(u) => u.0.value(),
36604        }
36605    }
36606
36607    /// Gets the enum value as a string.
36608    ///
36609    /// Returns `None` if the enum contains an unknown value deserialized from
36610    /// the integer representation of enums.
36611    pub fn name(&self) -> std::option::Option<&str> {
36612        match self {
36613            Self::Unspecified => std::option::Option::Some("STORAGE_SYSTEM_UNSPECIFIED"),
36614            Self::CloudStorage => std::option::Option::Some("CLOUD_STORAGE"),
36615            Self::Bigquery => std::option::Option::Some("BIGQUERY"),
36616            Self::UnknownValue(u) => u.0.name(),
36617        }
36618    }
36619}
36620
36621impl std::default::Default for StorageSystem {
36622    fn default() -> Self {
36623        use std::convert::From;
36624        Self::from(0)
36625    }
36626}
36627
36628impl std::fmt::Display for StorageSystem {
36629    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36630        wkt::internal::display_enum(f, self.name(), self.value())
36631    }
36632}
36633
36634impl std::convert::From<i32> for StorageSystem {
36635    fn from(value: i32) -> Self {
36636        match value {
36637            0 => Self::Unspecified,
36638            1 => Self::CloudStorage,
36639            2 => Self::Bigquery,
36640            _ => Self::UnknownValue(storage_system::UnknownValue(
36641                wkt::internal::UnknownEnumValue::Integer(value),
36642            )),
36643        }
36644    }
36645}
36646
36647impl std::convert::From<&str> for StorageSystem {
36648    fn from(value: &str) -> Self {
36649        use std::string::ToString;
36650        match value {
36651            "STORAGE_SYSTEM_UNSPECIFIED" => Self::Unspecified,
36652            "CLOUD_STORAGE" => Self::CloudStorage,
36653            "BIGQUERY" => Self::Bigquery,
36654            _ => Self::UnknownValue(storage_system::UnknownValue(
36655                wkt::internal::UnknownEnumValue::String(value.to_string()),
36656            )),
36657        }
36658    }
36659}
36660
36661impl serde::ser::Serialize for StorageSystem {
36662    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36663    where
36664        S: serde::Serializer,
36665    {
36666        match self {
36667            Self::Unspecified => serializer.serialize_i32(0),
36668            Self::CloudStorage => serializer.serialize_i32(1),
36669            Self::Bigquery => serializer.serialize_i32(2),
36670            Self::UnknownValue(u) => u.0.serialize(serializer),
36671        }
36672    }
36673}
36674
36675impl<'de> serde::de::Deserialize<'de> for StorageSystem {
36676    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36677    where
36678        D: serde::Deserializer<'de>,
36679    {
36680        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageSystem>::new(
36681            ".google.cloud.dataplex.v1.StorageSystem",
36682        ))
36683    }
36684}
36685
36686/// State of a resource.
36687///
36688/// # Working with unknown values
36689///
36690/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36691/// additional enum variants at any time. Adding new variants is not considered
36692/// a breaking change. Applications should write their code in anticipation of:
36693///
36694/// - New values appearing in future releases of the client library, **and**
36695/// - New values received dynamically, without application changes.
36696///
36697/// Please consult the [Working with enums] section in the user guide for some
36698/// guidelines.
36699///
36700/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36701#[derive(Clone, Debug, PartialEq)]
36702#[non_exhaustive]
36703pub enum State {
36704    /// State is not specified.
36705    Unspecified,
36706    /// Resource is active, i.e., ready to use.
36707    Active,
36708    /// Resource is under creation.
36709    Creating,
36710    /// Resource is under deletion.
36711    Deleting,
36712    /// Resource is active but has unresolved actions.
36713    ActionRequired,
36714    /// If set, the enum was initialized with an unknown value.
36715    ///
36716    /// Applications can examine the value using [State::value] or
36717    /// [State::name].
36718    UnknownValue(state::UnknownValue),
36719}
36720
36721#[doc(hidden)]
36722pub mod state {
36723    #[allow(unused_imports)]
36724    use super::*;
36725    #[derive(Clone, Debug, PartialEq)]
36726    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36727}
36728
36729impl State {
36730    /// Gets the enum value.
36731    ///
36732    /// Returns `None` if the enum contains an unknown value deserialized from
36733    /// the string representation of enums.
36734    pub fn value(&self) -> std::option::Option<i32> {
36735        match self {
36736            Self::Unspecified => std::option::Option::Some(0),
36737            Self::Active => std::option::Option::Some(1),
36738            Self::Creating => std::option::Option::Some(2),
36739            Self::Deleting => std::option::Option::Some(3),
36740            Self::ActionRequired => std::option::Option::Some(4),
36741            Self::UnknownValue(u) => u.0.value(),
36742        }
36743    }
36744
36745    /// Gets the enum value as a string.
36746    ///
36747    /// Returns `None` if the enum contains an unknown value deserialized from
36748    /// the integer representation of enums.
36749    pub fn name(&self) -> std::option::Option<&str> {
36750        match self {
36751            Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
36752            Self::Active => std::option::Option::Some("ACTIVE"),
36753            Self::Creating => std::option::Option::Some("CREATING"),
36754            Self::Deleting => std::option::Option::Some("DELETING"),
36755            Self::ActionRequired => std::option::Option::Some("ACTION_REQUIRED"),
36756            Self::UnknownValue(u) => u.0.name(),
36757        }
36758    }
36759}
36760
36761impl std::default::Default for State {
36762    fn default() -> Self {
36763        use std::convert::From;
36764        Self::from(0)
36765    }
36766}
36767
36768impl std::fmt::Display for State {
36769    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36770        wkt::internal::display_enum(f, self.name(), self.value())
36771    }
36772}
36773
36774impl std::convert::From<i32> for State {
36775    fn from(value: i32) -> Self {
36776        match value {
36777            0 => Self::Unspecified,
36778            1 => Self::Active,
36779            2 => Self::Creating,
36780            3 => Self::Deleting,
36781            4 => Self::ActionRequired,
36782            _ => Self::UnknownValue(state::UnknownValue(
36783                wkt::internal::UnknownEnumValue::Integer(value),
36784            )),
36785        }
36786    }
36787}
36788
36789impl std::convert::From<&str> for State {
36790    fn from(value: &str) -> Self {
36791        use std::string::ToString;
36792        match value {
36793            "STATE_UNSPECIFIED" => Self::Unspecified,
36794            "ACTIVE" => Self::Active,
36795            "CREATING" => Self::Creating,
36796            "DELETING" => Self::Deleting,
36797            "ACTION_REQUIRED" => Self::ActionRequired,
36798            _ => Self::UnknownValue(state::UnknownValue(
36799                wkt::internal::UnknownEnumValue::String(value.to_string()),
36800            )),
36801        }
36802    }
36803}
36804
36805impl serde::ser::Serialize for State {
36806    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36807    where
36808        S: serde::Serializer,
36809    {
36810        match self {
36811            Self::Unspecified => serializer.serialize_i32(0),
36812            Self::Active => serializer.serialize_i32(1),
36813            Self::Creating => serializer.serialize_i32(2),
36814            Self::Deleting => serializer.serialize_i32(3),
36815            Self::ActionRequired => serializer.serialize_i32(4),
36816            Self::UnknownValue(u) => u.0.serialize(serializer),
36817        }
36818    }
36819}
36820
36821impl<'de> serde::de::Deserialize<'de> for State {
36822    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36823    where
36824        D: serde::Deserializer<'de>,
36825    {
36826        deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
36827            ".google.cloud.dataplex.v1.State",
36828        ))
36829    }
36830}