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    ///
96    /// # Example
97    /// ```ignore,no_run
98    /// # use google_cloud_dataplex_v1::model::Environment;
99    /// let x = Environment::new().set_name("example");
100    /// ```
101    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102        self.name = v.into();
103        self
104    }
105
106    /// Sets the value of [display_name][crate::model::Environment::display_name].
107    ///
108    /// # Example
109    /// ```ignore,no_run
110    /// # use google_cloud_dataplex_v1::model::Environment;
111    /// let x = Environment::new().set_display_name("example");
112    /// ```
113    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
114        self.display_name = v.into();
115        self
116    }
117
118    /// Sets the value of [uid][crate::model::Environment::uid].
119    ///
120    /// # Example
121    /// ```ignore,no_run
122    /// # use google_cloud_dataplex_v1::model::Environment;
123    /// let x = Environment::new().set_uid("example");
124    /// ```
125    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
126        self.uid = v.into();
127        self
128    }
129
130    /// Sets the value of [create_time][crate::model::Environment::create_time].
131    ///
132    /// # Example
133    /// ```ignore,no_run
134    /// # use google_cloud_dataplex_v1::model::Environment;
135    /// use wkt::Timestamp;
136    /// let x = Environment::new().set_create_time(Timestamp::default()/* use setters */);
137    /// ```
138    pub fn set_create_time<T>(mut self, v: T) -> Self
139    where
140        T: std::convert::Into<wkt::Timestamp>,
141    {
142        self.create_time = std::option::Option::Some(v.into());
143        self
144    }
145
146    /// Sets or clears the value of [create_time][crate::model::Environment::create_time].
147    ///
148    /// # Example
149    /// ```ignore,no_run
150    /// # use google_cloud_dataplex_v1::model::Environment;
151    /// use wkt::Timestamp;
152    /// let x = Environment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
153    /// let x = Environment::new().set_or_clear_create_time(None::<Timestamp>);
154    /// ```
155    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
156    where
157        T: std::convert::Into<wkt::Timestamp>,
158    {
159        self.create_time = v.map(|x| x.into());
160        self
161    }
162
163    /// Sets the value of [update_time][crate::model::Environment::update_time].
164    ///
165    /// # Example
166    /// ```ignore,no_run
167    /// # use google_cloud_dataplex_v1::model::Environment;
168    /// use wkt::Timestamp;
169    /// let x = Environment::new().set_update_time(Timestamp::default()/* use setters */);
170    /// ```
171    pub fn set_update_time<T>(mut self, v: T) -> Self
172    where
173        T: std::convert::Into<wkt::Timestamp>,
174    {
175        self.update_time = std::option::Option::Some(v.into());
176        self
177    }
178
179    /// Sets or clears the value of [update_time][crate::model::Environment::update_time].
180    ///
181    /// # Example
182    /// ```ignore,no_run
183    /// # use google_cloud_dataplex_v1::model::Environment;
184    /// use wkt::Timestamp;
185    /// let x = Environment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
186    /// let x = Environment::new().set_or_clear_update_time(None::<Timestamp>);
187    /// ```
188    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
189    where
190        T: std::convert::Into<wkt::Timestamp>,
191    {
192        self.update_time = v.map(|x| x.into());
193        self
194    }
195
196    /// Sets the value of [labels][crate::model::Environment::labels].
197    ///
198    /// # Example
199    /// ```ignore,no_run
200    /// # use google_cloud_dataplex_v1::model::Environment;
201    /// let x = Environment::new().set_labels([
202    ///     ("key0", "abc"),
203    ///     ("key1", "xyz"),
204    /// ]);
205    /// ```
206    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
207    where
208        T: std::iter::IntoIterator<Item = (K, V)>,
209        K: std::convert::Into<std::string::String>,
210        V: std::convert::Into<std::string::String>,
211    {
212        use std::iter::Iterator;
213        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
214        self
215    }
216
217    /// Sets the value of [description][crate::model::Environment::description].
218    ///
219    /// # Example
220    /// ```ignore,no_run
221    /// # use google_cloud_dataplex_v1::model::Environment;
222    /// let x = Environment::new().set_description("example");
223    /// ```
224    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
225        self.description = v.into();
226        self
227    }
228
229    /// Sets the value of [state][crate::model::Environment::state].
230    ///
231    /// # Example
232    /// ```ignore,no_run
233    /// # use google_cloud_dataplex_v1::model::Environment;
234    /// use google_cloud_dataplex_v1::model::State;
235    /// let x0 = Environment::new().set_state(State::Active);
236    /// let x1 = Environment::new().set_state(State::Creating);
237    /// let x2 = Environment::new().set_state(State::Deleting);
238    /// ```
239    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
240        self.state = v.into();
241        self
242    }
243
244    /// Sets the value of [infrastructure_spec][crate::model::Environment::infrastructure_spec].
245    ///
246    /// # Example
247    /// ```ignore,no_run
248    /// # use google_cloud_dataplex_v1::model::Environment;
249    /// use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
250    /// let x = Environment::new().set_infrastructure_spec(InfrastructureSpec::default()/* use setters */);
251    /// ```
252    pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
253    where
254        T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
255    {
256        self.infrastructure_spec = std::option::Option::Some(v.into());
257        self
258    }
259
260    /// Sets or clears the value of [infrastructure_spec][crate::model::Environment::infrastructure_spec].
261    ///
262    /// # Example
263    /// ```ignore,no_run
264    /// # use google_cloud_dataplex_v1::model::Environment;
265    /// use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
266    /// let x = Environment::new().set_or_clear_infrastructure_spec(Some(InfrastructureSpec::default()/* use setters */));
267    /// let x = Environment::new().set_or_clear_infrastructure_spec(None::<InfrastructureSpec>);
268    /// ```
269    pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
270    where
271        T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
272    {
273        self.infrastructure_spec = v.map(|x| x.into());
274        self
275    }
276
277    /// Sets the value of [session_spec][crate::model::Environment::session_spec].
278    ///
279    /// # Example
280    /// ```ignore,no_run
281    /// # use google_cloud_dataplex_v1::model::Environment;
282    /// use google_cloud_dataplex_v1::model::environment::SessionSpec;
283    /// let x = Environment::new().set_session_spec(SessionSpec::default()/* use setters */);
284    /// ```
285    pub fn set_session_spec<T>(mut self, v: T) -> Self
286    where
287        T: std::convert::Into<crate::model::environment::SessionSpec>,
288    {
289        self.session_spec = std::option::Option::Some(v.into());
290        self
291    }
292
293    /// Sets or clears the value of [session_spec][crate::model::Environment::session_spec].
294    ///
295    /// # Example
296    /// ```ignore,no_run
297    /// # use google_cloud_dataplex_v1::model::Environment;
298    /// use google_cloud_dataplex_v1::model::environment::SessionSpec;
299    /// let x = Environment::new().set_or_clear_session_spec(Some(SessionSpec::default()/* use setters */));
300    /// let x = Environment::new().set_or_clear_session_spec(None::<SessionSpec>);
301    /// ```
302    pub fn set_or_clear_session_spec<T>(mut self, v: std::option::Option<T>) -> Self
303    where
304        T: std::convert::Into<crate::model::environment::SessionSpec>,
305    {
306        self.session_spec = v.map(|x| x.into());
307        self
308    }
309
310    /// Sets the value of [session_status][crate::model::Environment::session_status].
311    ///
312    /// # Example
313    /// ```ignore,no_run
314    /// # use google_cloud_dataplex_v1::model::Environment;
315    /// use google_cloud_dataplex_v1::model::environment::SessionStatus;
316    /// let x = Environment::new().set_session_status(SessionStatus::default()/* use setters */);
317    /// ```
318    pub fn set_session_status<T>(mut self, v: T) -> Self
319    where
320        T: std::convert::Into<crate::model::environment::SessionStatus>,
321    {
322        self.session_status = std::option::Option::Some(v.into());
323        self
324    }
325
326    /// Sets or clears the value of [session_status][crate::model::Environment::session_status].
327    ///
328    /// # Example
329    /// ```ignore,no_run
330    /// # use google_cloud_dataplex_v1::model::Environment;
331    /// use google_cloud_dataplex_v1::model::environment::SessionStatus;
332    /// let x = Environment::new().set_or_clear_session_status(Some(SessionStatus::default()/* use setters */));
333    /// let x = Environment::new().set_or_clear_session_status(None::<SessionStatus>);
334    /// ```
335    pub fn set_or_clear_session_status<T>(mut self, v: std::option::Option<T>) -> Self
336    where
337        T: std::convert::Into<crate::model::environment::SessionStatus>,
338    {
339        self.session_status = v.map(|x| x.into());
340        self
341    }
342
343    /// Sets the value of [endpoints][crate::model::Environment::endpoints].
344    ///
345    /// # Example
346    /// ```ignore,no_run
347    /// # use google_cloud_dataplex_v1::model::Environment;
348    /// use google_cloud_dataplex_v1::model::environment::Endpoints;
349    /// let x = Environment::new().set_endpoints(Endpoints::default()/* use setters */);
350    /// ```
351    pub fn set_endpoints<T>(mut self, v: T) -> Self
352    where
353        T: std::convert::Into<crate::model::environment::Endpoints>,
354    {
355        self.endpoints = std::option::Option::Some(v.into());
356        self
357    }
358
359    /// Sets or clears the value of [endpoints][crate::model::Environment::endpoints].
360    ///
361    /// # Example
362    /// ```ignore,no_run
363    /// # use google_cloud_dataplex_v1::model::Environment;
364    /// use google_cloud_dataplex_v1::model::environment::Endpoints;
365    /// let x = Environment::new().set_or_clear_endpoints(Some(Endpoints::default()/* use setters */));
366    /// let x = Environment::new().set_or_clear_endpoints(None::<Endpoints>);
367    /// ```
368    pub fn set_or_clear_endpoints<T>(mut self, v: std::option::Option<T>) -> Self
369    where
370        T: std::convert::Into<crate::model::environment::Endpoints>,
371    {
372        self.endpoints = v.map(|x| x.into());
373        self
374    }
375}
376
377impl wkt::message::Message for Environment {
378    fn typename() -> &'static str {
379        "type.googleapis.com/google.cloud.dataplex.v1.Environment"
380    }
381}
382
383/// Defines additional types related to [Environment].
384pub mod environment {
385    #[allow(unused_imports)]
386    use super::*;
387
388    /// Configuration for the underlying infrastructure used to run workloads.
389    #[derive(Clone, Default, PartialEq)]
390    #[non_exhaustive]
391    pub struct InfrastructureSpec {
392        /// Hardware config
393        pub resources:
394            std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
395
396        /// Software config
397        pub runtime: std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
398
399        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
400    }
401
402    impl InfrastructureSpec {
403        pub fn new() -> Self {
404            std::default::Default::default()
405        }
406
407        /// Sets the value of [resources][crate::model::environment::InfrastructureSpec::resources].
408        ///
409        /// Note that all the setters affecting `resources` are mutually
410        /// exclusive.
411        ///
412        /// # Example
413        /// ```ignore,no_run
414        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
415        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
416        /// let x = InfrastructureSpec::new().set_resources(Some(
417        ///     google_cloud_dataplex_v1::model::environment::infrastructure_spec::Resources::Compute(ComputeResources::default().into())));
418        /// ```
419        pub fn set_resources<
420            T: std::convert::Into<
421                    std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
422                >,
423        >(
424            mut self,
425            v: T,
426        ) -> Self {
427            self.resources = v.into();
428            self
429        }
430
431        /// The value of [resources][crate::model::environment::InfrastructureSpec::resources]
432        /// if it holds a `Compute`, `None` if the field is not set or
433        /// holds a different branch.
434        pub fn compute(
435            &self,
436        ) -> std::option::Option<
437            &std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
438        > {
439            #[allow(unreachable_patterns)]
440            self.resources.as_ref().and_then(|v| match v {
441                crate::model::environment::infrastructure_spec::Resources::Compute(v) => {
442                    std::option::Option::Some(v)
443                }
444                _ => std::option::Option::None,
445            })
446        }
447
448        /// Sets the value of [resources][crate::model::environment::InfrastructureSpec::resources]
449        /// to hold a `Compute`.
450        ///
451        /// Note that all the setters affecting `resources` are
452        /// mutually exclusive.
453        ///
454        /// # Example
455        /// ```ignore,no_run
456        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
457        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
458        /// let x = InfrastructureSpec::new().set_compute(ComputeResources::default()/* use setters */);
459        /// assert!(x.compute().is_some());
460        /// ```
461        pub fn set_compute<
462            T: std::convert::Into<
463                    std::boxed::Box<
464                        crate::model::environment::infrastructure_spec::ComputeResources,
465                    >,
466                >,
467        >(
468            mut self,
469            v: T,
470        ) -> Self {
471            self.resources = std::option::Option::Some(
472                crate::model::environment::infrastructure_spec::Resources::Compute(v.into()),
473            );
474            self
475        }
476
477        /// Sets the value of [runtime][crate::model::environment::InfrastructureSpec::runtime].
478        ///
479        /// Note that all the setters affecting `runtime` are mutually
480        /// exclusive.
481        ///
482        /// # Example
483        /// ```ignore,no_run
484        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
485        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
486        /// let x = InfrastructureSpec::new().set_runtime(Some(
487        ///     google_cloud_dataplex_v1::model::environment::infrastructure_spec::Runtime::OsImage(OsImageRuntime::default().into())));
488        /// ```
489        pub fn set_runtime<
490            T: std::convert::Into<
491                    std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
492                >,
493        >(
494            mut self,
495            v: T,
496        ) -> Self {
497            self.runtime = v.into();
498            self
499        }
500
501        /// The value of [runtime][crate::model::environment::InfrastructureSpec::runtime]
502        /// if it holds a `OsImage`, `None` if the field is not set or
503        /// holds a different branch.
504        pub fn os_image(
505            &self,
506        ) -> std::option::Option<
507            &std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
508        > {
509            #[allow(unreachable_patterns)]
510            self.runtime.as_ref().and_then(|v| match v {
511                crate::model::environment::infrastructure_spec::Runtime::OsImage(v) => {
512                    std::option::Option::Some(v)
513                }
514                _ => std::option::Option::None,
515            })
516        }
517
518        /// Sets the value of [runtime][crate::model::environment::InfrastructureSpec::runtime]
519        /// to hold a `OsImage`.
520        ///
521        /// Note that all the setters affecting `runtime` are
522        /// mutually exclusive.
523        ///
524        /// # Example
525        /// ```ignore,no_run
526        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
527        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
528        /// let x = InfrastructureSpec::new().set_os_image(OsImageRuntime::default()/* use setters */);
529        /// assert!(x.os_image().is_some());
530        /// ```
531        pub fn set_os_image<
532            T: std::convert::Into<
533                    std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
534                >,
535        >(
536            mut self,
537            v: T,
538        ) -> Self {
539            self.runtime = std::option::Option::Some(
540                crate::model::environment::infrastructure_spec::Runtime::OsImage(v.into()),
541            );
542            self
543        }
544    }
545
546    impl wkt::message::Message for InfrastructureSpec {
547        fn typename() -> &'static str {
548            "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec"
549        }
550    }
551
552    /// Defines additional types related to [InfrastructureSpec].
553    pub mod infrastructure_spec {
554        #[allow(unused_imports)]
555        use super::*;
556
557        /// Compute resources associated with the analyze interactive workloads.
558        #[derive(Clone, Default, PartialEq)]
559        #[non_exhaustive]
560        pub struct ComputeResources {
561            /// Optional. Size in GB of the disk. Default is 100 GB.
562            pub disk_size_gb: i32,
563
564            /// Optional. Total number of nodes in the sessions created for this
565            /// environment.
566            pub node_count: i32,
567
568            /// Optional. Max configurable nodes.
569            /// If max_node_count > node_count, then auto-scaling is enabled.
570            pub max_node_count: i32,
571
572            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
573        }
574
575        impl ComputeResources {
576            pub fn new() -> Self {
577                std::default::Default::default()
578            }
579
580            /// Sets the value of [disk_size_gb][crate::model::environment::infrastructure_spec::ComputeResources::disk_size_gb].
581            ///
582            /// # Example
583            /// ```ignore,no_run
584            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
585            /// let x = ComputeResources::new().set_disk_size_gb(42);
586            /// ```
587            pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
588                self.disk_size_gb = v.into();
589                self
590            }
591
592            /// Sets the value of [node_count][crate::model::environment::infrastructure_spec::ComputeResources::node_count].
593            ///
594            /// # Example
595            /// ```ignore,no_run
596            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
597            /// let x = ComputeResources::new().set_node_count(42);
598            /// ```
599            pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
600                self.node_count = v.into();
601                self
602            }
603
604            /// Sets the value of [max_node_count][crate::model::environment::infrastructure_spec::ComputeResources::max_node_count].
605            ///
606            /// # Example
607            /// ```ignore,no_run
608            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
609            /// let x = ComputeResources::new().set_max_node_count(42);
610            /// ```
611            pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
612                self.max_node_count = v.into();
613                self
614            }
615        }
616
617        impl wkt::message::Message for ComputeResources {
618            fn typename() -> &'static str {
619                "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources"
620            }
621        }
622
623        /// Software Runtime Configuration to run Analyze.
624        #[derive(Clone, Default, PartialEq)]
625        #[non_exhaustive]
626        pub struct OsImageRuntime {
627            /// Required. Dataplex Universal Catalog Image version.
628            pub image_version: std::string::String,
629
630            /// Optional. List of Java jars to be included in the runtime environment.
631            /// Valid input includes Cloud Storage URIs to Jar binaries.
632            /// For example, gs://bucket-name/my/path/to/file.jar
633            pub java_libraries: std::vec::Vec<std::string::String>,
634
635            /// Optional. A list of python packages to be installed.
636            /// Valid formats include Cloud Storage URI to a PIP installable library.
637            /// For example, gs://bucket-name/my/path/to/lib.tar.gz
638            pub python_packages: std::vec::Vec<std::string::String>,
639
640            /// Optional. Spark properties to provide configuration for use in sessions
641            /// created for this environment. The properties to set on daemon config
642            /// files. Property keys are specified in `prefix:property` format. The
643            /// prefix must be "spark".
644            pub properties: std::collections::HashMap<std::string::String, std::string::String>,
645
646            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
647        }
648
649        impl OsImageRuntime {
650            pub fn new() -> Self {
651                std::default::Default::default()
652            }
653
654            /// Sets the value of [image_version][crate::model::environment::infrastructure_spec::OsImageRuntime::image_version].
655            ///
656            /// # Example
657            /// ```ignore,no_run
658            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
659            /// let x = OsImageRuntime::new().set_image_version("example");
660            /// ```
661            pub fn set_image_version<T: std::convert::Into<std::string::String>>(
662                mut self,
663                v: T,
664            ) -> Self {
665                self.image_version = v.into();
666                self
667            }
668
669            /// Sets the value of [java_libraries][crate::model::environment::infrastructure_spec::OsImageRuntime::java_libraries].
670            ///
671            /// # Example
672            /// ```ignore,no_run
673            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
674            /// let x = OsImageRuntime::new().set_java_libraries(["a", "b", "c"]);
675            /// ```
676            pub fn set_java_libraries<T, V>(mut self, v: T) -> Self
677            where
678                T: std::iter::IntoIterator<Item = V>,
679                V: std::convert::Into<std::string::String>,
680            {
681                use std::iter::Iterator;
682                self.java_libraries = v.into_iter().map(|i| i.into()).collect();
683                self
684            }
685
686            /// Sets the value of [python_packages][crate::model::environment::infrastructure_spec::OsImageRuntime::python_packages].
687            ///
688            /// # Example
689            /// ```ignore,no_run
690            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
691            /// let x = OsImageRuntime::new().set_python_packages(["a", "b", "c"]);
692            /// ```
693            pub fn set_python_packages<T, V>(mut self, v: T) -> Self
694            where
695                T: std::iter::IntoIterator<Item = V>,
696                V: std::convert::Into<std::string::String>,
697            {
698                use std::iter::Iterator;
699                self.python_packages = v.into_iter().map(|i| i.into()).collect();
700                self
701            }
702
703            /// Sets the value of [properties][crate::model::environment::infrastructure_spec::OsImageRuntime::properties].
704            ///
705            /// # Example
706            /// ```ignore,no_run
707            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
708            /// let x = OsImageRuntime::new().set_properties([
709            ///     ("key0", "abc"),
710            ///     ("key1", "xyz"),
711            /// ]);
712            /// ```
713            pub fn set_properties<T, K, V>(mut self, v: T) -> Self
714            where
715                T: std::iter::IntoIterator<Item = (K, V)>,
716                K: std::convert::Into<std::string::String>,
717                V: std::convert::Into<std::string::String>,
718            {
719                use std::iter::Iterator;
720                self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
721                self
722            }
723        }
724
725        impl wkt::message::Message for OsImageRuntime {
726            fn typename() -> &'static str {
727                "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime"
728            }
729        }
730
731        /// Hardware config
732        #[derive(Clone, Debug, PartialEq)]
733        #[non_exhaustive]
734        pub enum Resources {
735            /// Optional. Compute resources needed for analyze interactive workloads.
736            Compute(
737                std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
738            ),
739        }
740
741        /// Software config
742        #[derive(Clone, Debug, PartialEq)]
743        #[non_exhaustive]
744        pub enum Runtime {
745            /// Required. Software Runtime Configuration for analyze interactive
746            /// workloads.
747            OsImage(
748                std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
749            ),
750        }
751    }
752
753    /// Configuration for sessions created for this environment.
754    #[derive(Clone, Default, PartialEq)]
755    #[non_exhaustive]
756    pub struct SessionSpec {
757        /// Optional. The idle time configuration of the session. The session will be
758        /// auto-terminated at the end of this period.
759        pub max_idle_duration: std::option::Option<wkt::Duration>,
760
761        /// Optional. If True, this causes sessions to be pre-created and available
762        /// for faster startup to enable interactive exploration use-cases. This
763        /// defaults to False to avoid additional billed charges. These can only be
764        /// set to True for the environment with name set to "default", and with
765        /// default configuration.
766        pub enable_fast_startup: bool,
767
768        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
769    }
770
771    impl SessionSpec {
772        pub fn new() -> Self {
773            std::default::Default::default()
774        }
775
776        /// Sets the value of [max_idle_duration][crate::model::environment::SessionSpec::max_idle_duration].
777        ///
778        /// # Example
779        /// ```ignore,no_run
780        /// # use google_cloud_dataplex_v1::model::environment::SessionSpec;
781        /// use wkt::Duration;
782        /// let x = SessionSpec::new().set_max_idle_duration(Duration::default()/* use setters */);
783        /// ```
784        pub fn set_max_idle_duration<T>(mut self, v: T) -> Self
785        where
786            T: std::convert::Into<wkt::Duration>,
787        {
788            self.max_idle_duration = std::option::Option::Some(v.into());
789            self
790        }
791
792        /// Sets or clears the value of [max_idle_duration][crate::model::environment::SessionSpec::max_idle_duration].
793        ///
794        /// # Example
795        /// ```ignore,no_run
796        /// # use google_cloud_dataplex_v1::model::environment::SessionSpec;
797        /// use wkt::Duration;
798        /// let x = SessionSpec::new().set_or_clear_max_idle_duration(Some(Duration::default()/* use setters */));
799        /// let x = SessionSpec::new().set_or_clear_max_idle_duration(None::<Duration>);
800        /// ```
801        pub fn set_or_clear_max_idle_duration<T>(mut self, v: std::option::Option<T>) -> Self
802        where
803            T: std::convert::Into<wkt::Duration>,
804        {
805            self.max_idle_duration = v.map(|x| x.into());
806            self
807        }
808
809        /// Sets the value of [enable_fast_startup][crate::model::environment::SessionSpec::enable_fast_startup].
810        ///
811        /// # Example
812        /// ```ignore,no_run
813        /// # use google_cloud_dataplex_v1::model::environment::SessionSpec;
814        /// let x = SessionSpec::new().set_enable_fast_startup(true);
815        /// ```
816        pub fn set_enable_fast_startup<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
817            self.enable_fast_startup = v.into();
818            self
819        }
820    }
821
822    impl wkt::message::Message for SessionSpec {
823        fn typename() -> &'static str {
824            "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionSpec"
825        }
826    }
827
828    /// Status of sessions created for this environment.
829    #[derive(Clone, Default, PartialEq)]
830    #[non_exhaustive]
831    pub struct SessionStatus {
832        /// Output only. Queries over sessions to mark whether the environment is
833        /// currently active or not
834        pub active: bool,
835
836        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
837    }
838
839    impl SessionStatus {
840        pub fn new() -> Self {
841            std::default::Default::default()
842        }
843
844        /// Sets the value of [active][crate::model::environment::SessionStatus::active].
845        ///
846        /// # Example
847        /// ```ignore,no_run
848        /// # use google_cloud_dataplex_v1::model::environment::SessionStatus;
849        /// let x = SessionStatus::new().set_active(true);
850        /// ```
851        pub fn set_active<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
852            self.active = v.into();
853            self
854        }
855    }
856
857    impl wkt::message::Message for SessionStatus {
858        fn typename() -> &'static str {
859            "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionStatus"
860        }
861    }
862
863    /// URI Endpoints to access sessions associated with the Environment.
864    #[derive(Clone, Default, PartialEq)]
865    #[non_exhaustive]
866    pub struct Endpoints {
867        /// Output only. URI to serve notebook APIs
868        pub notebooks: std::string::String,
869
870        /// Output only. URI to serve SQL APIs
871        pub sql: std::string::String,
872
873        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
874    }
875
876    impl Endpoints {
877        pub fn new() -> Self {
878            std::default::Default::default()
879        }
880
881        /// Sets the value of [notebooks][crate::model::environment::Endpoints::notebooks].
882        ///
883        /// # Example
884        /// ```ignore,no_run
885        /// # use google_cloud_dataplex_v1::model::environment::Endpoints;
886        /// let x = Endpoints::new().set_notebooks("example");
887        /// ```
888        pub fn set_notebooks<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
889            self.notebooks = v.into();
890            self
891        }
892
893        /// Sets the value of [sql][crate::model::environment::Endpoints::sql].
894        ///
895        /// # Example
896        /// ```ignore,no_run
897        /// # use google_cloud_dataplex_v1::model::environment::Endpoints;
898        /// let x = Endpoints::new().set_sql("example");
899        /// ```
900        pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
901            self.sql = v.into();
902            self
903        }
904    }
905
906    impl wkt::message::Message for Endpoints {
907        fn typename() -> &'static str {
908            "type.googleapis.com/google.cloud.dataplex.v1.Environment.Endpoints"
909        }
910    }
911}
912
913/// Content represents a user-visible notebook or a sql script
914#[derive(Clone, Default, PartialEq)]
915#[non_exhaustive]
916pub struct Content {
917    /// Output only. The relative resource name of the content, of the form:
918    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
919    pub name: std::string::String,
920
921    /// Output only. System generated globally unique ID for the content. This ID
922    /// will be different if the content is deleted and re-created with the same
923    /// name.
924    pub uid: std::string::String,
925
926    /// Required. The path for the Content file, represented as directory
927    /// structure. Unique within a lake. Limited to alphanumerics, hyphens,
928    /// underscores, dots and slashes.
929    pub path: std::string::String,
930
931    /// Output only. Content creation time.
932    pub create_time: std::option::Option<wkt::Timestamp>,
933
934    /// Output only. The time when the content was last updated.
935    pub update_time: std::option::Option<wkt::Timestamp>,
936
937    /// Optional. User defined labels for the content.
938    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
939
940    /// Optional. Description of the content.
941    pub description: std::string::String,
942
943    /// Only returned in `GetContent` requests and not in `ListContent` request.
944    pub data: std::option::Option<crate::model::content::Data>,
945
946    /// Types of content
947    pub content: std::option::Option<crate::model::content::Content>,
948
949    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
950}
951
952impl Content {
953    pub fn new() -> Self {
954        std::default::Default::default()
955    }
956
957    /// Sets the value of [name][crate::model::Content::name].
958    ///
959    /// # Example
960    /// ```ignore,no_run
961    /// # use google_cloud_dataplex_v1::model::Content;
962    /// let x = Content::new().set_name("example");
963    /// ```
964    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
965        self.name = v.into();
966        self
967    }
968
969    /// Sets the value of [uid][crate::model::Content::uid].
970    ///
971    /// # Example
972    /// ```ignore,no_run
973    /// # use google_cloud_dataplex_v1::model::Content;
974    /// let x = Content::new().set_uid("example");
975    /// ```
976    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
977        self.uid = v.into();
978        self
979    }
980
981    /// Sets the value of [path][crate::model::Content::path].
982    ///
983    /// # Example
984    /// ```ignore,no_run
985    /// # use google_cloud_dataplex_v1::model::Content;
986    /// let x = Content::new().set_path("example");
987    /// ```
988    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
989        self.path = v.into();
990        self
991    }
992
993    /// Sets the value of [create_time][crate::model::Content::create_time].
994    ///
995    /// # Example
996    /// ```ignore,no_run
997    /// # use google_cloud_dataplex_v1::model::Content;
998    /// use wkt::Timestamp;
999    /// let x = Content::new().set_create_time(Timestamp::default()/* use setters */);
1000    /// ```
1001    pub fn set_create_time<T>(mut self, v: T) -> Self
1002    where
1003        T: std::convert::Into<wkt::Timestamp>,
1004    {
1005        self.create_time = std::option::Option::Some(v.into());
1006        self
1007    }
1008
1009    /// Sets or clears the value of [create_time][crate::model::Content::create_time].
1010    ///
1011    /// # Example
1012    /// ```ignore,no_run
1013    /// # use google_cloud_dataplex_v1::model::Content;
1014    /// use wkt::Timestamp;
1015    /// let x = Content::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1016    /// let x = Content::new().set_or_clear_create_time(None::<Timestamp>);
1017    /// ```
1018    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1019    where
1020        T: std::convert::Into<wkt::Timestamp>,
1021    {
1022        self.create_time = v.map(|x| x.into());
1023        self
1024    }
1025
1026    /// Sets the value of [update_time][crate::model::Content::update_time].
1027    ///
1028    /// # Example
1029    /// ```ignore,no_run
1030    /// # use google_cloud_dataplex_v1::model::Content;
1031    /// use wkt::Timestamp;
1032    /// let x = Content::new().set_update_time(Timestamp::default()/* use setters */);
1033    /// ```
1034    pub fn set_update_time<T>(mut self, v: T) -> Self
1035    where
1036        T: std::convert::Into<wkt::Timestamp>,
1037    {
1038        self.update_time = std::option::Option::Some(v.into());
1039        self
1040    }
1041
1042    /// Sets or clears the value of [update_time][crate::model::Content::update_time].
1043    ///
1044    /// # Example
1045    /// ```ignore,no_run
1046    /// # use google_cloud_dataplex_v1::model::Content;
1047    /// use wkt::Timestamp;
1048    /// let x = Content::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1049    /// let x = Content::new().set_or_clear_update_time(None::<Timestamp>);
1050    /// ```
1051    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1052    where
1053        T: std::convert::Into<wkt::Timestamp>,
1054    {
1055        self.update_time = v.map(|x| x.into());
1056        self
1057    }
1058
1059    /// Sets the value of [labels][crate::model::Content::labels].
1060    ///
1061    /// # Example
1062    /// ```ignore,no_run
1063    /// # use google_cloud_dataplex_v1::model::Content;
1064    /// let x = Content::new().set_labels([
1065    ///     ("key0", "abc"),
1066    ///     ("key1", "xyz"),
1067    /// ]);
1068    /// ```
1069    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1070    where
1071        T: std::iter::IntoIterator<Item = (K, V)>,
1072        K: std::convert::Into<std::string::String>,
1073        V: std::convert::Into<std::string::String>,
1074    {
1075        use std::iter::Iterator;
1076        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1077        self
1078    }
1079
1080    /// Sets the value of [description][crate::model::Content::description].
1081    ///
1082    /// # Example
1083    /// ```ignore,no_run
1084    /// # use google_cloud_dataplex_v1::model::Content;
1085    /// let x = Content::new().set_description("example");
1086    /// ```
1087    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1088        self.description = v.into();
1089        self
1090    }
1091
1092    /// Sets the value of [data][crate::model::Content::data].
1093    ///
1094    /// Note that all the setters affecting `data` are mutually
1095    /// exclusive.
1096    ///
1097    /// # Example
1098    /// ```ignore,no_run
1099    /// # use google_cloud_dataplex_v1::model::Content;
1100    /// use google_cloud_dataplex_v1::model::content::Data;
1101    /// let x = Content::new().set_data(Some(Data::DataText("example".to_string())));
1102    /// ```
1103    pub fn set_data<T: std::convert::Into<std::option::Option<crate::model::content::Data>>>(
1104        mut self,
1105        v: T,
1106    ) -> Self {
1107        self.data = v.into();
1108        self
1109    }
1110
1111    /// The value of [data][crate::model::Content::data]
1112    /// if it holds a `DataText`, `None` if the field is not set or
1113    /// holds a different branch.
1114    pub fn data_text(&self) -> std::option::Option<&std::string::String> {
1115        #[allow(unreachable_patterns)]
1116        self.data.as_ref().and_then(|v| match v {
1117            crate::model::content::Data::DataText(v) => std::option::Option::Some(v),
1118            _ => std::option::Option::None,
1119        })
1120    }
1121
1122    /// Sets the value of [data][crate::model::Content::data]
1123    /// to hold a `DataText`.
1124    ///
1125    /// Note that all the setters affecting `data` are
1126    /// mutually exclusive.
1127    ///
1128    /// # Example
1129    /// ```ignore,no_run
1130    /// # use google_cloud_dataplex_v1::model::Content;
1131    /// let x = Content::new().set_data_text("example");
1132    /// assert!(x.data_text().is_some());
1133    /// ```
1134    pub fn set_data_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1135        self.data = std::option::Option::Some(crate::model::content::Data::DataText(v.into()));
1136        self
1137    }
1138
1139    /// Sets the value of [content][crate::model::Content::content].
1140    ///
1141    /// Note that all the setters affecting `content` are mutually
1142    /// exclusive.
1143    ///
1144    /// # Example
1145    /// ```ignore,no_run
1146    /// # use google_cloud_dataplex_v1::model::Content;
1147    /// use google_cloud_dataplex_v1::model::content::SqlScript;
1148    /// let x = Content::new().set_content(Some(
1149    ///     google_cloud_dataplex_v1::model::content::Content::SqlScript(SqlScript::default().into())));
1150    /// ```
1151    pub fn set_content<
1152        T: std::convert::Into<std::option::Option<crate::model::content::Content>>,
1153    >(
1154        mut self,
1155        v: T,
1156    ) -> Self {
1157        self.content = v.into();
1158        self
1159    }
1160
1161    /// The value of [content][crate::model::Content::content]
1162    /// if it holds a `SqlScript`, `None` if the field is not set or
1163    /// holds a different branch.
1164    pub fn sql_script(
1165        &self,
1166    ) -> std::option::Option<&std::boxed::Box<crate::model::content::SqlScript>> {
1167        #[allow(unreachable_patterns)]
1168        self.content.as_ref().and_then(|v| match v {
1169            crate::model::content::Content::SqlScript(v) => std::option::Option::Some(v),
1170            _ => std::option::Option::None,
1171        })
1172    }
1173
1174    /// Sets the value of [content][crate::model::Content::content]
1175    /// to hold a `SqlScript`.
1176    ///
1177    /// Note that all the setters affecting `content` are
1178    /// mutually exclusive.
1179    ///
1180    /// # Example
1181    /// ```ignore,no_run
1182    /// # use google_cloud_dataplex_v1::model::Content;
1183    /// use google_cloud_dataplex_v1::model::content::SqlScript;
1184    /// let x = Content::new().set_sql_script(SqlScript::default()/* use setters */);
1185    /// assert!(x.sql_script().is_some());
1186    /// assert!(x.notebook().is_none());
1187    /// ```
1188    pub fn set_sql_script<
1189        T: std::convert::Into<std::boxed::Box<crate::model::content::SqlScript>>,
1190    >(
1191        mut self,
1192        v: T,
1193    ) -> Self {
1194        self.content =
1195            std::option::Option::Some(crate::model::content::Content::SqlScript(v.into()));
1196        self
1197    }
1198
1199    /// The value of [content][crate::model::Content::content]
1200    /// if it holds a `Notebook`, `None` if the field is not set or
1201    /// holds a different branch.
1202    pub fn notebook(
1203        &self,
1204    ) -> std::option::Option<&std::boxed::Box<crate::model::content::Notebook>> {
1205        #[allow(unreachable_patterns)]
1206        self.content.as_ref().and_then(|v| match v {
1207            crate::model::content::Content::Notebook(v) => std::option::Option::Some(v),
1208            _ => std::option::Option::None,
1209        })
1210    }
1211
1212    /// Sets the value of [content][crate::model::Content::content]
1213    /// to hold a `Notebook`.
1214    ///
1215    /// Note that all the setters affecting `content` are
1216    /// mutually exclusive.
1217    ///
1218    /// # Example
1219    /// ```ignore,no_run
1220    /// # use google_cloud_dataplex_v1::model::Content;
1221    /// use google_cloud_dataplex_v1::model::content::Notebook;
1222    /// let x = Content::new().set_notebook(Notebook::default()/* use setters */);
1223    /// assert!(x.notebook().is_some());
1224    /// assert!(x.sql_script().is_none());
1225    /// ```
1226    pub fn set_notebook<T: std::convert::Into<std::boxed::Box<crate::model::content::Notebook>>>(
1227        mut self,
1228        v: T,
1229    ) -> Self {
1230        self.content =
1231            std::option::Option::Some(crate::model::content::Content::Notebook(v.into()));
1232        self
1233    }
1234}
1235
1236impl wkt::message::Message for Content {
1237    fn typename() -> &'static str {
1238        "type.googleapis.com/google.cloud.dataplex.v1.Content"
1239    }
1240}
1241
1242/// Defines additional types related to [Content].
1243pub mod content {
1244    #[allow(unused_imports)]
1245    use super::*;
1246
1247    /// Configuration for the Sql Script content.
1248    #[derive(Clone, Default, PartialEq)]
1249    #[non_exhaustive]
1250    pub struct SqlScript {
1251        /// Required. Query Engine to be used for the Sql Query.
1252        pub engine: crate::model::content::sql_script::QueryEngine,
1253
1254        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1255    }
1256
1257    impl SqlScript {
1258        pub fn new() -> Self {
1259            std::default::Default::default()
1260        }
1261
1262        /// Sets the value of [engine][crate::model::content::SqlScript::engine].
1263        ///
1264        /// # Example
1265        /// ```ignore,no_run
1266        /// # use google_cloud_dataplex_v1::model::content::SqlScript;
1267        /// use google_cloud_dataplex_v1::model::content::sql_script::QueryEngine;
1268        /// let x0 = SqlScript::new().set_engine(QueryEngine::Spark);
1269        /// ```
1270        pub fn set_engine<T: std::convert::Into<crate::model::content::sql_script::QueryEngine>>(
1271            mut self,
1272            v: T,
1273        ) -> Self {
1274            self.engine = v.into();
1275            self
1276        }
1277    }
1278
1279    impl wkt::message::Message for SqlScript {
1280        fn typename() -> &'static str {
1281            "type.googleapis.com/google.cloud.dataplex.v1.Content.SqlScript"
1282        }
1283    }
1284
1285    /// Defines additional types related to [SqlScript].
1286    pub mod sql_script {
1287        #[allow(unused_imports)]
1288        use super::*;
1289
1290        /// Query Engine Type of the SQL Script.
1291        ///
1292        /// # Working with unknown values
1293        ///
1294        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1295        /// additional enum variants at any time. Adding new variants is not considered
1296        /// a breaking change. Applications should write their code in anticipation of:
1297        ///
1298        /// - New values appearing in future releases of the client library, **and**
1299        /// - New values received dynamically, without application changes.
1300        ///
1301        /// Please consult the [Working with enums] section in the user guide for some
1302        /// guidelines.
1303        ///
1304        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1305        #[derive(Clone, Debug, PartialEq)]
1306        #[non_exhaustive]
1307        pub enum QueryEngine {
1308            /// Value was unspecified.
1309            Unspecified,
1310            /// Spark SQL Query.
1311            Spark,
1312            /// If set, the enum was initialized with an unknown value.
1313            ///
1314            /// Applications can examine the value using [QueryEngine::value] or
1315            /// [QueryEngine::name].
1316            UnknownValue(query_engine::UnknownValue),
1317        }
1318
1319        #[doc(hidden)]
1320        pub mod query_engine {
1321            #[allow(unused_imports)]
1322            use super::*;
1323            #[derive(Clone, Debug, PartialEq)]
1324            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1325        }
1326
1327        impl QueryEngine {
1328            /// Gets the enum value.
1329            ///
1330            /// Returns `None` if the enum contains an unknown value deserialized from
1331            /// the string representation of enums.
1332            pub fn value(&self) -> std::option::Option<i32> {
1333                match self {
1334                    Self::Unspecified => std::option::Option::Some(0),
1335                    Self::Spark => std::option::Option::Some(2),
1336                    Self::UnknownValue(u) => u.0.value(),
1337                }
1338            }
1339
1340            /// Gets the enum value as a string.
1341            ///
1342            /// Returns `None` if the enum contains an unknown value deserialized from
1343            /// the integer representation of enums.
1344            pub fn name(&self) -> std::option::Option<&str> {
1345                match self {
1346                    Self::Unspecified => std::option::Option::Some("QUERY_ENGINE_UNSPECIFIED"),
1347                    Self::Spark => std::option::Option::Some("SPARK"),
1348                    Self::UnknownValue(u) => u.0.name(),
1349                }
1350            }
1351        }
1352
1353        impl std::default::Default for QueryEngine {
1354            fn default() -> Self {
1355                use std::convert::From;
1356                Self::from(0)
1357            }
1358        }
1359
1360        impl std::fmt::Display for QueryEngine {
1361            fn fmt(
1362                &self,
1363                f: &mut std::fmt::Formatter<'_>,
1364            ) -> std::result::Result<(), std::fmt::Error> {
1365                wkt::internal::display_enum(f, self.name(), self.value())
1366            }
1367        }
1368
1369        impl std::convert::From<i32> for QueryEngine {
1370            fn from(value: i32) -> Self {
1371                match value {
1372                    0 => Self::Unspecified,
1373                    2 => Self::Spark,
1374                    _ => Self::UnknownValue(query_engine::UnknownValue(
1375                        wkt::internal::UnknownEnumValue::Integer(value),
1376                    )),
1377                }
1378            }
1379        }
1380
1381        impl std::convert::From<&str> for QueryEngine {
1382            fn from(value: &str) -> Self {
1383                use std::string::ToString;
1384                match value {
1385                    "QUERY_ENGINE_UNSPECIFIED" => Self::Unspecified,
1386                    "SPARK" => Self::Spark,
1387                    _ => Self::UnknownValue(query_engine::UnknownValue(
1388                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1389                    )),
1390                }
1391            }
1392        }
1393
1394        impl serde::ser::Serialize for QueryEngine {
1395            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1396            where
1397                S: serde::Serializer,
1398            {
1399                match self {
1400                    Self::Unspecified => serializer.serialize_i32(0),
1401                    Self::Spark => serializer.serialize_i32(2),
1402                    Self::UnknownValue(u) => u.0.serialize(serializer),
1403                }
1404            }
1405        }
1406
1407        impl<'de> serde::de::Deserialize<'de> for QueryEngine {
1408            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1409            where
1410                D: serde::Deserializer<'de>,
1411            {
1412                deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryEngine>::new(
1413                    ".google.cloud.dataplex.v1.Content.SqlScript.QueryEngine",
1414                ))
1415            }
1416        }
1417    }
1418
1419    /// Configuration for Notebook content.
1420    #[derive(Clone, Default, PartialEq)]
1421    #[non_exhaustive]
1422    pub struct Notebook {
1423        /// Required. Kernel Type of the notebook.
1424        pub kernel_type: crate::model::content::notebook::KernelType,
1425
1426        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1427    }
1428
1429    impl Notebook {
1430        pub fn new() -> Self {
1431            std::default::Default::default()
1432        }
1433
1434        /// Sets the value of [kernel_type][crate::model::content::Notebook::kernel_type].
1435        ///
1436        /// # Example
1437        /// ```ignore,no_run
1438        /// # use google_cloud_dataplex_v1::model::content::Notebook;
1439        /// use google_cloud_dataplex_v1::model::content::notebook::KernelType;
1440        /// let x0 = Notebook::new().set_kernel_type(KernelType::Python3);
1441        /// ```
1442        pub fn set_kernel_type<
1443            T: std::convert::Into<crate::model::content::notebook::KernelType>,
1444        >(
1445            mut self,
1446            v: T,
1447        ) -> Self {
1448            self.kernel_type = v.into();
1449            self
1450        }
1451    }
1452
1453    impl wkt::message::Message for Notebook {
1454        fn typename() -> &'static str {
1455            "type.googleapis.com/google.cloud.dataplex.v1.Content.Notebook"
1456        }
1457    }
1458
1459    /// Defines additional types related to [Notebook].
1460    pub mod notebook {
1461        #[allow(unused_imports)]
1462        use super::*;
1463
1464        /// Kernel Type of the Jupyter notebook.
1465        ///
1466        /// # Working with unknown values
1467        ///
1468        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1469        /// additional enum variants at any time. Adding new variants is not considered
1470        /// a breaking change. Applications should write their code in anticipation of:
1471        ///
1472        /// - New values appearing in future releases of the client library, **and**
1473        /// - New values received dynamically, without application changes.
1474        ///
1475        /// Please consult the [Working with enums] section in the user guide for some
1476        /// guidelines.
1477        ///
1478        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1479        #[derive(Clone, Debug, PartialEq)]
1480        #[non_exhaustive]
1481        pub enum KernelType {
1482            /// Kernel Type unspecified.
1483            Unspecified,
1484            /// Python 3 Kernel.
1485            Python3,
1486            /// If set, the enum was initialized with an unknown value.
1487            ///
1488            /// Applications can examine the value using [KernelType::value] or
1489            /// [KernelType::name].
1490            UnknownValue(kernel_type::UnknownValue),
1491        }
1492
1493        #[doc(hidden)]
1494        pub mod kernel_type {
1495            #[allow(unused_imports)]
1496            use super::*;
1497            #[derive(Clone, Debug, PartialEq)]
1498            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1499        }
1500
1501        impl KernelType {
1502            /// Gets the enum value.
1503            ///
1504            /// Returns `None` if the enum contains an unknown value deserialized from
1505            /// the string representation of enums.
1506            pub fn value(&self) -> std::option::Option<i32> {
1507                match self {
1508                    Self::Unspecified => std::option::Option::Some(0),
1509                    Self::Python3 => std::option::Option::Some(1),
1510                    Self::UnknownValue(u) => u.0.value(),
1511                }
1512            }
1513
1514            /// Gets the enum value as a string.
1515            ///
1516            /// Returns `None` if the enum contains an unknown value deserialized from
1517            /// the integer representation of enums.
1518            pub fn name(&self) -> std::option::Option<&str> {
1519                match self {
1520                    Self::Unspecified => std::option::Option::Some("KERNEL_TYPE_UNSPECIFIED"),
1521                    Self::Python3 => std::option::Option::Some("PYTHON3"),
1522                    Self::UnknownValue(u) => u.0.name(),
1523                }
1524            }
1525        }
1526
1527        impl std::default::Default for KernelType {
1528            fn default() -> Self {
1529                use std::convert::From;
1530                Self::from(0)
1531            }
1532        }
1533
1534        impl std::fmt::Display for KernelType {
1535            fn fmt(
1536                &self,
1537                f: &mut std::fmt::Formatter<'_>,
1538            ) -> std::result::Result<(), std::fmt::Error> {
1539                wkt::internal::display_enum(f, self.name(), self.value())
1540            }
1541        }
1542
1543        impl std::convert::From<i32> for KernelType {
1544            fn from(value: i32) -> Self {
1545                match value {
1546                    0 => Self::Unspecified,
1547                    1 => Self::Python3,
1548                    _ => Self::UnknownValue(kernel_type::UnknownValue(
1549                        wkt::internal::UnknownEnumValue::Integer(value),
1550                    )),
1551                }
1552            }
1553        }
1554
1555        impl std::convert::From<&str> for KernelType {
1556            fn from(value: &str) -> Self {
1557                use std::string::ToString;
1558                match value {
1559                    "KERNEL_TYPE_UNSPECIFIED" => Self::Unspecified,
1560                    "PYTHON3" => Self::Python3,
1561                    _ => Self::UnknownValue(kernel_type::UnknownValue(
1562                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1563                    )),
1564                }
1565            }
1566        }
1567
1568        impl serde::ser::Serialize for KernelType {
1569            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1570            where
1571                S: serde::Serializer,
1572            {
1573                match self {
1574                    Self::Unspecified => serializer.serialize_i32(0),
1575                    Self::Python3 => serializer.serialize_i32(1),
1576                    Self::UnknownValue(u) => u.0.serialize(serializer),
1577                }
1578            }
1579        }
1580
1581        impl<'de> serde::de::Deserialize<'de> for KernelType {
1582            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1583            where
1584                D: serde::Deserializer<'de>,
1585            {
1586                deserializer.deserialize_any(wkt::internal::EnumVisitor::<KernelType>::new(
1587                    ".google.cloud.dataplex.v1.Content.Notebook.KernelType",
1588                ))
1589            }
1590        }
1591    }
1592
1593    /// Only returned in `GetContent` requests and not in `ListContent` request.
1594    #[derive(Clone, Debug, PartialEq)]
1595    #[non_exhaustive]
1596    pub enum Data {
1597        /// Required. Content data in string format.
1598        DataText(std::string::String),
1599    }
1600
1601    /// Types of content
1602    #[derive(Clone, Debug, PartialEq)]
1603    #[non_exhaustive]
1604    pub enum Content {
1605        /// Sql Script related configurations.
1606        SqlScript(std::boxed::Box<crate::model::content::SqlScript>),
1607        /// Notebook related configurations.
1608        Notebook(std::boxed::Box<crate::model::content::Notebook>),
1609    }
1610}
1611
1612/// Represents an active analyze session running for a user.
1613#[derive(Clone, Default, PartialEq)]
1614#[non_exhaustive]
1615pub struct Session {
1616    /// Output only. The relative resource name of the content, of the form:
1617    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id}
1618    pub name: std::string::String,
1619
1620    /// Output only. Email of user running the session.
1621    pub user_id: std::string::String,
1622
1623    /// Output only. Session start time.
1624    pub create_time: std::option::Option<wkt::Timestamp>,
1625
1626    /// Output only. State of Session
1627    pub state: crate::model::State,
1628
1629    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1630}
1631
1632impl Session {
1633    pub fn new() -> Self {
1634        std::default::Default::default()
1635    }
1636
1637    /// Sets the value of [name][crate::model::Session::name].
1638    ///
1639    /// # Example
1640    /// ```ignore,no_run
1641    /// # use google_cloud_dataplex_v1::model::Session;
1642    /// let x = Session::new().set_name("example");
1643    /// ```
1644    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1645        self.name = v.into();
1646        self
1647    }
1648
1649    /// Sets the value of [user_id][crate::model::Session::user_id].
1650    ///
1651    /// # Example
1652    /// ```ignore,no_run
1653    /// # use google_cloud_dataplex_v1::model::Session;
1654    /// let x = Session::new().set_user_id("example");
1655    /// ```
1656    pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1657        self.user_id = v.into();
1658        self
1659    }
1660
1661    /// Sets the value of [create_time][crate::model::Session::create_time].
1662    ///
1663    /// # Example
1664    /// ```ignore,no_run
1665    /// # use google_cloud_dataplex_v1::model::Session;
1666    /// use wkt::Timestamp;
1667    /// let x = Session::new().set_create_time(Timestamp::default()/* use setters */);
1668    /// ```
1669    pub fn set_create_time<T>(mut self, v: T) -> Self
1670    where
1671        T: std::convert::Into<wkt::Timestamp>,
1672    {
1673        self.create_time = std::option::Option::Some(v.into());
1674        self
1675    }
1676
1677    /// Sets or clears the value of [create_time][crate::model::Session::create_time].
1678    ///
1679    /// # Example
1680    /// ```ignore,no_run
1681    /// # use google_cloud_dataplex_v1::model::Session;
1682    /// use wkt::Timestamp;
1683    /// let x = Session::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1684    /// let x = Session::new().set_or_clear_create_time(None::<Timestamp>);
1685    /// ```
1686    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1687    where
1688        T: std::convert::Into<wkt::Timestamp>,
1689    {
1690        self.create_time = v.map(|x| x.into());
1691        self
1692    }
1693
1694    /// Sets the value of [state][crate::model::Session::state].
1695    ///
1696    /// # Example
1697    /// ```ignore,no_run
1698    /// # use google_cloud_dataplex_v1::model::Session;
1699    /// use google_cloud_dataplex_v1::model::State;
1700    /// let x0 = Session::new().set_state(State::Active);
1701    /// let x1 = Session::new().set_state(State::Creating);
1702    /// let x2 = Session::new().set_state(State::Deleting);
1703    /// ```
1704    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
1705        self.state = v.into();
1706        self
1707    }
1708}
1709
1710impl wkt::message::Message for Session {
1711    fn typename() -> &'static str {
1712        "type.googleapis.com/google.cloud.dataplex.v1.Session"
1713    }
1714}
1715
1716/// A Glossary represents a collection of GlossaryCategories and GlossaryTerms
1717/// defined by the user. Glossary is a top level resource and is the Google Cloud
1718/// parent resource of all the GlossaryCategories and GlossaryTerms within it.
1719#[derive(Clone, Default, PartialEq)]
1720#[non_exhaustive]
1721pub struct Glossary {
1722    /// Output only. Identifier. The resource name of the Glossary.
1723    /// Format:
1724    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1725    pub name: std::string::String,
1726
1727    /// Output only. System generated unique id for the Glossary. This ID will be
1728    /// different if the Glossary is deleted and re-created with the
1729    /// same name.
1730    pub uid: std::string::String,
1731
1732    /// Optional. User friendly display name of the Glossary. This is user-mutable.
1733    /// This will be same as the GlossaryId, if not specified.
1734    pub display_name: std::string::String,
1735
1736    /// Optional. The user-mutable description of the Glossary.
1737    pub description: std::string::String,
1738
1739    /// Output only. The time at which the Glossary was created.
1740    pub create_time: std::option::Option<wkt::Timestamp>,
1741
1742    /// Output only. The time at which the Glossary was last updated.
1743    pub update_time: std::option::Option<wkt::Timestamp>,
1744
1745    /// Optional. User-defined labels for the Glossary.
1746    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1747
1748    /// Output only. The number of GlossaryTerms in the Glossary.
1749    pub term_count: i32,
1750
1751    /// Output only. The number of GlossaryCategories in the Glossary.
1752    pub category_count: i32,
1753
1754    /// Optional. Needed for resource freshness validation.
1755    /// This checksum is computed by the server based on the value of other
1756    /// fields, and may be sent on update and delete requests to ensure the
1757    /// client has an up-to-date value before proceeding.
1758    pub etag: std::string::String,
1759
1760    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1761}
1762
1763impl Glossary {
1764    pub fn new() -> Self {
1765        std::default::Default::default()
1766    }
1767
1768    /// Sets the value of [name][crate::model::Glossary::name].
1769    ///
1770    /// # Example
1771    /// ```ignore,no_run
1772    /// # use google_cloud_dataplex_v1::model::Glossary;
1773    /// let x = Glossary::new().set_name("example");
1774    /// ```
1775    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1776        self.name = v.into();
1777        self
1778    }
1779
1780    /// Sets the value of [uid][crate::model::Glossary::uid].
1781    ///
1782    /// # Example
1783    /// ```ignore,no_run
1784    /// # use google_cloud_dataplex_v1::model::Glossary;
1785    /// let x = Glossary::new().set_uid("example");
1786    /// ```
1787    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1788        self.uid = v.into();
1789        self
1790    }
1791
1792    /// Sets the value of [display_name][crate::model::Glossary::display_name].
1793    ///
1794    /// # Example
1795    /// ```ignore,no_run
1796    /// # use google_cloud_dataplex_v1::model::Glossary;
1797    /// let x = Glossary::new().set_display_name("example");
1798    /// ```
1799    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1800        self.display_name = v.into();
1801        self
1802    }
1803
1804    /// Sets the value of [description][crate::model::Glossary::description].
1805    ///
1806    /// # Example
1807    /// ```ignore,no_run
1808    /// # use google_cloud_dataplex_v1::model::Glossary;
1809    /// let x = Glossary::new().set_description("example");
1810    /// ```
1811    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1812        self.description = v.into();
1813        self
1814    }
1815
1816    /// Sets the value of [create_time][crate::model::Glossary::create_time].
1817    ///
1818    /// # Example
1819    /// ```ignore,no_run
1820    /// # use google_cloud_dataplex_v1::model::Glossary;
1821    /// use wkt::Timestamp;
1822    /// let x = Glossary::new().set_create_time(Timestamp::default()/* use setters */);
1823    /// ```
1824    pub fn set_create_time<T>(mut self, v: T) -> Self
1825    where
1826        T: std::convert::Into<wkt::Timestamp>,
1827    {
1828        self.create_time = std::option::Option::Some(v.into());
1829        self
1830    }
1831
1832    /// Sets or clears the value of [create_time][crate::model::Glossary::create_time].
1833    ///
1834    /// # Example
1835    /// ```ignore,no_run
1836    /// # use google_cloud_dataplex_v1::model::Glossary;
1837    /// use wkt::Timestamp;
1838    /// let x = Glossary::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1839    /// let x = Glossary::new().set_or_clear_create_time(None::<Timestamp>);
1840    /// ```
1841    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1842    where
1843        T: std::convert::Into<wkt::Timestamp>,
1844    {
1845        self.create_time = v.map(|x| x.into());
1846        self
1847    }
1848
1849    /// Sets the value of [update_time][crate::model::Glossary::update_time].
1850    ///
1851    /// # Example
1852    /// ```ignore,no_run
1853    /// # use google_cloud_dataplex_v1::model::Glossary;
1854    /// use wkt::Timestamp;
1855    /// let x = Glossary::new().set_update_time(Timestamp::default()/* use setters */);
1856    /// ```
1857    pub fn set_update_time<T>(mut self, v: T) -> Self
1858    where
1859        T: std::convert::Into<wkt::Timestamp>,
1860    {
1861        self.update_time = std::option::Option::Some(v.into());
1862        self
1863    }
1864
1865    /// Sets or clears the value of [update_time][crate::model::Glossary::update_time].
1866    ///
1867    /// # Example
1868    /// ```ignore,no_run
1869    /// # use google_cloud_dataplex_v1::model::Glossary;
1870    /// use wkt::Timestamp;
1871    /// let x = Glossary::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1872    /// let x = Glossary::new().set_or_clear_update_time(None::<Timestamp>);
1873    /// ```
1874    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1875    where
1876        T: std::convert::Into<wkt::Timestamp>,
1877    {
1878        self.update_time = v.map(|x| x.into());
1879        self
1880    }
1881
1882    /// Sets the value of [labels][crate::model::Glossary::labels].
1883    ///
1884    /// # Example
1885    /// ```ignore,no_run
1886    /// # use google_cloud_dataplex_v1::model::Glossary;
1887    /// let x = Glossary::new().set_labels([
1888    ///     ("key0", "abc"),
1889    ///     ("key1", "xyz"),
1890    /// ]);
1891    /// ```
1892    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1893    where
1894        T: std::iter::IntoIterator<Item = (K, V)>,
1895        K: std::convert::Into<std::string::String>,
1896        V: std::convert::Into<std::string::String>,
1897    {
1898        use std::iter::Iterator;
1899        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1900        self
1901    }
1902
1903    /// Sets the value of [term_count][crate::model::Glossary::term_count].
1904    ///
1905    /// # Example
1906    /// ```ignore,no_run
1907    /// # use google_cloud_dataplex_v1::model::Glossary;
1908    /// let x = Glossary::new().set_term_count(42);
1909    /// ```
1910    pub fn set_term_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1911        self.term_count = v.into();
1912        self
1913    }
1914
1915    /// Sets the value of [category_count][crate::model::Glossary::category_count].
1916    ///
1917    /// # Example
1918    /// ```ignore,no_run
1919    /// # use google_cloud_dataplex_v1::model::Glossary;
1920    /// let x = Glossary::new().set_category_count(42);
1921    /// ```
1922    pub fn set_category_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1923        self.category_count = v.into();
1924        self
1925    }
1926
1927    /// Sets the value of [etag][crate::model::Glossary::etag].
1928    ///
1929    /// # Example
1930    /// ```ignore,no_run
1931    /// # use google_cloud_dataplex_v1::model::Glossary;
1932    /// let x = Glossary::new().set_etag("example");
1933    /// ```
1934    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1935        self.etag = v.into();
1936        self
1937    }
1938}
1939
1940impl wkt::message::Message for Glossary {
1941    fn typename() -> &'static str {
1942        "type.googleapis.com/google.cloud.dataplex.v1.Glossary"
1943    }
1944}
1945
1946/// A GlossaryCategory represents a collection of GlossaryCategories and
1947/// GlossaryTerms within a Glossary that are related to each other.
1948#[derive(Clone, Default, PartialEq)]
1949#[non_exhaustive]
1950pub struct GlossaryCategory {
1951    /// Output only. Identifier. The resource name of the GlossaryCategory.
1952    /// Format:
1953    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
1954    pub name: std::string::String,
1955
1956    /// Output only. System generated unique id for the GlossaryCategory. This ID
1957    /// will be different if the GlossaryCategory is deleted and re-created with
1958    /// the same name.
1959    pub uid: std::string::String,
1960
1961    /// Optional. User friendly display name of the GlossaryCategory. This is
1962    /// user-mutable. This will be same as the GlossaryCategoryId, if not
1963    /// specified.
1964    pub display_name: std::string::String,
1965
1966    /// Optional. The user-mutable description of the GlossaryCategory.
1967    pub description: std::string::String,
1968
1969    /// Output only. The time at which the GlossaryCategory was created.
1970    pub create_time: std::option::Option<wkt::Timestamp>,
1971
1972    /// Output only. The time at which the GlossaryCategory was last updated.
1973    pub update_time: std::option::Option<wkt::Timestamp>,
1974
1975    /// Optional. User-defined labels for the GlossaryCategory.
1976    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1977
1978    /// Required. The immediate parent of the GlossaryCategory in the
1979    /// resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
1980    /// Format:
1981    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1982    /// OR
1983    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
1984    pub parent: std::string::String,
1985
1986    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1987}
1988
1989impl GlossaryCategory {
1990    pub fn new() -> Self {
1991        std::default::Default::default()
1992    }
1993
1994    /// Sets the value of [name][crate::model::GlossaryCategory::name].
1995    ///
1996    /// # Example
1997    /// ```ignore,no_run
1998    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
1999    /// let x = GlossaryCategory::new().set_name("example");
2000    /// ```
2001    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2002        self.name = v.into();
2003        self
2004    }
2005
2006    /// Sets the value of [uid][crate::model::GlossaryCategory::uid].
2007    ///
2008    /// # Example
2009    /// ```ignore,no_run
2010    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2011    /// let x = GlossaryCategory::new().set_uid("example");
2012    /// ```
2013    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2014        self.uid = v.into();
2015        self
2016    }
2017
2018    /// Sets the value of [display_name][crate::model::GlossaryCategory::display_name].
2019    ///
2020    /// # Example
2021    /// ```ignore,no_run
2022    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2023    /// let x = GlossaryCategory::new().set_display_name("example");
2024    /// ```
2025    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2026        self.display_name = v.into();
2027        self
2028    }
2029
2030    /// Sets the value of [description][crate::model::GlossaryCategory::description].
2031    ///
2032    /// # Example
2033    /// ```ignore,no_run
2034    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2035    /// let x = GlossaryCategory::new().set_description("example");
2036    /// ```
2037    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2038        self.description = v.into();
2039        self
2040    }
2041
2042    /// Sets the value of [create_time][crate::model::GlossaryCategory::create_time].
2043    ///
2044    /// # Example
2045    /// ```ignore,no_run
2046    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2047    /// use wkt::Timestamp;
2048    /// let x = GlossaryCategory::new().set_create_time(Timestamp::default()/* use setters */);
2049    /// ```
2050    pub fn set_create_time<T>(mut self, v: T) -> Self
2051    where
2052        T: std::convert::Into<wkt::Timestamp>,
2053    {
2054        self.create_time = std::option::Option::Some(v.into());
2055        self
2056    }
2057
2058    /// Sets or clears the value of [create_time][crate::model::GlossaryCategory::create_time].
2059    ///
2060    /// # Example
2061    /// ```ignore,no_run
2062    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2063    /// use wkt::Timestamp;
2064    /// let x = GlossaryCategory::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2065    /// let x = GlossaryCategory::new().set_or_clear_create_time(None::<Timestamp>);
2066    /// ```
2067    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2068    where
2069        T: std::convert::Into<wkt::Timestamp>,
2070    {
2071        self.create_time = v.map(|x| x.into());
2072        self
2073    }
2074
2075    /// Sets the value of [update_time][crate::model::GlossaryCategory::update_time].
2076    ///
2077    /// # Example
2078    /// ```ignore,no_run
2079    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2080    /// use wkt::Timestamp;
2081    /// let x = GlossaryCategory::new().set_update_time(Timestamp::default()/* use setters */);
2082    /// ```
2083    pub fn set_update_time<T>(mut self, v: T) -> Self
2084    where
2085        T: std::convert::Into<wkt::Timestamp>,
2086    {
2087        self.update_time = std::option::Option::Some(v.into());
2088        self
2089    }
2090
2091    /// Sets or clears the value of [update_time][crate::model::GlossaryCategory::update_time].
2092    ///
2093    /// # Example
2094    /// ```ignore,no_run
2095    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2096    /// use wkt::Timestamp;
2097    /// let x = GlossaryCategory::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2098    /// let x = GlossaryCategory::new().set_or_clear_update_time(None::<Timestamp>);
2099    /// ```
2100    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2101    where
2102        T: std::convert::Into<wkt::Timestamp>,
2103    {
2104        self.update_time = v.map(|x| x.into());
2105        self
2106    }
2107
2108    /// Sets the value of [labels][crate::model::GlossaryCategory::labels].
2109    ///
2110    /// # Example
2111    /// ```ignore,no_run
2112    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2113    /// let x = GlossaryCategory::new().set_labels([
2114    ///     ("key0", "abc"),
2115    ///     ("key1", "xyz"),
2116    /// ]);
2117    /// ```
2118    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2119    where
2120        T: std::iter::IntoIterator<Item = (K, V)>,
2121        K: std::convert::Into<std::string::String>,
2122        V: std::convert::Into<std::string::String>,
2123    {
2124        use std::iter::Iterator;
2125        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2126        self
2127    }
2128
2129    /// Sets the value of [parent][crate::model::GlossaryCategory::parent].
2130    ///
2131    /// # Example
2132    /// ```ignore,no_run
2133    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2134    /// let x = GlossaryCategory::new().set_parent("example");
2135    /// ```
2136    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2137        self.parent = v.into();
2138        self
2139    }
2140}
2141
2142impl wkt::message::Message for GlossaryCategory {
2143    fn typename() -> &'static str {
2144        "type.googleapis.com/google.cloud.dataplex.v1.GlossaryCategory"
2145    }
2146}
2147
2148/// GlossaryTerms are the core of Glossary.
2149/// A GlossaryTerm holds a rich text description that can be attached to Entries
2150/// or specific columns to enrich them.
2151#[derive(Clone, Default, PartialEq)]
2152#[non_exhaustive]
2153pub struct GlossaryTerm {
2154    /// Output only. Identifier. The resource name of the GlossaryTerm.
2155    /// Format:
2156    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
2157    pub name: std::string::String,
2158
2159    /// Output only. System generated unique id for the GlossaryTerm. This ID will
2160    /// be different if the GlossaryTerm is deleted and re-created with the same
2161    /// name.
2162    pub uid: std::string::String,
2163
2164    /// Optional. User friendly display name of the GlossaryTerm. This is
2165    /// user-mutable. This will be same as the GlossaryTermId, if not specified.
2166    pub display_name: std::string::String,
2167
2168    /// Optional. The user-mutable description of the GlossaryTerm.
2169    pub description: std::string::String,
2170
2171    /// Output only. The time at which the GlossaryTerm was created.
2172    pub create_time: std::option::Option<wkt::Timestamp>,
2173
2174    /// Output only. The time at which the GlossaryTerm was last updated.
2175    pub update_time: std::option::Option<wkt::Timestamp>,
2176
2177    /// Optional. User-defined labels for the GlossaryTerm.
2178    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2179
2180    /// Required. The immediate parent of the GlossaryTerm in the
2181    /// resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
2182    /// Format:
2183    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2184    /// OR
2185    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
2186    pub parent: std::string::String,
2187
2188    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2189}
2190
2191impl GlossaryTerm {
2192    pub fn new() -> Self {
2193        std::default::Default::default()
2194    }
2195
2196    /// Sets the value of [name][crate::model::GlossaryTerm::name].
2197    ///
2198    /// # Example
2199    /// ```ignore,no_run
2200    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2201    /// let x = GlossaryTerm::new().set_name("example");
2202    /// ```
2203    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2204        self.name = v.into();
2205        self
2206    }
2207
2208    /// Sets the value of [uid][crate::model::GlossaryTerm::uid].
2209    ///
2210    /// # Example
2211    /// ```ignore,no_run
2212    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2213    /// let x = GlossaryTerm::new().set_uid("example");
2214    /// ```
2215    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2216        self.uid = v.into();
2217        self
2218    }
2219
2220    /// Sets the value of [display_name][crate::model::GlossaryTerm::display_name].
2221    ///
2222    /// # Example
2223    /// ```ignore,no_run
2224    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2225    /// let x = GlossaryTerm::new().set_display_name("example");
2226    /// ```
2227    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2228        self.display_name = v.into();
2229        self
2230    }
2231
2232    /// Sets the value of [description][crate::model::GlossaryTerm::description].
2233    ///
2234    /// # Example
2235    /// ```ignore,no_run
2236    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2237    /// let x = GlossaryTerm::new().set_description("example");
2238    /// ```
2239    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2240        self.description = v.into();
2241        self
2242    }
2243
2244    /// Sets the value of [create_time][crate::model::GlossaryTerm::create_time].
2245    ///
2246    /// # Example
2247    /// ```ignore,no_run
2248    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2249    /// use wkt::Timestamp;
2250    /// let x = GlossaryTerm::new().set_create_time(Timestamp::default()/* use setters */);
2251    /// ```
2252    pub fn set_create_time<T>(mut self, v: T) -> Self
2253    where
2254        T: std::convert::Into<wkt::Timestamp>,
2255    {
2256        self.create_time = std::option::Option::Some(v.into());
2257        self
2258    }
2259
2260    /// Sets or clears the value of [create_time][crate::model::GlossaryTerm::create_time].
2261    ///
2262    /// # Example
2263    /// ```ignore,no_run
2264    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2265    /// use wkt::Timestamp;
2266    /// let x = GlossaryTerm::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2267    /// let x = GlossaryTerm::new().set_or_clear_create_time(None::<Timestamp>);
2268    /// ```
2269    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2270    where
2271        T: std::convert::Into<wkt::Timestamp>,
2272    {
2273        self.create_time = v.map(|x| x.into());
2274        self
2275    }
2276
2277    /// Sets the value of [update_time][crate::model::GlossaryTerm::update_time].
2278    ///
2279    /// # Example
2280    /// ```ignore,no_run
2281    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2282    /// use wkt::Timestamp;
2283    /// let x = GlossaryTerm::new().set_update_time(Timestamp::default()/* use setters */);
2284    /// ```
2285    pub fn set_update_time<T>(mut self, v: T) -> Self
2286    where
2287        T: std::convert::Into<wkt::Timestamp>,
2288    {
2289        self.update_time = std::option::Option::Some(v.into());
2290        self
2291    }
2292
2293    /// Sets or clears the value of [update_time][crate::model::GlossaryTerm::update_time].
2294    ///
2295    /// # Example
2296    /// ```ignore,no_run
2297    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2298    /// use wkt::Timestamp;
2299    /// let x = GlossaryTerm::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2300    /// let x = GlossaryTerm::new().set_or_clear_update_time(None::<Timestamp>);
2301    /// ```
2302    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2303    where
2304        T: std::convert::Into<wkt::Timestamp>,
2305    {
2306        self.update_time = v.map(|x| x.into());
2307        self
2308    }
2309
2310    /// Sets the value of [labels][crate::model::GlossaryTerm::labels].
2311    ///
2312    /// # Example
2313    /// ```ignore,no_run
2314    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2315    /// let x = GlossaryTerm::new().set_labels([
2316    ///     ("key0", "abc"),
2317    ///     ("key1", "xyz"),
2318    /// ]);
2319    /// ```
2320    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2321    where
2322        T: std::iter::IntoIterator<Item = (K, V)>,
2323        K: std::convert::Into<std::string::String>,
2324        V: std::convert::Into<std::string::String>,
2325    {
2326        use std::iter::Iterator;
2327        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2328        self
2329    }
2330
2331    /// Sets the value of [parent][crate::model::GlossaryTerm::parent].
2332    ///
2333    /// # Example
2334    /// ```ignore,no_run
2335    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2336    /// let x = GlossaryTerm::new().set_parent("example");
2337    /// ```
2338    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2339        self.parent = v.into();
2340        self
2341    }
2342}
2343
2344impl wkt::message::Message for GlossaryTerm {
2345    fn typename() -> &'static str {
2346        "type.googleapis.com/google.cloud.dataplex.v1.GlossaryTerm"
2347    }
2348}
2349
2350/// Create Glossary Request
2351#[derive(Clone, Default, PartialEq)]
2352#[non_exhaustive]
2353pub struct CreateGlossaryRequest {
2354    /// Required. The parent resource where this Glossary will be created.
2355    /// Format: projects/{project_id_or_number}/locations/{location_id}
2356    /// where `location_id` refers to a Google Cloud region.
2357    pub parent: std::string::String,
2358
2359    /// Required. Glossary ID: Glossary identifier.
2360    pub glossary_id: std::string::String,
2361
2362    /// Required. The Glossary to create.
2363    pub glossary: std::option::Option<crate::model::Glossary>,
2364
2365    /// Optional. Validates the request without actually creating the Glossary.
2366    /// Default: false.
2367    pub validate_only: bool,
2368
2369    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2370}
2371
2372impl CreateGlossaryRequest {
2373    pub fn new() -> Self {
2374        std::default::Default::default()
2375    }
2376
2377    /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
2378    ///
2379    /// # Example
2380    /// ```ignore,no_run
2381    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2382    /// let x = CreateGlossaryRequest::new().set_parent("example");
2383    /// ```
2384    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2385        self.parent = v.into();
2386        self
2387    }
2388
2389    /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
2390    ///
2391    /// # Example
2392    /// ```ignore,no_run
2393    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2394    /// let x = CreateGlossaryRequest::new().set_glossary_id("example");
2395    /// ```
2396    pub fn set_glossary_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2397        self.glossary_id = v.into();
2398        self
2399    }
2400
2401    /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
2402    ///
2403    /// # Example
2404    /// ```ignore,no_run
2405    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2406    /// use google_cloud_dataplex_v1::model::Glossary;
2407    /// let x = CreateGlossaryRequest::new().set_glossary(Glossary::default()/* use setters */);
2408    /// ```
2409    pub fn set_glossary<T>(mut self, v: T) -> Self
2410    where
2411        T: std::convert::Into<crate::model::Glossary>,
2412    {
2413        self.glossary = std::option::Option::Some(v.into());
2414        self
2415    }
2416
2417    /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
2418    ///
2419    /// # Example
2420    /// ```ignore,no_run
2421    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2422    /// use google_cloud_dataplex_v1::model::Glossary;
2423    /// let x = CreateGlossaryRequest::new().set_or_clear_glossary(Some(Glossary::default()/* use setters */));
2424    /// let x = CreateGlossaryRequest::new().set_or_clear_glossary(None::<Glossary>);
2425    /// ```
2426    pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
2427    where
2428        T: std::convert::Into<crate::model::Glossary>,
2429    {
2430        self.glossary = v.map(|x| x.into());
2431        self
2432    }
2433
2434    /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
2435    ///
2436    /// # Example
2437    /// ```ignore,no_run
2438    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2439    /// let x = CreateGlossaryRequest::new().set_validate_only(true);
2440    /// ```
2441    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2442        self.validate_only = v.into();
2443        self
2444    }
2445}
2446
2447impl wkt::message::Message for CreateGlossaryRequest {
2448    fn typename() -> &'static str {
2449        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryRequest"
2450    }
2451}
2452
2453/// Update Glossary Request
2454#[derive(Clone, Default, PartialEq)]
2455#[non_exhaustive]
2456pub struct UpdateGlossaryRequest {
2457    /// Required. The Glossary to update.
2458    /// The Glossary's `name` field is used to identify the Glossary to update.
2459    /// Format:
2460    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2461    pub glossary: std::option::Option<crate::model::Glossary>,
2462
2463    /// Required. The list of fields to update.
2464    pub update_mask: std::option::Option<wkt::FieldMask>,
2465
2466    /// Optional. Validates the request without actually updating the Glossary.
2467    /// Default: false.
2468    pub validate_only: bool,
2469
2470    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2471}
2472
2473impl UpdateGlossaryRequest {
2474    pub fn new() -> Self {
2475        std::default::Default::default()
2476    }
2477
2478    /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
2479    ///
2480    /// # Example
2481    /// ```ignore,no_run
2482    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2483    /// use google_cloud_dataplex_v1::model::Glossary;
2484    /// let x = UpdateGlossaryRequest::new().set_glossary(Glossary::default()/* use setters */);
2485    /// ```
2486    pub fn set_glossary<T>(mut self, v: T) -> Self
2487    where
2488        T: std::convert::Into<crate::model::Glossary>,
2489    {
2490        self.glossary = std::option::Option::Some(v.into());
2491        self
2492    }
2493
2494    /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
2495    ///
2496    /// # Example
2497    /// ```ignore,no_run
2498    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2499    /// use google_cloud_dataplex_v1::model::Glossary;
2500    /// let x = UpdateGlossaryRequest::new().set_or_clear_glossary(Some(Glossary::default()/* use setters */));
2501    /// let x = UpdateGlossaryRequest::new().set_or_clear_glossary(None::<Glossary>);
2502    /// ```
2503    pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
2504    where
2505        T: std::convert::Into<crate::model::Glossary>,
2506    {
2507        self.glossary = v.map(|x| x.into());
2508        self
2509    }
2510
2511    /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
2512    ///
2513    /// # Example
2514    /// ```ignore,no_run
2515    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2516    /// use wkt::FieldMask;
2517    /// let x = UpdateGlossaryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2518    /// ```
2519    pub fn set_update_mask<T>(mut self, v: T) -> Self
2520    where
2521        T: std::convert::Into<wkt::FieldMask>,
2522    {
2523        self.update_mask = std::option::Option::Some(v.into());
2524        self
2525    }
2526
2527    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
2528    ///
2529    /// # Example
2530    /// ```ignore,no_run
2531    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2532    /// use wkt::FieldMask;
2533    /// let x = UpdateGlossaryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2534    /// let x = UpdateGlossaryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2535    /// ```
2536    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2537    where
2538        T: std::convert::Into<wkt::FieldMask>,
2539    {
2540        self.update_mask = v.map(|x| x.into());
2541        self
2542    }
2543
2544    /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
2545    ///
2546    /// # Example
2547    /// ```ignore,no_run
2548    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2549    /// let x = UpdateGlossaryRequest::new().set_validate_only(true);
2550    /// ```
2551    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2552        self.validate_only = v.into();
2553        self
2554    }
2555}
2556
2557impl wkt::message::Message for UpdateGlossaryRequest {
2558    fn typename() -> &'static str {
2559        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryRequest"
2560    }
2561}
2562
2563/// Delete Glossary Request
2564#[derive(Clone, Default, PartialEq)]
2565#[non_exhaustive]
2566pub struct DeleteGlossaryRequest {
2567    /// Required. The name of the Glossary to delete.
2568    /// Format:
2569    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2570    pub name: std::string::String,
2571
2572    /// Optional. The etag of the Glossary.
2573    /// If this is provided, it must match the server's etag.
2574    /// If the etag is provided and does not match the server-computed etag,
2575    /// the request must fail with a ABORTED error code.
2576    pub etag: std::string::String,
2577
2578    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2579}
2580
2581impl DeleteGlossaryRequest {
2582    pub fn new() -> Self {
2583        std::default::Default::default()
2584    }
2585
2586    /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
2587    ///
2588    /// # Example
2589    /// ```ignore,no_run
2590    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryRequest;
2591    /// let x = DeleteGlossaryRequest::new().set_name("example");
2592    /// ```
2593    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2594        self.name = v.into();
2595        self
2596    }
2597
2598    /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
2599    ///
2600    /// # Example
2601    /// ```ignore,no_run
2602    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryRequest;
2603    /// let x = DeleteGlossaryRequest::new().set_etag("example");
2604    /// ```
2605    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2606        self.etag = v.into();
2607        self
2608    }
2609}
2610
2611impl wkt::message::Message for DeleteGlossaryRequest {
2612    fn typename() -> &'static str {
2613        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryRequest"
2614    }
2615}
2616
2617/// Get Glossary Request
2618#[derive(Clone, Default, PartialEq)]
2619#[non_exhaustive]
2620pub struct GetGlossaryRequest {
2621    /// Required. The name of the Glossary to retrieve.
2622    /// Format:
2623    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2624    pub name: std::string::String,
2625
2626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2627}
2628
2629impl GetGlossaryRequest {
2630    pub fn new() -> Self {
2631        std::default::Default::default()
2632    }
2633
2634    /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
2635    ///
2636    /// # Example
2637    /// ```ignore,no_run
2638    /// # use google_cloud_dataplex_v1::model::GetGlossaryRequest;
2639    /// let x = GetGlossaryRequest::new().set_name("example");
2640    /// ```
2641    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2642        self.name = v.into();
2643        self
2644    }
2645}
2646
2647impl wkt::message::Message for GetGlossaryRequest {
2648    fn typename() -> &'static str {
2649        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryRequest"
2650    }
2651}
2652
2653/// List Glossaries Request
2654#[derive(Clone, Default, PartialEq)]
2655#[non_exhaustive]
2656pub struct ListGlossariesRequest {
2657    /// Required. The parent, which has this collection of Glossaries.
2658    /// Format: projects/{project_id_or_number}/locations/{location_id}
2659    /// where `location_id` refers to a Google Cloud region.
2660    pub parent: std::string::String,
2661
2662    /// Optional. The maximum number of Glossaries to return. The service may
2663    /// return fewer than this value. If unspecified, at most 50 Glossaries will be
2664    /// returned. The maximum value is 1000; values above 1000 will be coerced to
2665    /// 1000.
2666    pub page_size: i32,
2667
2668    /// Optional. A page token, received from a previous `ListGlossaries` call.
2669    /// Provide this to retrieve the subsequent page.
2670    /// When paginating, all other parameters provided to `ListGlossaries` must
2671    /// match the call that provided the page token.
2672    pub page_token: std::string::String,
2673
2674    /// Optional. Filter expression that filters Glossaries listed in the response.
2675    /// Filters on proto fields of Glossary are supported.
2676    /// Examples of using a filter are:
2677    ///
2678    /// - `display_name="my-glossary"`
2679    /// - `categoryCount=1`
2680    /// - `termCount=0`
2681    pub filter: std::string::String,
2682
2683    /// Optional. Order by expression that orders Glossaries listed in the
2684    /// response. Order by fields are: `name` or `create_time` for the result. If
2685    /// not specified, the ordering is undefined.
2686    pub order_by: std::string::String,
2687
2688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2689}
2690
2691impl ListGlossariesRequest {
2692    pub fn new() -> Self {
2693        std::default::Default::default()
2694    }
2695
2696    /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
2697    ///
2698    /// # Example
2699    /// ```ignore,no_run
2700    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2701    /// let x = ListGlossariesRequest::new().set_parent("example");
2702    /// ```
2703    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2704        self.parent = v.into();
2705        self
2706    }
2707
2708    /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
2709    ///
2710    /// # Example
2711    /// ```ignore,no_run
2712    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2713    /// let x = ListGlossariesRequest::new().set_page_size(42);
2714    /// ```
2715    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2716        self.page_size = v.into();
2717        self
2718    }
2719
2720    /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
2721    ///
2722    /// # Example
2723    /// ```ignore,no_run
2724    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2725    /// let x = ListGlossariesRequest::new().set_page_token("example");
2726    /// ```
2727    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2728        self.page_token = v.into();
2729        self
2730    }
2731
2732    /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
2733    ///
2734    /// # Example
2735    /// ```ignore,no_run
2736    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2737    /// let x = ListGlossariesRequest::new().set_filter("example");
2738    /// ```
2739    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2740        self.filter = v.into();
2741        self
2742    }
2743
2744    /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
2745    ///
2746    /// # Example
2747    /// ```ignore,no_run
2748    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2749    /// let x = ListGlossariesRequest::new().set_order_by("example");
2750    /// ```
2751    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2752        self.order_by = v.into();
2753        self
2754    }
2755}
2756
2757impl wkt::message::Message for ListGlossariesRequest {
2758    fn typename() -> &'static str {
2759        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesRequest"
2760    }
2761}
2762
2763/// List Glossaries Response
2764#[derive(Clone, Default, PartialEq)]
2765#[non_exhaustive]
2766pub struct ListGlossariesResponse {
2767    /// Lists the Glossaries in the specified parent.
2768    pub glossaries: std::vec::Vec<crate::model::Glossary>,
2769
2770    /// A token, which can be sent as `page_token` to retrieve the next page.
2771    /// If this field is omitted, there are no subsequent pages.
2772    pub next_page_token: std::string::String,
2773
2774    /// Locations that the service couldn't reach.
2775    pub unreachable_locations: std::vec::Vec<std::string::String>,
2776
2777    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2778}
2779
2780impl ListGlossariesResponse {
2781    pub fn new() -> Self {
2782        std::default::Default::default()
2783    }
2784
2785    /// Sets the value of [glossaries][crate::model::ListGlossariesResponse::glossaries].
2786    ///
2787    /// # Example
2788    /// ```ignore,no_run
2789    /// # use google_cloud_dataplex_v1::model::ListGlossariesResponse;
2790    /// use google_cloud_dataplex_v1::model::Glossary;
2791    /// let x = ListGlossariesResponse::new()
2792    ///     .set_glossaries([
2793    ///         Glossary::default()/* use setters */,
2794    ///         Glossary::default()/* use (different) setters */,
2795    ///     ]);
2796    /// ```
2797    pub fn set_glossaries<T, V>(mut self, v: T) -> Self
2798    where
2799        T: std::iter::IntoIterator<Item = V>,
2800        V: std::convert::Into<crate::model::Glossary>,
2801    {
2802        use std::iter::Iterator;
2803        self.glossaries = v.into_iter().map(|i| i.into()).collect();
2804        self
2805    }
2806
2807    /// Sets the value of [next_page_token][crate::model::ListGlossariesResponse::next_page_token].
2808    ///
2809    /// # Example
2810    /// ```ignore,no_run
2811    /// # use google_cloud_dataplex_v1::model::ListGlossariesResponse;
2812    /// let x = ListGlossariesResponse::new().set_next_page_token("example");
2813    /// ```
2814    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2815        self.next_page_token = v.into();
2816        self
2817    }
2818
2819    /// Sets the value of [unreachable_locations][crate::model::ListGlossariesResponse::unreachable_locations].
2820    ///
2821    /// # Example
2822    /// ```ignore,no_run
2823    /// # use google_cloud_dataplex_v1::model::ListGlossariesResponse;
2824    /// let x = ListGlossariesResponse::new().set_unreachable_locations(["a", "b", "c"]);
2825    /// ```
2826    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2827    where
2828        T: std::iter::IntoIterator<Item = V>,
2829        V: std::convert::Into<std::string::String>,
2830    {
2831        use std::iter::Iterator;
2832        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2833        self
2834    }
2835}
2836
2837impl wkt::message::Message for ListGlossariesResponse {
2838    fn typename() -> &'static str {
2839        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesResponse"
2840    }
2841}
2842
2843#[doc(hidden)]
2844impl gax::paginator::internal::PageableResponse for ListGlossariesResponse {
2845    type PageItem = crate::model::Glossary;
2846
2847    fn items(self) -> std::vec::Vec<Self::PageItem> {
2848        self.glossaries
2849    }
2850
2851    fn next_page_token(&self) -> std::string::String {
2852        use std::clone::Clone;
2853        self.next_page_token.clone()
2854    }
2855}
2856
2857/// Creates a new GlossaryCategory under the specified Glossary.
2858#[derive(Clone, Default, PartialEq)]
2859#[non_exhaustive]
2860pub struct CreateGlossaryCategoryRequest {
2861    /// Required. The parent resource where this GlossaryCategory will be created.
2862    /// Format:
2863    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2864    /// where `locationId` refers to a Google Cloud region.
2865    pub parent: std::string::String,
2866
2867    /// Required. GlossaryCategory identifier.
2868    pub category_id: std::string::String,
2869
2870    /// Required. The GlossaryCategory to create.
2871    pub category: std::option::Option<crate::model::GlossaryCategory>,
2872
2873    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2874}
2875
2876impl CreateGlossaryCategoryRequest {
2877    pub fn new() -> Self {
2878        std::default::Default::default()
2879    }
2880
2881    /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
2882    ///
2883    /// # Example
2884    /// ```ignore,no_run
2885    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2886    /// let x = CreateGlossaryCategoryRequest::new().set_parent("example");
2887    /// ```
2888    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2889        self.parent = v.into();
2890        self
2891    }
2892
2893    /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
2894    ///
2895    /// # Example
2896    /// ```ignore,no_run
2897    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2898    /// let x = CreateGlossaryCategoryRequest::new().set_category_id("example");
2899    /// ```
2900    pub fn set_category_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2901        self.category_id = v.into();
2902        self
2903    }
2904
2905    /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
2906    ///
2907    /// # Example
2908    /// ```ignore,no_run
2909    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2910    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2911    /// let x = CreateGlossaryCategoryRequest::new().set_category(GlossaryCategory::default()/* use setters */);
2912    /// ```
2913    pub fn set_category<T>(mut self, v: T) -> Self
2914    where
2915        T: std::convert::Into<crate::model::GlossaryCategory>,
2916    {
2917        self.category = std::option::Option::Some(v.into());
2918        self
2919    }
2920
2921    /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
2922    ///
2923    /// # Example
2924    /// ```ignore,no_run
2925    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2926    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2927    /// let x = CreateGlossaryCategoryRequest::new().set_or_clear_category(Some(GlossaryCategory::default()/* use setters */));
2928    /// let x = CreateGlossaryCategoryRequest::new().set_or_clear_category(None::<GlossaryCategory>);
2929    /// ```
2930    pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2931    where
2932        T: std::convert::Into<crate::model::GlossaryCategory>,
2933    {
2934        self.category = v.map(|x| x.into());
2935        self
2936    }
2937}
2938
2939impl wkt::message::Message for CreateGlossaryCategoryRequest {
2940    fn typename() -> &'static str {
2941        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryCategoryRequest"
2942    }
2943}
2944
2945/// Update GlossaryCategory Request
2946#[derive(Clone, Default, PartialEq)]
2947#[non_exhaustive]
2948pub struct UpdateGlossaryCategoryRequest {
2949    /// Required. The GlossaryCategory to update.
2950    /// The GlossaryCategory's `name` field is used to identify the
2951    /// GlossaryCategory to update. Format:
2952    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
2953    pub category: std::option::Option<crate::model::GlossaryCategory>,
2954
2955    /// Required. The list of fields to update.
2956    pub update_mask: std::option::Option<wkt::FieldMask>,
2957
2958    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2959}
2960
2961impl UpdateGlossaryCategoryRequest {
2962    pub fn new() -> Self {
2963        std::default::Default::default()
2964    }
2965
2966    /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
2967    ///
2968    /// # Example
2969    /// ```ignore,no_run
2970    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
2971    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2972    /// let x = UpdateGlossaryCategoryRequest::new().set_category(GlossaryCategory::default()/* use setters */);
2973    /// ```
2974    pub fn set_category<T>(mut self, v: T) -> Self
2975    where
2976        T: std::convert::Into<crate::model::GlossaryCategory>,
2977    {
2978        self.category = std::option::Option::Some(v.into());
2979        self
2980    }
2981
2982    /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
2983    ///
2984    /// # Example
2985    /// ```ignore,no_run
2986    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
2987    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2988    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_category(Some(GlossaryCategory::default()/* use setters */));
2989    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_category(None::<GlossaryCategory>);
2990    /// ```
2991    pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2992    where
2993        T: std::convert::Into<crate::model::GlossaryCategory>,
2994    {
2995        self.category = v.map(|x| x.into());
2996        self
2997    }
2998
2999    /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
3000    ///
3001    /// # Example
3002    /// ```ignore,no_run
3003    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
3004    /// use wkt::FieldMask;
3005    /// let x = UpdateGlossaryCategoryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3006    /// ```
3007    pub fn set_update_mask<T>(mut self, v: T) -> Self
3008    where
3009        T: std::convert::Into<wkt::FieldMask>,
3010    {
3011        self.update_mask = std::option::Option::Some(v.into());
3012        self
3013    }
3014
3015    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
3016    ///
3017    /// # Example
3018    /// ```ignore,no_run
3019    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
3020    /// use wkt::FieldMask;
3021    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3022    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3023    /// ```
3024    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3025    where
3026        T: std::convert::Into<wkt::FieldMask>,
3027    {
3028        self.update_mask = v.map(|x| x.into());
3029        self
3030    }
3031}
3032
3033impl wkt::message::Message for UpdateGlossaryCategoryRequest {
3034    fn typename() -> &'static str {
3035        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest"
3036    }
3037}
3038
3039/// Delete GlossaryCategory Request
3040#[derive(Clone, Default, PartialEq)]
3041#[non_exhaustive]
3042pub struct DeleteGlossaryCategoryRequest {
3043    /// Required. The name of the GlossaryCategory to delete.
3044    /// Format:
3045    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
3046    pub name: std::string::String,
3047
3048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3049}
3050
3051impl DeleteGlossaryCategoryRequest {
3052    pub fn new() -> Self {
3053        std::default::Default::default()
3054    }
3055
3056    /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
3057    ///
3058    /// # Example
3059    /// ```ignore,no_run
3060    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryCategoryRequest;
3061    /// let x = DeleteGlossaryCategoryRequest::new().set_name("example");
3062    /// ```
3063    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3064        self.name = v.into();
3065        self
3066    }
3067}
3068
3069impl wkt::message::Message for DeleteGlossaryCategoryRequest {
3070    fn typename() -> &'static str {
3071        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest"
3072    }
3073}
3074
3075/// Get GlossaryCategory Request
3076#[derive(Clone, Default, PartialEq)]
3077#[non_exhaustive]
3078pub struct GetGlossaryCategoryRequest {
3079    /// Required. The name of the GlossaryCategory to retrieve.
3080    /// Format:
3081    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
3082    pub name: std::string::String,
3083
3084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3085}
3086
3087impl GetGlossaryCategoryRequest {
3088    pub fn new() -> Self {
3089        std::default::Default::default()
3090    }
3091
3092    /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
3093    ///
3094    /// # Example
3095    /// ```ignore,no_run
3096    /// # use google_cloud_dataplex_v1::model::GetGlossaryCategoryRequest;
3097    /// let x = GetGlossaryCategoryRequest::new().set_name("example");
3098    /// ```
3099    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3100        self.name = v.into();
3101        self
3102    }
3103}
3104
3105impl wkt::message::Message for GetGlossaryCategoryRequest {
3106    fn typename() -> &'static str {
3107        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryCategoryRequest"
3108    }
3109}
3110
3111/// List GlossaryCategories Request
3112#[derive(Clone, Default, PartialEq)]
3113#[non_exhaustive]
3114pub struct ListGlossaryCategoriesRequest {
3115    /// Required. The parent, which has this collection of GlossaryCategories.
3116    /// Format:
3117    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
3118    /// Location is the Google Cloud region.
3119    pub parent: std::string::String,
3120
3121    /// Optional. The maximum number of GlossaryCategories to return. The service
3122    /// may return fewer than this value. If unspecified, at most 50
3123    /// GlossaryCategories will be returned. The maximum value is 1000; values
3124    /// above 1000 will be coerced to 1000.
3125    pub page_size: i32,
3126
3127    /// Optional. A page token, received from a previous `ListGlossaryCategories`
3128    /// call. Provide this to retrieve the subsequent page. When paginating, all
3129    /// other parameters provided to `ListGlossaryCategories` must match the call
3130    /// that provided the page token.
3131    pub page_token: std::string::String,
3132
3133    /// Optional. Filter expression that filters GlossaryCategories listed in the
3134    /// response. Filters are supported on the following fields:
3135    ///
3136    /// - immediate_parent
3137    ///
3138    /// ## Examples of using a filter are:
3139    ///
3140    /// ## `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
3141    ///
3142    /// `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
3143    ///
3144    /// This will only return the GlossaryCategories that are directly nested
3145    /// under the specified parent.
3146    pub filter: std::string::String,
3147
3148    /// Optional. Order by expression that orders GlossaryCategories listed in the
3149    /// response. Order by fields are: `name` or `create_time` for the result. If
3150    /// not specified, the ordering is undefined.
3151    pub order_by: std::string::String,
3152
3153    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3154}
3155
3156impl ListGlossaryCategoriesRequest {
3157    pub fn new() -> Self {
3158        std::default::Default::default()
3159    }
3160
3161    /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
3162    ///
3163    /// # Example
3164    /// ```ignore,no_run
3165    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3166    /// let x = ListGlossaryCategoriesRequest::new().set_parent("example");
3167    /// ```
3168    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3169        self.parent = v.into();
3170        self
3171    }
3172
3173    /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
3174    ///
3175    /// # Example
3176    /// ```ignore,no_run
3177    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3178    /// let x = ListGlossaryCategoriesRequest::new().set_page_size(42);
3179    /// ```
3180    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3181        self.page_size = v.into();
3182        self
3183    }
3184
3185    /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
3186    ///
3187    /// # Example
3188    /// ```ignore,no_run
3189    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3190    /// let x = ListGlossaryCategoriesRequest::new().set_page_token("example");
3191    /// ```
3192    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3193        self.page_token = v.into();
3194        self
3195    }
3196
3197    /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
3198    ///
3199    /// # Example
3200    /// ```ignore,no_run
3201    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3202    /// let x = ListGlossaryCategoriesRequest::new().set_filter("example");
3203    /// ```
3204    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3205        self.filter = v.into();
3206        self
3207    }
3208
3209    /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
3210    ///
3211    /// # Example
3212    /// ```ignore,no_run
3213    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3214    /// let x = ListGlossaryCategoriesRequest::new().set_order_by("example");
3215    /// ```
3216    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3217        self.order_by = v.into();
3218        self
3219    }
3220}
3221
3222impl wkt::message::Message for ListGlossaryCategoriesRequest {
3223    fn typename() -> &'static str {
3224        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesRequest"
3225    }
3226}
3227
3228/// List GlossaryCategories Response
3229#[derive(Clone, Default, PartialEq)]
3230#[non_exhaustive]
3231pub struct ListGlossaryCategoriesResponse {
3232    /// Lists the GlossaryCategories in the specified parent.
3233    pub categories: std::vec::Vec<crate::model::GlossaryCategory>,
3234
3235    /// A token, which can be sent as `page_token` to retrieve the next page.
3236    /// If this field is omitted, there are no subsequent pages.
3237    pub next_page_token: std::string::String,
3238
3239    /// Locations that the service couldn't reach.
3240    pub unreachable_locations: std::vec::Vec<std::string::String>,
3241
3242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3243}
3244
3245impl ListGlossaryCategoriesResponse {
3246    pub fn new() -> Self {
3247        std::default::Default::default()
3248    }
3249
3250    /// Sets the value of [categories][crate::model::ListGlossaryCategoriesResponse::categories].
3251    ///
3252    /// # Example
3253    /// ```ignore,no_run
3254    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesResponse;
3255    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
3256    /// let x = ListGlossaryCategoriesResponse::new()
3257    ///     .set_categories([
3258    ///         GlossaryCategory::default()/* use setters */,
3259    ///         GlossaryCategory::default()/* use (different) setters */,
3260    ///     ]);
3261    /// ```
3262    pub fn set_categories<T, V>(mut self, v: T) -> Self
3263    where
3264        T: std::iter::IntoIterator<Item = V>,
3265        V: std::convert::Into<crate::model::GlossaryCategory>,
3266    {
3267        use std::iter::Iterator;
3268        self.categories = v.into_iter().map(|i| i.into()).collect();
3269        self
3270    }
3271
3272    /// Sets the value of [next_page_token][crate::model::ListGlossaryCategoriesResponse::next_page_token].
3273    ///
3274    /// # Example
3275    /// ```ignore,no_run
3276    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesResponse;
3277    /// let x = ListGlossaryCategoriesResponse::new().set_next_page_token("example");
3278    /// ```
3279    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3280        self.next_page_token = v.into();
3281        self
3282    }
3283
3284    /// Sets the value of [unreachable_locations][crate::model::ListGlossaryCategoriesResponse::unreachable_locations].
3285    ///
3286    /// # Example
3287    /// ```ignore,no_run
3288    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesResponse;
3289    /// let x = ListGlossaryCategoriesResponse::new().set_unreachable_locations(["a", "b", "c"]);
3290    /// ```
3291    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
3292    where
3293        T: std::iter::IntoIterator<Item = V>,
3294        V: std::convert::Into<std::string::String>,
3295    {
3296        use std::iter::Iterator;
3297        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
3298        self
3299    }
3300}
3301
3302impl wkt::message::Message for ListGlossaryCategoriesResponse {
3303    fn typename() -> &'static str {
3304        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesResponse"
3305    }
3306}
3307
3308#[doc(hidden)]
3309impl gax::paginator::internal::PageableResponse for ListGlossaryCategoriesResponse {
3310    type PageItem = crate::model::GlossaryCategory;
3311
3312    fn items(self) -> std::vec::Vec<Self::PageItem> {
3313        self.categories
3314    }
3315
3316    fn next_page_token(&self) -> std::string::String {
3317        use std::clone::Clone;
3318        self.next_page_token.clone()
3319    }
3320}
3321
3322/// Creates a new GlossaryTerm under the specified Glossary.
3323#[derive(Clone, Default, PartialEq)]
3324#[non_exhaustive]
3325pub struct CreateGlossaryTermRequest {
3326    /// Required. The parent resource where the GlossaryTerm will be created.
3327    /// Format:
3328    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
3329    /// where `location_id` refers to a Google Cloud region.
3330    pub parent: std::string::String,
3331
3332    /// Required. GlossaryTerm identifier.
3333    pub term_id: std::string::String,
3334
3335    /// Required. The GlossaryTerm to create.
3336    pub term: std::option::Option<crate::model::GlossaryTerm>,
3337
3338    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3339}
3340
3341impl CreateGlossaryTermRequest {
3342    pub fn new() -> Self {
3343        std::default::Default::default()
3344    }
3345
3346    /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
3347    ///
3348    /// # Example
3349    /// ```ignore,no_run
3350    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3351    /// let x = CreateGlossaryTermRequest::new().set_parent("example");
3352    /// ```
3353    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3354        self.parent = v.into();
3355        self
3356    }
3357
3358    /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
3359    ///
3360    /// # Example
3361    /// ```ignore,no_run
3362    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3363    /// let x = CreateGlossaryTermRequest::new().set_term_id("example");
3364    /// ```
3365    pub fn set_term_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3366        self.term_id = v.into();
3367        self
3368    }
3369
3370    /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
3371    ///
3372    /// # Example
3373    /// ```ignore,no_run
3374    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3375    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3376    /// let x = CreateGlossaryTermRequest::new().set_term(GlossaryTerm::default()/* use setters */);
3377    /// ```
3378    pub fn set_term<T>(mut self, v: T) -> Self
3379    where
3380        T: std::convert::Into<crate::model::GlossaryTerm>,
3381    {
3382        self.term = std::option::Option::Some(v.into());
3383        self
3384    }
3385
3386    /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
3387    ///
3388    /// # Example
3389    /// ```ignore,no_run
3390    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3391    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3392    /// let x = CreateGlossaryTermRequest::new().set_or_clear_term(Some(GlossaryTerm::default()/* use setters */));
3393    /// let x = CreateGlossaryTermRequest::new().set_or_clear_term(None::<GlossaryTerm>);
3394    /// ```
3395    pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
3396    where
3397        T: std::convert::Into<crate::model::GlossaryTerm>,
3398    {
3399        self.term = v.map(|x| x.into());
3400        self
3401    }
3402}
3403
3404impl wkt::message::Message for CreateGlossaryTermRequest {
3405    fn typename() -> &'static str {
3406        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryTermRequest"
3407    }
3408}
3409
3410/// Update GlossaryTerm Request
3411#[derive(Clone, Default, PartialEq)]
3412#[non_exhaustive]
3413pub struct UpdateGlossaryTermRequest {
3414    /// Required. The GlossaryTerm to update.
3415    /// The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
3416    /// update. Format:
3417    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
3418    pub term: std::option::Option<crate::model::GlossaryTerm>,
3419
3420    /// Required. The list of fields to update.
3421    pub update_mask: std::option::Option<wkt::FieldMask>,
3422
3423    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3424}
3425
3426impl UpdateGlossaryTermRequest {
3427    pub fn new() -> Self {
3428        std::default::Default::default()
3429    }
3430
3431    /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
3432    ///
3433    /// # Example
3434    /// ```ignore,no_run
3435    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3436    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3437    /// let x = UpdateGlossaryTermRequest::new().set_term(GlossaryTerm::default()/* use setters */);
3438    /// ```
3439    pub fn set_term<T>(mut self, v: T) -> Self
3440    where
3441        T: std::convert::Into<crate::model::GlossaryTerm>,
3442    {
3443        self.term = std::option::Option::Some(v.into());
3444        self
3445    }
3446
3447    /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
3448    ///
3449    /// # Example
3450    /// ```ignore,no_run
3451    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3452    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3453    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_term(Some(GlossaryTerm::default()/* use setters */));
3454    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_term(None::<GlossaryTerm>);
3455    /// ```
3456    pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
3457    where
3458        T: std::convert::Into<crate::model::GlossaryTerm>,
3459    {
3460        self.term = v.map(|x| x.into());
3461        self
3462    }
3463
3464    /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
3465    ///
3466    /// # Example
3467    /// ```ignore,no_run
3468    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3469    /// use wkt::FieldMask;
3470    /// let x = UpdateGlossaryTermRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3471    /// ```
3472    pub fn set_update_mask<T>(mut self, v: T) -> Self
3473    where
3474        T: std::convert::Into<wkt::FieldMask>,
3475    {
3476        self.update_mask = std::option::Option::Some(v.into());
3477        self
3478    }
3479
3480    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
3481    ///
3482    /// # Example
3483    /// ```ignore,no_run
3484    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3485    /// use wkt::FieldMask;
3486    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3487    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3488    /// ```
3489    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3490    where
3491        T: std::convert::Into<wkt::FieldMask>,
3492    {
3493        self.update_mask = v.map(|x| x.into());
3494        self
3495    }
3496}
3497
3498impl wkt::message::Message for UpdateGlossaryTermRequest {
3499    fn typename() -> &'static str {
3500        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryTermRequest"
3501    }
3502}
3503
3504/// Delete GlossaryTerm Request
3505#[derive(Clone, Default, PartialEq)]
3506#[non_exhaustive]
3507pub struct DeleteGlossaryTermRequest {
3508    /// Required. The name of the GlossaryTerm to delete.
3509    /// Format:
3510    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
3511    pub name: std::string::String,
3512
3513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3514}
3515
3516impl DeleteGlossaryTermRequest {
3517    pub fn new() -> Self {
3518        std::default::Default::default()
3519    }
3520
3521    /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
3522    ///
3523    /// # Example
3524    /// ```ignore,no_run
3525    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryTermRequest;
3526    /// let x = DeleteGlossaryTermRequest::new().set_name("example");
3527    /// ```
3528    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3529        self.name = v.into();
3530        self
3531    }
3532}
3533
3534impl wkt::message::Message for DeleteGlossaryTermRequest {
3535    fn typename() -> &'static str {
3536        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryTermRequest"
3537    }
3538}
3539
3540/// Get GlossaryTerm Request
3541#[derive(Clone, Default, PartialEq)]
3542#[non_exhaustive]
3543pub struct GetGlossaryTermRequest {
3544    /// Required. The name of the GlossaryTerm to retrieve.
3545    /// Format:
3546    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
3547    pub name: std::string::String,
3548
3549    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3550}
3551
3552impl GetGlossaryTermRequest {
3553    pub fn new() -> Self {
3554        std::default::Default::default()
3555    }
3556
3557    /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
3558    ///
3559    /// # Example
3560    /// ```ignore,no_run
3561    /// # use google_cloud_dataplex_v1::model::GetGlossaryTermRequest;
3562    /// let x = GetGlossaryTermRequest::new().set_name("example");
3563    /// ```
3564    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3565        self.name = v.into();
3566        self
3567    }
3568}
3569
3570impl wkt::message::Message for GetGlossaryTermRequest {
3571    fn typename() -> &'static str {
3572        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryTermRequest"
3573    }
3574}
3575
3576/// List GlossaryTerms Request
3577#[derive(Clone, Default, PartialEq)]
3578#[non_exhaustive]
3579pub struct ListGlossaryTermsRequest {
3580    /// Required. The parent, which has this collection of GlossaryTerms.
3581    /// Format:
3582    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
3583    /// where `location_id` refers to a Google Cloud region.
3584    pub parent: std::string::String,
3585
3586    /// Optional. The maximum number of GlossaryTerms to return. The service may
3587    /// return fewer than this value. If unspecified, at most 50 GlossaryTerms will
3588    /// be returned. The maximum value is 1000; values above 1000 will be coerced
3589    /// to 1000.
3590    pub page_size: i32,
3591
3592    /// Optional. A page token, received from a previous `ListGlossaryTerms` call.
3593    /// Provide this to retrieve the subsequent page.
3594    /// When paginating, all other parameters provided to `ListGlossaryTerms` must
3595    /// match the call that provided the page token.
3596    pub page_token: std::string::String,
3597
3598    /// Optional. Filter expression that filters GlossaryTerms listed in the
3599    /// response. Filters are supported on the following fields:
3600    ///
3601    /// - immediate_parent
3602    ///
3603    /// ## Examples of using a filter are:
3604    ///
3605    /// ## `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
3606    ///
3607    /// `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
3608    ///
3609    /// This will only return the GlossaryTerms that are directly nested under the
3610    /// specified parent.
3611    pub filter: std::string::String,
3612
3613    /// Optional. Order by expression that orders GlossaryTerms listed in the
3614    /// response. Order by fields are: `name` or `create_time` for the result. If
3615    /// not specified, the ordering is undefined.
3616    pub order_by: std::string::String,
3617
3618    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3619}
3620
3621impl ListGlossaryTermsRequest {
3622    pub fn new() -> Self {
3623        std::default::Default::default()
3624    }
3625
3626    /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
3627    ///
3628    /// # Example
3629    /// ```ignore,no_run
3630    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3631    /// let x = ListGlossaryTermsRequest::new().set_parent("example");
3632    /// ```
3633    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3634        self.parent = v.into();
3635        self
3636    }
3637
3638    /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
3639    ///
3640    /// # Example
3641    /// ```ignore,no_run
3642    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3643    /// let x = ListGlossaryTermsRequest::new().set_page_size(42);
3644    /// ```
3645    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3646        self.page_size = v.into();
3647        self
3648    }
3649
3650    /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
3651    ///
3652    /// # Example
3653    /// ```ignore,no_run
3654    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3655    /// let x = ListGlossaryTermsRequest::new().set_page_token("example");
3656    /// ```
3657    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3658        self.page_token = v.into();
3659        self
3660    }
3661
3662    /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
3663    ///
3664    /// # Example
3665    /// ```ignore,no_run
3666    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3667    /// let x = ListGlossaryTermsRequest::new().set_filter("example");
3668    /// ```
3669    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3670        self.filter = v.into();
3671        self
3672    }
3673
3674    /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
3675    ///
3676    /// # Example
3677    /// ```ignore,no_run
3678    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3679    /// let x = ListGlossaryTermsRequest::new().set_order_by("example");
3680    /// ```
3681    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3682        self.order_by = v.into();
3683        self
3684    }
3685}
3686
3687impl wkt::message::Message for ListGlossaryTermsRequest {
3688    fn typename() -> &'static str {
3689        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsRequest"
3690    }
3691}
3692
3693/// List GlossaryTerms Response
3694#[derive(Clone, Default, PartialEq)]
3695#[non_exhaustive]
3696pub struct ListGlossaryTermsResponse {
3697    /// Lists the GlossaryTerms in the specified parent.
3698    pub terms: std::vec::Vec<crate::model::GlossaryTerm>,
3699
3700    /// A token, which can be sent as `page_token` to retrieve the next page.
3701    /// If this field is omitted, there are no subsequent pages.
3702    pub next_page_token: std::string::String,
3703
3704    /// Locations that the service couldn't reach.
3705    pub unreachable_locations: std::vec::Vec<std::string::String>,
3706
3707    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3708}
3709
3710impl ListGlossaryTermsResponse {
3711    pub fn new() -> Self {
3712        std::default::Default::default()
3713    }
3714
3715    /// Sets the value of [terms][crate::model::ListGlossaryTermsResponse::terms].
3716    ///
3717    /// # Example
3718    /// ```ignore,no_run
3719    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsResponse;
3720    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3721    /// let x = ListGlossaryTermsResponse::new()
3722    ///     .set_terms([
3723    ///         GlossaryTerm::default()/* use setters */,
3724    ///         GlossaryTerm::default()/* use (different) setters */,
3725    ///     ]);
3726    /// ```
3727    pub fn set_terms<T, V>(mut self, v: T) -> Self
3728    where
3729        T: std::iter::IntoIterator<Item = V>,
3730        V: std::convert::Into<crate::model::GlossaryTerm>,
3731    {
3732        use std::iter::Iterator;
3733        self.terms = v.into_iter().map(|i| i.into()).collect();
3734        self
3735    }
3736
3737    /// Sets the value of [next_page_token][crate::model::ListGlossaryTermsResponse::next_page_token].
3738    ///
3739    /// # Example
3740    /// ```ignore,no_run
3741    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsResponse;
3742    /// let x = ListGlossaryTermsResponse::new().set_next_page_token("example");
3743    /// ```
3744    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3745        self.next_page_token = v.into();
3746        self
3747    }
3748
3749    /// Sets the value of [unreachable_locations][crate::model::ListGlossaryTermsResponse::unreachable_locations].
3750    ///
3751    /// # Example
3752    /// ```ignore,no_run
3753    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsResponse;
3754    /// let x = ListGlossaryTermsResponse::new().set_unreachable_locations(["a", "b", "c"]);
3755    /// ```
3756    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
3757    where
3758        T: std::iter::IntoIterator<Item = V>,
3759        V: std::convert::Into<std::string::String>,
3760    {
3761        use std::iter::Iterator;
3762        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
3763        self
3764    }
3765}
3766
3767impl wkt::message::Message for ListGlossaryTermsResponse {
3768    fn typename() -> &'static str {
3769        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsResponse"
3770    }
3771}
3772
3773#[doc(hidden)]
3774impl gax::paginator::internal::PageableResponse for ListGlossaryTermsResponse {
3775    type PageItem = crate::model::GlossaryTerm;
3776
3777    fn items(self) -> std::vec::Vec<Self::PageItem> {
3778        self.terms
3779    }
3780
3781    fn next_page_token(&self) -> std::string::String {
3782        use std::clone::Clone;
3783        self.next_page_token.clone()
3784    }
3785}
3786
3787/// AspectType is a template for creating Aspects, and represents the
3788/// JSON-schema for a given Entry, for example, BigQuery Table Schema.
3789#[derive(Clone, Default, PartialEq)]
3790#[non_exhaustive]
3791pub struct AspectType {
3792    /// Output only. The relative resource name of the AspectType, of the form:
3793    /// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.
3794    pub name: std::string::String,
3795
3796    /// Output only. System generated globally unique ID for the AspectType.
3797    /// If you delete and recreate the AspectType with the same name, then this ID
3798    /// will be different.
3799    pub uid: std::string::String,
3800
3801    /// Output only. The time when the AspectType was created.
3802    pub create_time: std::option::Option<wkt::Timestamp>,
3803
3804    /// Output only. The time when the AspectType was last updated.
3805    pub update_time: std::option::Option<wkt::Timestamp>,
3806
3807    /// Optional. Description of the AspectType.
3808    pub description: std::string::String,
3809
3810    /// Optional. User friendly display name.
3811    pub display_name: std::string::String,
3812
3813    /// Optional. User-defined labels for the AspectType.
3814    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3815
3816    /// The service computes this checksum. The client may send it on update and
3817    /// delete requests to ensure it has an up-to-date value before proceeding.
3818    pub etag: std::string::String,
3819
3820    /// Optional. Immutable. Stores data classification of the aspect.
3821    pub data_classification: crate::model::aspect_type::DataClassification,
3822
3823    /// Immutable. Defines the Authorization for this type.
3824    pub authorization: std::option::Option<crate::model::aspect_type::Authorization>,
3825
3826    /// Required. MetadataTemplate of the aspect.
3827    pub metadata_template: std::option::Option<crate::model::aspect_type::MetadataTemplate>,
3828
3829    /// Output only. Denotes the transfer status of the Aspect Type. It is
3830    /// unspecified for Aspect Types created from Dataplex API.
3831    pub transfer_status: crate::model::TransferStatus,
3832
3833    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3834}
3835
3836impl AspectType {
3837    pub fn new() -> Self {
3838        std::default::Default::default()
3839    }
3840
3841    /// Sets the value of [name][crate::model::AspectType::name].
3842    ///
3843    /// # Example
3844    /// ```ignore,no_run
3845    /// # use google_cloud_dataplex_v1::model::AspectType;
3846    /// let x = AspectType::new().set_name("example");
3847    /// ```
3848    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3849        self.name = v.into();
3850        self
3851    }
3852
3853    /// Sets the value of [uid][crate::model::AspectType::uid].
3854    ///
3855    /// # Example
3856    /// ```ignore,no_run
3857    /// # use google_cloud_dataplex_v1::model::AspectType;
3858    /// let x = AspectType::new().set_uid("example");
3859    /// ```
3860    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3861        self.uid = v.into();
3862        self
3863    }
3864
3865    /// Sets the value of [create_time][crate::model::AspectType::create_time].
3866    ///
3867    /// # Example
3868    /// ```ignore,no_run
3869    /// # use google_cloud_dataplex_v1::model::AspectType;
3870    /// use wkt::Timestamp;
3871    /// let x = AspectType::new().set_create_time(Timestamp::default()/* use setters */);
3872    /// ```
3873    pub fn set_create_time<T>(mut self, v: T) -> Self
3874    where
3875        T: std::convert::Into<wkt::Timestamp>,
3876    {
3877        self.create_time = std::option::Option::Some(v.into());
3878        self
3879    }
3880
3881    /// Sets or clears the value of [create_time][crate::model::AspectType::create_time].
3882    ///
3883    /// # Example
3884    /// ```ignore,no_run
3885    /// # use google_cloud_dataplex_v1::model::AspectType;
3886    /// use wkt::Timestamp;
3887    /// let x = AspectType::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3888    /// let x = AspectType::new().set_or_clear_create_time(None::<Timestamp>);
3889    /// ```
3890    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3891    where
3892        T: std::convert::Into<wkt::Timestamp>,
3893    {
3894        self.create_time = v.map(|x| x.into());
3895        self
3896    }
3897
3898    /// Sets the value of [update_time][crate::model::AspectType::update_time].
3899    ///
3900    /// # Example
3901    /// ```ignore,no_run
3902    /// # use google_cloud_dataplex_v1::model::AspectType;
3903    /// use wkt::Timestamp;
3904    /// let x = AspectType::new().set_update_time(Timestamp::default()/* use setters */);
3905    /// ```
3906    pub fn set_update_time<T>(mut self, v: T) -> Self
3907    where
3908        T: std::convert::Into<wkt::Timestamp>,
3909    {
3910        self.update_time = std::option::Option::Some(v.into());
3911        self
3912    }
3913
3914    /// Sets or clears the value of [update_time][crate::model::AspectType::update_time].
3915    ///
3916    /// # Example
3917    /// ```ignore,no_run
3918    /// # use google_cloud_dataplex_v1::model::AspectType;
3919    /// use wkt::Timestamp;
3920    /// let x = AspectType::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
3921    /// let x = AspectType::new().set_or_clear_update_time(None::<Timestamp>);
3922    /// ```
3923    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3924    where
3925        T: std::convert::Into<wkt::Timestamp>,
3926    {
3927        self.update_time = v.map(|x| x.into());
3928        self
3929    }
3930
3931    /// Sets the value of [description][crate::model::AspectType::description].
3932    ///
3933    /// # Example
3934    /// ```ignore,no_run
3935    /// # use google_cloud_dataplex_v1::model::AspectType;
3936    /// let x = AspectType::new().set_description("example");
3937    /// ```
3938    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3939        self.description = v.into();
3940        self
3941    }
3942
3943    /// Sets the value of [display_name][crate::model::AspectType::display_name].
3944    ///
3945    /// # Example
3946    /// ```ignore,no_run
3947    /// # use google_cloud_dataplex_v1::model::AspectType;
3948    /// let x = AspectType::new().set_display_name("example");
3949    /// ```
3950    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3951        self.display_name = v.into();
3952        self
3953    }
3954
3955    /// Sets the value of [labels][crate::model::AspectType::labels].
3956    ///
3957    /// # Example
3958    /// ```ignore,no_run
3959    /// # use google_cloud_dataplex_v1::model::AspectType;
3960    /// let x = AspectType::new().set_labels([
3961    ///     ("key0", "abc"),
3962    ///     ("key1", "xyz"),
3963    /// ]);
3964    /// ```
3965    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3966    where
3967        T: std::iter::IntoIterator<Item = (K, V)>,
3968        K: std::convert::Into<std::string::String>,
3969        V: std::convert::Into<std::string::String>,
3970    {
3971        use std::iter::Iterator;
3972        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3973        self
3974    }
3975
3976    /// Sets the value of [etag][crate::model::AspectType::etag].
3977    ///
3978    /// # Example
3979    /// ```ignore,no_run
3980    /// # use google_cloud_dataplex_v1::model::AspectType;
3981    /// let x = AspectType::new().set_etag("example");
3982    /// ```
3983    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3984        self.etag = v.into();
3985        self
3986    }
3987
3988    /// Sets the value of [data_classification][crate::model::AspectType::data_classification].
3989    ///
3990    /// # Example
3991    /// ```ignore,no_run
3992    /// # use google_cloud_dataplex_v1::model::AspectType;
3993    /// use google_cloud_dataplex_v1::model::aspect_type::DataClassification;
3994    /// let x0 = AspectType::new().set_data_classification(DataClassification::MetadataAndData);
3995    /// ```
3996    pub fn set_data_classification<
3997        T: std::convert::Into<crate::model::aspect_type::DataClassification>,
3998    >(
3999        mut self,
4000        v: T,
4001    ) -> Self {
4002        self.data_classification = v.into();
4003        self
4004    }
4005
4006    /// Sets the value of [authorization][crate::model::AspectType::authorization].
4007    ///
4008    /// # Example
4009    /// ```ignore,no_run
4010    /// # use google_cloud_dataplex_v1::model::AspectType;
4011    /// use google_cloud_dataplex_v1::model::aspect_type::Authorization;
4012    /// let x = AspectType::new().set_authorization(Authorization::default()/* use setters */);
4013    /// ```
4014    pub fn set_authorization<T>(mut self, v: T) -> Self
4015    where
4016        T: std::convert::Into<crate::model::aspect_type::Authorization>,
4017    {
4018        self.authorization = std::option::Option::Some(v.into());
4019        self
4020    }
4021
4022    /// Sets or clears the value of [authorization][crate::model::AspectType::authorization].
4023    ///
4024    /// # Example
4025    /// ```ignore,no_run
4026    /// # use google_cloud_dataplex_v1::model::AspectType;
4027    /// use google_cloud_dataplex_v1::model::aspect_type::Authorization;
4028    /// let x = AspectType::new().set_or_clear_authorization(Some(Authorization::default()/* use setters */));
4029    /// let x = AspectType::new().set_or_clear_authorization(None::<Authorization>);
4030    /// ```
4031    pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
4032    where
4033        T: std::convert::Into<crate::model::aspect_type::Authorization>,
4034    {
4035        self.authorization = v.map(|x| x.into());
4036        self
4037    }
4038
4039    /// Sets the value of [metadata_template][crate::model::AspectType::metadata_template].
4040    ///
4041    /// # Example
4042    /// ```ignore,no_run
4043    /// # use google_cloud_dataplex_v1::model::AspectType;
4044    /// use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4045    /// let x = AspectType::new().set_metadata_template(MetadataTemplate::default()/* use setters */);
4046    /// ```
4047    pub fn set_metadata_template<T>(mut self, v: T) -> Self
4048    where
4049        T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4050    {
4051        self.metadata_template = std::option::Option::Some(v.into());
4052        self
4053    }
4054
4055    /// Sets or clears the value of [metadata_template][crate::model::AspectType::metadata_template].
4056    ///
4057    /// # Example
4058    /// ```ignore,no_run
4059    /// # use google_cloud_dataplex_v1::model::AspectType;
4060    /// use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4061    /// let x = AspectType::new().set_or_clear_metadata_template(Some(MetadataTemplate::default()/* use setters */));
4062    /// let x = AspectType::new().set_or_clear_metadata_template(None::<MetadataTemplate>);
4063    /// ```
4064    pub fn set_or_clear_metadata_template<T>(mut self, v: std::option::Option<T>) -> Self
4065    where
4066        T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4067    {
4068        self.metadata_template = v.map(|x| x.into());
4069        self
4070    }
4071
4072    /// Sets the value of [transfer_status][crate::model::AspectType::transfer_status].
4073    ///
4074    /// # Example
4075    /// ```ignore,no_run
4076    /// # use google_cloud_dataplex_v1::model::AspectType;
4077    /// use google_cloud_dataplex_v1::model::TransferStatus;
4078    /// let x0 = AspectType::new().set_transfer_status(TransferStatus::Migrated);
4079    /// let x1 = AspectType::new().set_transfer_status(TransferStatus::Transferred);
4080    /// ```
4081    pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
4082        mut self,
4083        v: T,
4084    ) -> Self {
4085        self.transfer_status = v.into();
4086        self
4087    }
4088}
4089
4090impl wkt::message::Message for AspectType {
4091    fn typename() -> &'static str {
4092        "type.googleapis.com/google.cloud.dataplex.v1.AspectType"
4093    }
4094}
4095
4096/// Defines additional types related to [AspectType].
4097pub mod aspect_type {
4098    #[allow(unused_imports)]
4099    use super::*;
4100
4101    /// Authorization for an AspectType.
4102    #[derive(Clone, Default, PartialEq)]
4103    #[non_exhaustive]
4104    pub struct Authorization {
4105        /// Immutable. The IAM permission grantable on the EntryGroup to allow access
4106        /// to instantiate Aspects of Dataplex Universal Catalog owned AspectTypes,
4107        /// only settable for Dataplex Universal Catalog owned Types.
4108        pub alternate_use_permission: std::string::String,
4109
4110        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4111    }
4112
4113    impl Authorization {
4114        pub fn new() -> Self {
4115            std::default::Default::default()
4116        }
4117
4118        /// Sets the value of [alternate_use_permission][crate::model::aspect_type::Authorization::alternate_use_permission].
4119        ///
4120        /// # Example
4121        /// ```ignore,no_run
4122        /// # use google_cloud_dataplex_v1::model::aspect_type::Authorization;
4123        /// let x = Authorization::new().set_alternate_use_permission("example");
4124        /// ```
4125        pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
4126            mut self,
4127            v: T,
4128        ) -> Self {
4129            self.alternate_use_permission = v.into();
4130            self
4131        }
4132    }
4133
4134    impl wkt::message::Message for Authorization {
4135        fn typename() -> &'static str {
4136            "type.googleapis.com/google.cloud.dataplex.v1.AspectType.Authorization"
4137        }
4138    }
4139
4140    /// MetadataTemplate definition for an AspectType.
4141    #[derive(Clone, Default, PartialEq)]
4142    #[non_exhaustive]
4143    pub struct MetadataTemplate {
4144        /// Optional. Index is used to encode Template messages. The value of index
4145        /// can range between 1 and 2,147,483,647. Index must be unique within all
4146        /// fields in a Template. (Nested Templates can reuse indexes). Once a
4147        /// Template is defined, the index cannot be changed, because it identifies
4148        /// the field in the actual storage format. Index is a mandatory field, but
4149        /// it is optional for top level fields, and map/array "values" definitions.
4150        pub index: i32,
4151
4152        /// Required. The name of the field.
4153        pub name: std::string::String,
4154
4155        /// Required. The datatype of this field. The following values are supported:
4156        ///
4157        /// Primitive types:
4158        ///
4159        /// * string
4160        /// * int
4161        /// * bool
4162        /// * double
4163        /// * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples:
4164        ///   "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z").
4165        ///
4166        /// Complex types:
4167        ///
4168        /// * enum
4169        /// * array
4170        /// * map
4171        /// * record
4172        pub r#type: std::string::String,
4173
4174        /// Optional. Field definition. You must specify it if the type is record. It
4175        /// defines the nested fields.
4176        pub record_fields: std::vec::Vec<crate::model::aspect_type::MetadataTemplate>,
4177
4178        /// Optional. The list of values for an enum type. You must define it if the
4179        /// type is enum.
4180        pub enum_values: std::vec::Vec<crate::model::aspect_type::metadata_template::EnumValue>,
4181
4182        /// Optional. If the type is map, set map_items. map_items can refer to a
4183        /// primitive field or a complex (record only) field. To specify a primitive
4184        /// field, you only need to set name and type in the nested
4185        /// MetadataTemplate. The recommended value for the name field is item, as
4186        /// this isn't used in the actual payload.
4187        pub map_items:
4188            std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
4189
4190        /// Optional. If the type is array, set array_items. array_items can refer
4191        /// to a primitive field or a complex (record only) field. To specify a
4192        /// primitive field, you only need to set name and type in the nested
4193        /// MetadataTemplate. The recommended value for the name field is item, as
4194        /// this isn't used in the actual payload.
4195        pub array_items:
4196            std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
4197
4198        /// Optional. You can use type id if this definition of the field needs to be
4199        /// reused later. The type id must be unique across the entire template. You
4200        /// can only specify it if the field type is record.
4201        pub type_id: std::string::String,
4202
4203        /// Optional. A reference to another field definition (not an inline
4204        /// definition). The value must be equal to the value of an id field defined
4205        /// elsewhere in the MetadataTemplate. Only fields with record type can
4206        /// refer to other fields.
4207        pub type_ref: std::string::String,
4208
4209        /// Optional. Specifies the constraints on this field.
4210        pub constraints:
4211            std::option::Option<crate::model::aspect_type::metadata_template::Constraints>,
4212
4213        /// Optional. Specifies annotations on this field.
4214        pub annotations:
4215            std::option::Option<crate::model::aspect_type::metadata_template::Annotations>,
4216
4217        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4218    }
4219
4220    impl MetadataTemplate {
4221        pub fn new() -> Self {
4222            std::default::Default::default()
4223        }
4224
4225        /// Sets the value of [index][crate::model::aspect_type::MetadataTemplate::index].
4226        ///
4227        /// # Example
4228        /// ```ignore,no_run
4229        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4230        /// let x = MetadataTemplate::new().set_index(42);
4231        /// ```
4232        pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4233            self.index = v.into();
4234            self
4235        }
4236
4237        /// Sets the value of [name][crate::model::aspect_type::MetadataTemplate::name].
4238        ///
4239        /// # Example
4240        /// ```ignore,no_run
4241        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4242        /// let x = MetadataTemplate::new().set_name("example");
4243        /// ```
4244        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4245            self.name = v.into();
4246            self
4247        }
4248
4249        /// Sets the value of [r#type][crate::model::aspect_type::MetadataTemplate::type].
4250        ///
4251        /// # Example
4252        /// ```ignore,no_run
4253        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4254        /// let x = MetadataTemplate::new().set_type("example");
4255        /// ```
4256        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4257            self.r#type = v.into();
4258            self
4259        }
4260
4261        /// Sets the value of [record_fields][crate::model::aspect_type::MetadataTemplate::record_fields].
4262        ///
4263        /// # Example
4264        /// ```ignore,no_run
4265        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4266        /// let x = MetadataTemplate::new()
4267        ///     .set_record_fields([
4268        ///         MetadataTemplate::default()/* use setters */,
4269        ///         MetadataTemplate::default()/* use (different) setters */,
4270        ///     ]);
4271        /// ```
4272        pub fn set_record_fields<T, V>(mut self, v: T) -> Self
4273        where
4274            T: std::iter::IntoIterator<Item = V>,
4275            V: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4276        {
4277            use std::iter::Iterator;
4278            self.record_fields = v.into_iter().map(|i| i.into()).collect();
4279            self
4280        }
4281
4282        /// Sets the value of [enum_values][crate::model::aspect_type::MetadataTemplate::enum_values].
4283        ///
4284        /// # Example
4285        /// ```ignore,no_run
4286        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4287        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4288        /// let x = MetadataTemplate::new()
4289        ///     .set_enum_values([
4290        ///         EnumValue::default()/* use setters */,
4291        ///         EnumValue::default()/* use (different) setters */,
4292        ///     ]);
4293        /// ```
4294        pub fn set_enum_values<T, V>(mut self, v: T) -> Self
4295        where
4296            T: std::iter::IntoIterator<Item = V>,
4297            V: std::convert::Into<crate::model::aspect_type::metadata_template::EnumValue>,
4298        {
4299            use std::iter::Iterator;
4300            self.enum_values = v.into_iter().map(|i| i.into()).collect();
4301            self
4302        }
4303
4304        /// Sets the value of [map_items][crate::model::aspect_type::MetadataTemplate::map_items].
4305        ///
4306        /// # Example
4307        /// ```ignore,no_run
4308        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4309        /// let x = MetadataTemplate::new().set_map_items(MetadataTemplate::default()/* use setters */);
4310        /// ```
4311        pub fn set_map_items<T>(mut self, v: T) -> Self
4312        where
4313            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4314        {
4315            self.map_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
4316            self
4317        }
4318
4319        /// Sets or clears the value of [map_items][crate::model::aspect_type::MetadataTemplate::map_items].
4320        ///
4321        /// # Example
4322        /// ```ignore,no_run
4323        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4324        /// let x = MetadataTemplate::new().set_or_clear_map_items(Some(MetadataTemplate::default()/* use setters */));
4325        /// let x = MetadataTemplate::new().set_or_clear_map_items(None::<MetadataTemplate>);
4326        /// ```
4327        pub fn set_or_clear_map_items<T>(mut self, v: std::option::Option<T>) -> Self
4328        where
4329            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4330        {
4331            self.map_items = v.map(|x| std::boxed::Box::new(x.into()));
4332            self
4333        }
4334
4335        /// Sets the value of [array_items][crate::model::aspect_type::MetadataTemplate::array_items].
4336        ///
4337        /// # Example
4338        /// ```ignore,no_run
4339        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4340        /// let x = MetadataTemplate::new().set_array_items(MetadataTemplate::default()/* use setters */);
4341        /// ```
4342        pub fn set_array_items<T>(mut self, v: T) -> Self
4343        where
4344            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4345        {
4346            self.array_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
4347            self
4348        }
4349
4350        /// Sets or clears the value of [array_items][crate::model::aspect_type::MetadataTemplate::array_items].
4351        ///
4352        /// # Example
4353        /// ```ignore,no_run
4354        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4355        /// let x = MetadataTemplate::new().set_or_clear_array_items(Some(MetadataTemplate::default()/* use setters */));
4356        /// let x = MetadataTemplate::new().set_or_clear_array_items(None::<MetadataTemplate>);
4357        /// ```
4358        pub fn set_or_clear_array_items<T>(mut self, v: std::option::Option<T>) -> Self
4359        where
4360            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4361        {
4362            self.array_items = v.map(|x| std::boxed::Box::new(x.into()));
4363            self
4364        }
4365
4366        /// Sets the value of [type_id][crate::model::aspect_type::MetadataTemplate::type_id].
4367        ///
4368        /// # Example
4369        /// ```ignore,no_run
4370        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4371        /// let x = MetadataTemplate::new().set_type_id("example");
4372        /// ```
4373        pub fn set_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4374            self.type_id = v.into();
4375            self
4376        }
4377
4378        /// Sets the value of [type_ref][crate::model::aspect_type::MetadataTemplate::type_ref].
4379        ///
4380        /// # Example
4381        /// ```ignore,no_run
4382        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4383        /// let x = MetadataTemplate::new().set_type_ref("example");
4384        /// ```
4385        pub fn set_type_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4386            self.type_ref = v.into();
4387            self
4388        }
4389
4390        /// Sets the value of [constraints][crate::model::aspect_type::MetadataTemplate::constraints].
4391        ///
4392        /// # Example
4393        /// ```ignore,no_run
4394        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4395        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Constraints;
4396        /// let x = MetadataTemplate::new().set_constraints(Constraints::default()/* use setters */);
4397        /// ```
4398        pub fn set_constraints<T>(mut self, v: T) -> Self
4399        where
4400            T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
4401        {
4402            self.constraints = std::option::Option::Some(v.into());
4403            self
4404        }
4405
4406        /// Sets or clears the value of [constraints][crate::model::aspect_type::MetadataTemplate::constraints].
4407        ///
4408        /// # Example
4409        /// ```ignore,no_run
4410        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4411        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Constraints;
4412        /// let x = MetadataTemplate::new().set_or_clear_constraints(Some(Constraints::default()/* use setters */));
4413        /// let x = MetadataTemplate::new().set_or_clear_constraints(None::<Constraints>);
4414        /// ```
4415        pub fn set_or_clear_constraints<T>(mut self, v: std::option::Option<T>) -> Self
4416        where
4417            T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
4418        {
4419            self.constraints = v.map(|x| x.into());
4420            self
4421        }
4422
4423        /// Sets the value of [annotations][crate::model::aspect_type::MetadataTemplate::annotations].
4424        ///
4425        /// # Example
4426        /// ```ignore,no_run
4427        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4428        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4429        /// let x = MetadataTemplate::new().set_annotations(Annotations::default()/* use setters */);
4430        /// ```
4431        pub fn set_annotations<T>(mut self, v: T) -> Self
4432        where
4433            T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
4434        {
4435            self.annotations = std::option::Option::Some(v.into());
4436            self
4437        }
4438
4439        /// Sets or clears the value of [annotations][crate::model::aspect_type::MetadataTemplate::annotations].
4440        ///
4441        /// # Example
4442        /// ```ignore,no_run
4443        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4444        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4445        /// let x = MetadataTemplate::new().set_or_clear_annotations(Some(Annotations::default()/* use setters */));
4446        /// let x = MetadataTemplate::new().set_or_clear_annotations(None::<Annotations>);
4447        /// ```
4448        pub fn set_or_clear_annotations<T>(mut self, v: std::option::Option<T>) -> Self
4449        where
4450            T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
4451        {
4452            self.annotations = v.map(|x| x.into());
4453            self
4454        }
4455    }
4456
4457    impl wkt::message::Message for MetadataTemplate {
4458        fn typename() -> &'static str {
4459            "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate"
4460        }
4461    }
4462
4463    /// Defines additional types related to [MetadataTemplate].
4464    pub mod metadata_template {
4465        #[allow(unused_imports)]
4466        use super::*;
4467
4468        /// Definition of Enumvalue, to be used for enum fields.
4469        #[derive(Clone, Default, PartialEq)]
4470        #[non_exhaustive]
4471        pub struct EnumValue {
4472            /// Required. Index for the enum value. It can't be modified.
4473            pub index: i32,
4474
4475            /// Required. Name of the enumvalue. This is the actual value that the
4476            /// aspect can contain.
4477            pub name: std::string::String,
4478
4479            /// Optional. You can set this message if you need to deprecate an enum
4480            /// value.
4481            pub deprecated: std::string::String,
4482
4483            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4484        }
4485
4486        impl EnumValue {
4487            pub fn new() -> Self {
4488                std::default::Default::default()
4489            }
4490
4491            /// Sets the value of [index][crate::model::aspect_type::metadata_template::EnumValue::index].
4492            ///
4493            /// # Example
4494            /// ```ignore,no_run
4495            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4496            /// let x = EnumValue::new().set_index(42);
4497            /// ```
4498            pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4499                self.index = v.into();
4500                self
4501            }
4502
4503            /// Sets the value of [name][crate::model::aspect_type::metadata_template::EnumValue::name].
4504            ///
4505            /// # Example
4506            /// ```ignore,no_run
4507            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4508            /// let x = EnumValue::new().set_name("example");
4509            /// ```
4510            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4511                self.name = v.into();
4512                self
4513            }
4514
4515            /// Sets the value of [deprecated][crate::model::aspect_type::metadata_template::EnumValue::deprecated].
4516            ///
4517            /// # Example
4518            /// ```ignore,no_run
4519            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4520            /// let x = EnumValue::new().set_deprecated("example");
4521            /// ```
4522            pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
4523                mut self,
4524                v: T,
4525            ) -> Self {
4526                self.deprecated = v.into();
4527                self
4528            }
4529        }
4530
4531        impl wkt::message::Message for EnumValue {
4532            fn typename() -> &'static str {
4533                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue"
4534            }
4535        }
4536
4537        /// Definition of the constraints of a field.
4538        #[derive(Clone, Default, PartialEq)]
4539        #[non_exhaustive]
4540        pub struct Constraints {
4541            /// Optional. Marks this field as optional or required.
4542            pub required: bool,
4543
4544            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4545        }
4546
4547        impl Constraints {
4548            pub fn new() -> Self {
4549                std::default::Default::default()
4550            }
4551
4552            /// Sets the value of [required][crate::model::aspect_type::metadata_template::Constraints::required].
4553            ///
4554            /// # Example
4555            /// ```ignore,no_run
4556            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Constraints;
4557            /// let x = Constraints::new().set_required(true);
4558            /// ```
4559            pub fn set_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4560                self.required = v.into();
4561                self
4562            }
4563        }
4564
4565        impl wkt::message::Message for Constraints {
4566            fn typename() -> &'static str {
4567                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints"
4568            }
4569        }
4570
4571        /// Definition of the annotations of a field.
4572        #[derive(Clone, Default, PartialEq)]
4573        #[non_exhaustive]
4574        pub struct Annotations {
4575            /// Optional. Marks a field as deprecated. You can include a deprecation
4576            /// message.
4577            pub deprecated: std::string::String,
4578
4579            /// Optional. Display name for a field.
4580            pub display_name: std::string::String,
4581
4582            /// Optional. Description for a field.
4583            pub description: std::string::String,
4584
4585            /// Optional. Display order for a field. You can use this to reorder where
4586            /// a field is rendered.
4587            pub display_order: i32,
4588
4589            /// Optional. You can use String Type annotations to specify special
4590            /// meaning to string fields. The following values are supported:
4591            ///
4592            /// * richText: The field must be interpreted as a rich text field.
4593            /// * url: A fully qualified URL link.
4594            /// * resource: A service qualified resource reference.
4595            pub string_type: std::string::String,
4596
4597            /// Optional. Suggested hints for string fields. You can use them to
4598            /// suggest values to users through console.
4599            pub string_values: std::vec::Vec<std::string::String>,
4600
4601            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4602        }
4603
4604        impl Annotations {
4605            pub fn new() -> Self {
4606                std::default::Default::default()
4607            }
4608
4609            /// Sets the value of [deprecated][crate::model::aspect_type::metadata_template::Annotations::deprecated].
4610            ///
4611            /// # Example
4612            /// ```ignore,no_run
4613            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4614            /// let x = Annotations::new().set_deprecated("example");
4615            /// ```
4616            pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
4617                mut self,
4618                v: T,
4619            ) -> Self {
4620                self.deprecated = v.into();
4621                self
4622            }
4623
4624            /// Sets the value of [display_name][crate::model::aspect_type::metadata_template::Annotations::display_name].
4625            ///
4626            /// # Example
4627            /// ```ignore,no_run
4628            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4629            /// let x = Annotations::new().set_display_name("example");
4630            /// ```
4631            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
4632                mut self,
4633                v: T,
4634            ) -> Self {
4635                self.display_name = v.into();
4636                self
4637            }
4638
4639            /// Sets the value of [description][crate::model::aspect_type::metadata_template::Annotations::description].
4640            ///
4641            /// # Example
4642            /// ```ignore,no_run
4643            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4644            /// let x = Annotations::new().set_description("example");
4645            /// ```
4646            pub fn set_description<T: std::convert::Into<std::string::String>>(
4647                mut self,
4648                v: T,
4649            ) -> Self {
4650                self.description = v.into();
4651                self
4652            }
4653
4654            /// Sets the value of [display_order][crate::model::aspect_type::metadata_template::Annotations::display_order].
4655            ///
4656            /// # Example
4657            /// ```ignore,no_run
4658            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4659            /// let x = Annotations::new().set_display_order(42);
4660            /// ```
4661            pub fn set_display_order<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4662                self.display_order = v.into();
4663                self
4664            }
4665
4666            /// Sets the value of [string_type][crate::model::aspect_type::metadata_template::Annotations::string_type].
4667            ///
4668            /// # Example
4669            /// ```ignore,no_run
4670            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4671            /// let x = Annotations::new().set_string_type("example");
4672            /// ```
4673            pub fn set_string_type<T: std::convert::Into<std::string::String>>(
4674                mut self,
4675                v: T,
4676            ) -> Self {
4677                self.string_type = v.into();
4678                self
4679            }
4680
4681            /// Sets the value of [string_values][crate::model::aspect_type::metadata_template::Annotations::string_values].
4682            ///
4683            /// # Example
4684            /// ```ignore,no_run
4685            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4686            /// let x = Annotations::new().set_string_values(["a", "b", "c"]);
4687            /// ```
4688            pub fn set_string_values<T, V>(mut self, v: T) -> Self
4689            where
4690                T: std::iter::IntoIterator<Item = V>,
4691                V: std::convert::Into<std::string::String>,
4692            {
4693                use std::iter::Iterator;
4694                self.string_values = v.into_iter().map(|i| i.into()).collect();
4695                self
4696            }
4697        }
4698
4699        impl wkt::message::Message for Annotations {
4700            fn typename() -> &'static str {
4701                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations"
4702            }
4703        }
4704    }
4705
4706    /// Classifies the data stored by the aspect.
4707    ///
4708    /// # Working with unknown values
4709    ///
4710    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4711    /// additional enum variants at any time. Adding new variants is not considered
4712    /// a breaking change. Applications should write their code in anticipation of:
4713    ///
4714    /// - New values appearing in future releases of the client library, **and**
4715    /// - New values received dynamically, without application changes.
4716    ///
4717    /// Please consult the [Working with enums] section in the user guide for some
4718    /// guidelines.
4719    ///
4720    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4721    #[derive(Clone, Debug, PartialEq)]
4722    #[non_exhaustive]
4723    pub enum DataClassification {
4724        /// Denotes that the aspect contains only metadata.
4725        Unspecified,
4726        /// Metadata and data classification.
4727        MetadataAndData,
4728        /// If set, the enum was initialized with an unknown value.
4729        ///
4730        /// Applications can examine the value using [DataClassification::value] or
4731        /// [DataClassification::name].
4732        UnknownValue(data_classification::UnknownValue),
4733    }
4734
4735    #[doc(hidden)]
4736    pub mod data_classification {
4737        #[allow(unused_imports)]
4738        use super::*;
4739        #[derive(Clone, Debug, PartialEq)]
4740        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4741    }
4742
4743    impl DataClassification {
4744        /// Gets the enum value.
4745        ///
4746        /// Returns `None` if the enum contains an unknown value deserialized from
4747        /// the string representation of enums.
4748        pub fn value(&self) -> std::option::Option<i32> {
4749            match self {
4750                Self::Unspecified => std::option::Option::Some(0),
4751                Self::MetadataAndData => std::option::Option::Some(1),
4752                Self::UnknownValue(u) => u.0.value(),
4753            }
4754        }
4755
4756        /// Gets the enum value as a string.
4757        ///
4758        /// Returns `None` if the enum contains an unknown value deserialized from
4759        /// the integer representation of enums.
4760        pub fn name(&self) -> std::option::Option<&str> {
4761            match self {
4762                Self::Unspecified => std::option::Option::Some("DATA_CLASSIFICATION_UNSPECIFIED"),
4763                Self::MetadataAndData => std::option::Option::Some("METADATA_AND_DATA"),
4764                Self::UnknownValue(u) => u.0.name(),
4765            }
4766        }
4767    }
4768
4769    impl std::default::Default for DataClassification {
4770        fn default() -> Self {
4771            use std::convert::From;
4772            Self::from(0)
4773        }
4774    }
4775
4776    impl std::fmt::Display for DataClassification {
4777        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4778            wkt::internal::display_enum(f, self.name(), self.value())
4779        }
4780    }
4781
4782    impl std::convert::From<i32> for DataClassification {
4783        fn from(value: i32) -> Self {
4784            match value {
4785                0 => Self::Unspecified,
4786                1 => Self::MetadataAndData,
4787                _ => Self::UnknownValue(data_classification::UnknownValue(
4788                    wkt::internal::UnknownEnumValue::Integer(value),
4789                )),
4790            }
4791        }
4792    }
4793
4794    impl std::convert::From<&str> for DataClassification {
4795        fn from(value: &str) -> Self {
4796            use std::string::ToString;
4797            match value {
4798                "DATA_CLASSIFICATION_UNSPECIFIED" => Self::Unspecified,
4799                "METADATA_AND_DATA" => Self::MetadataAndData,
4800                _ => Self::UnknownValue(data_classification::UnknownValue(
4801                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4802                )),
4803            }
4804        }
4805    }
4806
4807    impl serde::ser::Serialize for DataClassification {
4808        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4809        where
4810            S: serde::Serializer,
4811        {
4812            match self {
4813                Self::Unspecified => serializer.serialize_i32(0),
4814                Self::MetadataAndData => serializer.serialize_i32(1),
4815                Self::UnknownValue(u) => u.0.serialize(serializer),
4816            }
4817        }
4818    }
4819
4820    impl<'de> serde::de::Deserialize<'de> for DataClassification {
4821        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4822        where
4823            D: serde::Deserializer<'de>,
4824        {
4825            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataClassification>::new(
4826                ".google.cloud.dataplex.v1.AspectType.DataClassification",
4827            ))
4828        }
4829    }
4830}
4831
4832/// An Entry Group represents a logical grouping of one or more Entries.
4833#[derive(Clone, Default, PartialEq)]
4834#[non_exhaustive]
4835pub struct EntryGroup {
4836    /// Output only. The relative resource name of the EntryGroup, in the format
4837    /// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}.
4838    pub name: std::string::String,
4839
4840    /// Output only. System generated globally unique ID for the EntryGroup. If you
4841    /// delete and recreate the EntryGroup with the same name, this ID will be
4842    /// different.
4843    pub uid: std::string::String,
4844
4845    /// Output only. The time when the EntryGroup was created.
4846    pub create_time: std::option::Option<wkt::Timestamp>,
4847
4848    /// Output only. The time when the EntryGroup was last updated.
4849    pub update_time: std::option::Option<wkt::Timestamp>,
4850
4851    /// Optional. Description of the EntryGroup.
4852    pub description: std::string::String,
4853
4854    /// Optional. User friendly display name.
4855    pub display_name: std::string::String,
4856
4857    /// Optional. User-defined labels for the EntryGroup.
4858    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4859
4860    /// This checksum is computed by the service, and might be sent on update and
4861    /// delete requests to ensure the client has an up-to-date value before
4862    /// proceeding.
4863    pub etag: std::string::String,
4864
4865    /// Output only. Denotes the transfer status of the Entry Group. It is
4866    /// unspecified for Entry Group created from Dataplex API.
4867    pub transfer_status: crate::model::TransferStatus,
4868
4869    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4870}
4871
4872impl EntryGroup {
4873    pub fn new() -> Self {
4874        std::default::Default::default()
4875    }
4876
4877    /// Sets the value of [name][crate::model::EntryGroup::name].
4878    ///
4879    /// # Example
4880    /// ```ignore,no_run
4881    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4882    /// let x = EntryGroup::new().set_name("example");
4883    /// ```
4884    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4885        self.name = v.into();
4886        self
4887    }
4888
4889    /// Sets the value of [uid][crate::model::EntryGroup::uid].
4890    ///
4891    /// # Example
4892    /// ```ignore,no_run
4893    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4894    /// let x = EntryGroup::new().set_uid("example");
4895    /// ```
4896    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4897        self.uid = v.into();
4898        self
4899    }
4900
4901    /// Sets the value of [create_time][crate::model::EntryGroup::create_time].
4902    ///
4903    /// # Example
4904    /// ```ignore,no_run
4905    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4906    /// use wkt::Timestamp;
4907    /// let x = EntryGroup::new().set_create_time(Timestamp::default()/* use setters */);
4908    /// ```
4909    pub fn set_create_time<T>(mut self, v: T) -> Self
4910    where
4911        T: std::convert::Into<wkt::Timestamp>,
4912    {
4913        self.create_time = std::option::Option::Some(v.into());
4914        self
4915    }
4916
4917    /// Sets or clears the value of [create_time][crate::model::EntryGroup::create_time].
4918    ///
4919    /// # Example
4920    /// ```ignore,no_run
4921    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4922    /// use wkt::Timestamp;
4923    /// let x = EntryGroup::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
4924    /// let x = EntryGroup::new().set_or_clear_create_time(None::<Timestamp>);
4925    /// ```
4926    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4927    where
4928        T: std::convert::Into<wkt::Timestamp>,
4929    {
4930        self.create_time = v.map(|x| x.into());
4931        self
4932    }
4933
4934    /// Sets the value of [update_time][crate::model::EntryGroup::update_time].
4935    ///
4936    /// # Example
4937    /// ```ignore,no_run
4938    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4939    /// use wkt::Timestamp;
4940    /// let x = EntryGroup::new().set_update_time(Timestamp::default()/* use setters */);
4941    /// ```
4942    pub fn set_update_time<T>(mut self, v: T) -> Self
4943    where
4944        T: std::convert::Into<wkt::Timestamp>,
4945    {
4946        self.update_time = std::option::Option::Some(v.into());
4947        self
4948    }
4949
4950    /// Sets or clears the value of [update_time][crate::model::EntryGroup::update_time].
4951    ///
4952    /// # Example
4953    /// ```ignore,no_run
4954    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4955    /// use wkt::Timestamp;
4956    /// let x = EntryGroup::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
4957    /// let x = EntryGroup::new().set_or_clear_update_time(None::<Timestamp>);
4958    /// ```
4959    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4960    where
4961        T: std::convert::Into<wkt::Timestamp>,
4962    {
4963        self.update_time = v.map(|x| x.into());
4964        self
4965    }
4966
4967    /// Sets the value of [description][crate::model::EntryGroup::description].
4968    ///
4969    /// # Example
4970    /// ```ignore,no_run
4971    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4972    /// let x = EntryGroup::new().set_description("example");
4973    /// ```
4974    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4975        self.description = v.into();
4976        self
4977    }
4978
4979    /// Sets the value of [display_name][crate::model::EntryGroup::display_name].
4980    ///
4981    /// # Example
4982    /// ```ignore,no_run
4983    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4984    /// let x = EntryGroup::new().set_display_name("example");
4985    /// ```
4986    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4987        self.display_name = v.into();
4988        self
4989    }
4990
4991    /// Sets the value of [labels][crate::model::EntryGroup::labels].
4992    ///
4993    /// # Example
4994    /// ```ignore,no_run
4995    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4996    /// let x = EntryGroup::new().set_labels([
4997    ///     ("key0", "abc"),
4998    ///     ("key1", "xyz"),
4999    /// ]);
5000    /// ```
5001    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5002    where
5003        T: std::iter::IntoIterator<Item = (K, V)>,
5004        K: std::convert::Into<std::string::String>,
5005        V: std::convert::Into<std::string::String>,
5006    {
5007        use std::iter::Iterator;
5008        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5009        self
5010    }
5011
5012    /// Sets the value of [etag][crate::model::EntryGroup::etag].
5013    ///
5014    /// # Example
5015    /// ```ignore,no_run
5016    /// # use google_cloud_dataplex_v1::model::EntryGroup;
5017    /// let x = EntryGroup::new().set_etag("example");
5018    /// ```
5019    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5020        self.etag = v.into();
5021        self
5022    }
5023
5024    /// Sets the value of [transfer_status][crate::model::EntryGroup::transfer_status].
5025    ///
5026    /// # Example
5027    /// ```ignore,no_run
5028    /// # use google_cloud_dataplex_v1::model::EntryGroup;
5029    /// use google_cloud_dataplex_v1::model::TransferStatus;
5030    /// let x0 = EntryGroup::new().set_transfer_status(TransferStatus::Migrated);
5031    /// let x1 = EntryGroup::new().set_transfer_status(TransferStatus::Transferred);
5032    /// ```
5033    pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
5034        mut self,
5035        v: T,
5036    ) -> Self {
5037        self.transfer_status = v.into();
5038        self
5039    }
5040}
5041
5042impl wkt::message::Message for EntryGroup {
5043    fn typename() -> &'static str {
5044        "type.googleapis.com/google.cloud.dataplex.v1.EntryGroup"
5045    }
5046}
5047
5048/// Entry Type is a template for creating Entries.
5049#[derive(Clone, Default, PartialEq)]
5050#[non_exhaustive]
5051pub struct EntryType {
5052    /// Output only. The relative resource name of the EntryType, of the form:
5053    /// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.
5054    pub name: std::string::String,
5055
5056    /// Output only. System generated globally unique ID for the EntryType. This ID
5057    /// will be different if the EntryType is deleted and re-created with the same
5058    /// name.
5059    pub uid: std::string::String,
5060
5061    /// Output only. The time when the EntryType was created.
5062    pub create_time: std::option::Option<wkt::Timestamp>,
5063
5064    /// Output only. The time when the EntryType was last updated.
5065    pub update_time: std::option::Option<wkt::Timestamp>,
5066
5067    /// Optional. Description of the EntryType.
5068    pub description: std::string::String,
5069
5070    /// Optional. User friendly display name.
5071    pub display_name: std::string::String,
5072
5073    /// Optional. User-defined labels for the EntryType.
5074    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5075
5076    /// Optional. This checksum is computed by the service, and might be sent on
5077    /// update and delete requests to ensure the client has an up-to-date value
5078    /// before proceeding.
5079    pub etag: std::string::String,
5080
5081    /// Optional. Indicates the classes this Entry Type belongs to, for example,
5082    /// TABLE, DATABASE, MODEL.
5083    pub type_aliases: std::vec::Vec<std::string::String>,
5084
5085    /// Optional. The platform that Entries of this type belongs to.
5086    pub platform: std::string::String,
5087
5088    /// Optional. The system that Entries of this type belongs to. Examples include
5089    /// CloudSQL, MariaDB etc
5090    pub system: std::string::String,
5091
5092    /// AspectInfo for the entry type.
5093    pub required_aspects: std::vec::Vec<crate::model::entry_type::AspectInfo>,
5094
5095    /// Immutable. Authorization defined for this type.
5096    pub authorization: std::option::Option<crate::model::entry_type::Authorization>,
5097
5098    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5099}
5100
5101impl EntryType {
5102    pub fn new() -> Self {
5103        std::default::Default::default()
5104    }
5105
5106    /// Sets the value of [name][crate::model::EntryType::name].
5107    ///
5108    /// # Example
5109    /// ```ignore,no_run
5110    /// # use google_cloud_dataplex_v1::model::EntryType;
5111    /// let x = EntryType::new().set_name("example");
5112    /// ```
5113    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5114        self.name = v.into();
5115        self
5116    }
5117
5118    /// Sets the value of [uid][crate::model::EntryType::uid].
5119    ///
5120    /// # Example
5121    /// ```ignore,no_run
5122    /// # use google_cloud_dataplex_v1::model::EntryType;
5123    /// let x = EntryType::new().set_uid("example");
5124    /// ```
5125    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5126        self.uid = v.into();
5127        self
5128    }
5129
5130    /// Sets the value of [create_time][crate::model::EntryType::create_time].
5131    ///
5132    /// # Example
5133    /// ```ignore,no_run
5134    /// # use google_cloud_dataplex_v1::model::EntryType;
5135    /// use wkt::Timestamp;
5136    /// let x = EntryType::new().set_create_time(Timestamp::default()/* use setters */);
5137    /// ```
5138    pub fn set_create_time<T>(mut self, v: T) -> Self
5139    where
5140        T: std::convert::Into<wkt::Timestamp>,
5141    {
5142        self.create_time = std::option::Option::Some(v.into());
5143        self
5144    }
5145
5146    /// Sets or clears the value of [create_time][crate::model::EntryType::create_time].
5147    ///
5148    /// # Example
5149    /// ```ignore,no_run
5150    /// # use google_cloud_dataplex_v1::model::EntryType;
5151    /// use wkt::Timestamp;
5152    /// let x = EntryType::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5153    /// let x = EntryType::new().set_or_clear_create_time(None::<Timestamp>);
5154    /// ```
5155    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5156    where
5157        T: std::convert::Into<wkt::Timestamp>,
5158    {
5159        self.create_time = v.map(|x| x.into());
5160        self
5161    }
5162
5163    /// Sets the value of [update_time][crate::model::EntryType::update_time].
5164    ///
5165    /// # Example
5166    /// ```ignore,no_run
5167    /// # use google_cloud_dataplex_v1::model::EntryType;
5168    /// use wkt::Timestamp;
5169    /// let x = EntryType::new().set_update_time(Timestamp::default()/* use setters */);
5170    /// ```
5171    pub fn set_update_time<T>(mut self, v: T) -> Self
5172    where
5173        T: std::convert::Into<wkt::Timestamp>,
5174    {
5175        self.update_time = std::option::Option::Some(v.into());
5176        self
5177    }
5178
5179    /// Sets or clears the value of [update_time][crate::model::EntryType::update_time].
5180    ///
5181    /// # Example
5182    /// ```ignore,no_run
5183    /// # use google_cloud_dataplex_v1::model::EntryType;
5184    /// use wkt::Timestamp;
5185    /// let x = EntryType::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5186    /// let x = EntryType::new().set_or_clear_update_time(None::<Timestamp>);
5187    /// ```
5188    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5189    where
5190        T: std::convert::Into<wkt::Timestamp>,
5191    {
5192        self.update_time = v.map(|x| x.into());
5193        self
5194    }
5195
5196    /// Sets the value of [description][crate::model::EntryType::description].
5197    ///
5198    /// # Example
5199    /// ```ignore,no_run
5200    /// # use google_cloud_dataplex_v1::model::EntryType;
5201    /// let x = EntryType::new().set_description("example");
5202    /// ```
5203    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5204        self.description = v.into();
5205        self
5206    }
5207
5208    /// Sets the value of [display_name][crate::model::EntryType::display_name].
5209    ///
5210    /// # Example
5211    /// ```ignore,no_run
5212    /// # use google_cloud_dataplex_v1::model::EntryType;
5213    /// let x = EntryType::new().set_display_name("example");
5214    /// ```
5215    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5216        self.display_name = v.into();
5217        self
5218    }
5219
5220    /// Sets the value of [labels][crate::model::EntryType::labels].
5221    ///
5222    /// # Example
5223    /// ```ignore,no_run
5224    /// # use google_cloud_dataplex_v1::model::EntryType;
5225    /// let x = EntryType::new().set_labels([
5226    ///     ("key0", "abc"),
5227    ///     ("key1", "xyz"),
5228    /// ]);
5229    /// ```
5230    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5231    where
5232        T: std::iter::IntoIterator<Item = (K, V)>,
5233        K: std::convert::Into<std::string::String>,
5234        V: std::convert::Into<std::string::String>,
5235    {
5236        use std::iter::Iterator;
5237        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5238        self
5239    }
5240
5241    /// Sets the value of [etag][crate::model::EntryType::etag].
5242    ///
5243    /// # Example
5244    /// ```ignore,no_run
5245    /// # use google_cloud_dataplex_v1::model::EntryType;
5246    /// let x = EntryType::new().set_etag("example");
5247    /// ```
5248    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5249        self.etag = v.into();
5250        self
5251    }
5252
5253    /// Sets the value of [type_aliases][crate::model::EntryType::type_aliases].
5254    ///
5255    /// # Example
5256    /// ```ignore,no_run
5257    /// # use google_cloud_dataplex_v1::model::EntryType;
5258    /// let x = EntryType::new().set_type_aliases(["a", "b", "c"]);
5259    /// ```
5260    pub fn set_type_aliases<T, V>(mut self, v: T) -> Self
5261    where
5262        T: std::iter::IntoIterator<Item = V>,
5263        V: std::convert::Into<std::string::String>,
5264    {
5265        use std::iter::Iterator;
5266        self.type_aliases = v.into_iter().map(|i| i.into()).collect();
5267        self
5268    }
5269
5270    /// Sets the value of [platform][crate::model::EntryType::platform].
5271    ///
5272    /// # Example
5273    /// ```ignore,no_run
5274    /// # use google_cloud_dataplex_v1::model::EntryType;
5275    /// let x = EntryType::new().set_platform("example");
5276    /// ```
5277    pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5278        self.platform = v.into();
5279        self
5280    }
5281
5282    /// Sets the value of [system][crate::model::EntryType::system].
5283    ///
5284    /// # Example
5285    /// ```ignore,no_run
5286    /// # use google_cloud_dataplex_v1::model::EntryType;
5287    /// let x = EntryType::new().set_system("example");
5288    /// ```
5289    pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5290        self.system = v.into();
5291        self
5292    }
5293
5294    /// Sets the value of [required_aspects][crate::model::EntryType::required_aspects].
5295    ///
5296    /// # Example
5297    /// ```ignore,no_run
5298    /// # use google_cloud_dataplex_v1::model::EntryType;
5299    /// use google_cloud_dataplex_v1::model::entry_type::AspectInfo;
5300    /// let x = EntryType::new()
5301    ///     .set_required_aspects([
5302    ///         AspectInfo::default()/* use setters */,
5303    ///         AspectInfo::default()/* use (different) setters */,
5304    ///     ]);
5305    /// ```
5306    pub fn set_required_aspects<T, V>(mut self, v: T) -> Self
5307    where
5308        T: std::iter::IntoIterator<Item = V>,
5309        V: std::convert::Into<crate::model::entry_type::AspectInfo>,
5310    {
5311        use std::iter::Iterator;
5312        self.required_aspects = v.into_iter().map(|i| i.into()).collect();
5313        self
5314    }
5315
5316    /// Sets the value of [authorization][crate::model::EntryType::authorization].
5317    ///
5318    /// # Example
5319    /// ```ignore,no_run
5320    /// # use google_cloud_dataplex_v1::model::EntryType;
5321    /// use google_cloud_dataplex_v1::model::entry_type::Authorization;
5322    /// let x = EntryType::new().set_authorization(Authorization::default()/* use setters */);
5323    /// ```
5324    pub fn set_authorization<T>(mut self, v: T) -> Self
5325    where
5326        T: std::convert::Into<crate::model::entry_type::Authorization>,
5327    {
5328        self.authorization = std::option::Option::Some(v.into());
5329        self
5330    }
5331
5332    /// Sets or clears the value of [authorization][crate::model::EntryType::authorization].
5333    ///
5334    /// # Example
5335    /// ```ignore,no_run
5336    /// # use google_cloud_dataplex_v1::model::EntryType;
5337    /// use google_cloud_dataplex_v1::model::entry_type::Authorization;
5338    /// let x = EntryType::new().set_or_clear_authorization(Some(Authorization::default()/* use setters */));
5339    /// let x = EntryType::new().set_or_clear_authorization(None::<Authorization>);
5340    /// ```
5341    pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
5342    where
5343        T: std::convert::Into<crate::model::entry_type::Authorization>,
5344    {
5345        self.authorization = v.map(|x| x.into());
5346        self
5347    }
5348}
5349
5350impl wkt::message::Message for EntryType {
5351    fn typename() -> &'static str {
5352        "type.googleapis.com/google.cloud.dataplex.v1.EntryType"
5353    }
5354}
5355
5356/// Defines additional types related to [EntryType].
5357pub mod entry_type {
5358    #[allow(unused_imports)]
5359    use super::*;
5360
5361    #[derive(Clone, Default, PartialEq)]
5362    #[non_exhaustive]
5363    pub struct AspectInfo {
5364        /// Required aspect type for the entry type.
5365        pub r#type: std::string::String,
5366
5367        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5368    }
5369
5370    impl AspectInfo {
5371        pub fn new() -> Self {
5372            std::default::Default::default()
5373        }
5374
5375        /// Sets the value of [r#type][crate::model::entry_type::AspectInfo::type].
5376        ///
5377        /// # Example
5378        /// ```ignore,no_run
5379        /// # use google_cloud_dataplex_v1::model::entry_type::AspectInfo;
5380        /// let x = AspectInfo::new().set_type("example");
5381        /// ```
5382        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5383            self.r#type = v.into();
5384            self
5385        }
5386    }
5387
5388    impl wkt::message::Message for AspectInfo {
5389        fn typename() -> &'static str {
5390            "type.googleapis.com/google.cloud.dataplex.v1.EntryType.AspectInfo"
5391        }
5392    }
5393
5394    /// Authorization for an Entry Type.
5395    #[derive(Clone, Default, PartialEq)]
5396    #[non_exhaustive]
5397    pub struct Authorization {
5398        /// Immutable. The IAM permission grantable on the Entry Group to allow
5399        /// access to instantiate Entries of Dataplex Universal Catalog owned Entry
5400        /// Types, only settable for Dataplex Universal Catalog owned Types.
5401        pub alternate_use_permission: std::string::String,
5402
5403        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5404    }
5405
5406    impl Authorization {
5407        pub fn new() -> Self {
5408            std::default::Default::default()
5409        }
5410
5411        /// Sets the value of [alternate_use_permission][crate::model::entry_type::Authorization::alternate_use_permission].
5412        ///
5413        /// # Example
5414        /// ```ignore,no_run
5415        /// # use google_cloud_dataplex_v1::model::entry_type::Authorization;
5416        /// let x = Authorization::new().set_alternate_use_permission("example");
5417        /// ```
5418        pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
5419            mut self,
5420            v: T,
5421        ) -> Self {
5422            self.alternate_use_permission = v.into();
5423            self
5424        }
5425    }
5426
5427    impl wkt::message::Message for Authorization {
5428        fn typename() -> &'static str {
5429            "type.googleapis.com/google.cloud.dataplex.v1.EntryType.Authorization"
5430        }
5431    }
5432}
5433
5434/// An aspect is a single piece of metadata describing an entry.
5435#[derive(Clone, Default, PartialEq)]
5436#[non_exhaustive]
5437pub struct Aspect {
5438    /// Output only. The resource name of the type used to create this Aspect.
5439    pub aspect_type: std::string::String,
5440
5441    /// Output only. The path in the entry under which the aspect is attached.
5442    pub path: std::string::String,
5443
5444    /// Output only. The time when the Aspect was created.
5445    pub create_time: std::option::Option<wkt::Timestamp>,
5446
5447    /// Output only. The time when the Aspect was last updated.
5448    pub update_time: std::option::Option<wkt::Timestamp>,
5449
5450    /// Required. The content of the aspect, according to its aspect type schema.
5451    /// The maximum size of the field is 120KB (encoded as UTF-8).
5452    pub data: std::option::Option<wkt::Struct>,
5453
5454    /// Optional. Information related to the source system of the aspect.
5455    pub aspect_source: std::option::Option<crate::model::AspectSource>,
5456
5457    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5458}
5459
5460impl Aspect {
5461    pub fn new() -> Self {
5462        std::default::Default::default()
5463    }
5464
5465    /// Sets the value of [aspect_type][crate::model::Aspect::aspect_type].
5466    ///
5467    /// # Example
5468    /// ```ignore,no_run
5469    /// # use google_cloud_dataplex_v1::model::Aspect;
5470    /// let x = Aspect::new().set_aspect_type("example");
5471    /// ```
5472    pub fn set_aspect_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5473        self.aspect_type = v.into();
5474        self
5475    }
5476
5477    /// Sets the value of [path][crate::model::Aspect::path].
5478    ///
5479    /// # Example
5480    /// ```ignore,no_run
5481    /// # use google_cloud_dataplex_v1::model::Aspect;
5482    /// let x = Aspect::new().set_path("example");
5483    /// ```
5484    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5485        self.path = v.into();
5486        self
5487    }
5488
5489    /// Sets the value of [create_time][crate::model::Aspect::create_time].
5490    ///
5491    /// # Example
5492    /// ```ignore,no_run
5493    /// # use google_cloud_dataplex_v1::model::Aspect;
5494    /// use wkt::Timestamp;
5495    /// let x = Aspect::new().set_create_time(Timestamp::default()/* use setters */);
5496    /// ```
5497    pub fn set_create_time<T>(mut self, v: T) -> Self
5498    where
5499        T: std::convert::Into<wkt::Timestamp>,
5500    {
5501        self.create_time = std::option::Option::Some(v.into());
5502        self
5503    }
5504
5505    /// Sets or clears the value of [create_time][crate::model::Aspect::create_time].
5506    ///
5507    /// # Example
5508    /// ```ignore,no_run
5509    /// # use google_cloud_dataplex_v1::model::Aspect;
5510    /// use wkt::Timestamp;
5511    /// let x = Aspect::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5512    /// let x = Aspect::new().set_or_clear_create_time(None::<Timestamp>);
5513    /// ```
5514    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5515    where
5516        T: std::convert::Into<wkt::Timestamp>,
5517    {
5518        self.create_time = v.map(|x| x.into());
5519        self
5520    }
5521
5522    /// Sets the value of [update_time][crate::model::Aspect::update_time].
5523    ///
5524    /// # Example
5525    /// ```ignore,no_run
5526    /// # use google_cloud_dataplex_v1::model::Aspect;
5527    /// use wkt::Timestamp;
5528    /// let x = Aspect::new().set_update_time(Timestamp::default()/* use setters */);
5529    /// ```
5530    pub fn set_update_time<T>(mut self, v: T) -> Self
5531    where
5532        T: std::convert::Into<wkt::Timestamp>,
5533    {
5534        self.update_time = std::option::Option::Some(v.into());
5535        self
5536    }
5537
5538    /// Sets or clears the value of [update_time][crate::model::Aspect::update_time].
5539    ///
5540    /// # Example
5541    /// ```ignore,no_run
5542    /// # use google_cloud_dataplex_v1::model::Aspect;
5543    /// use wkt::Timestamp;
5544    /// let x = Aspect::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5545    /// let x = Aspect::new().set_or_clear_update_time(None::<Timestamp>);
5546    /// ```
5547    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5548    where
5549        T: std::convert::Into<wkt::Timestamp>,
5550    {
5551        self.update_time = v.map(|x| x.into());
5552        self
5553    }
5554
5555    /// Sets the value of [data][crate::model::Aspect::data].
5556    ///
5557    /// # Example
5558    /// ```ignore,no_run
5559    /// # use google_cloud_dataplex_v1::model::Aspect;
5560    /// use wkt::Struct;
5561    /// let x = Aspect::new().set_data(Struct::default()/* use setters */);
5562    /// ```
5563    pub fn set_data<T>(mut self, v: T) -> Self
5564    where
5565        T: std::convert::Into<wkt::Struct>,
5566    {
5567        self.data = std::option::Option::Some(v.into());
5568        self
5569    }
5570
5571    /// Sets or clears the value of [data][crate::model::Aspect::data].
5572    ///
5573    /// # Example
5574    /// ```ignore,no_run
5575    /// # use google_cloud_dataplex_v1::model::Aspect;
5576    /// use wkt::Struct;
5577    /// let x = Aspect::new().set_or_clear_data(Some(Struct::default()/* use setters */));
5578    /// let x = Aspect::new().set_or_clear_data(None::<Struct>);
5579    /// ```
5580    pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
5581    where
5582        T: std::convert::Into<wkt::Struct>,
5583    {
5584        self.data = v.map(|x| x.into());
5585        self
5586    }
5587
5588    /// Sets the value of [aspect_source][crate::model::Aspect::aspect_source].
5589    ///
5590    /// # Example
5591    /// ```ignore,no_run
5592    /// # use google_cloud_dataplex_v1::model::Aspect;
5593    /// use google_cloud_dataplex_v1::model::AspectSource;
5594    /// let x = Aspect::new().set_aspect_source(AspectSource::default()/* use setters */);
5595    /// ```
5596    pub fn set_aspect_source<T>(mut self, v: T) -> Self
5597    where
5598        T: std::convert::Into<crate::model::AspectSource>,
5599    {
5600        self.aspect_source = std::option::Option::Some(v.into());
5601        self
5602    }
5603
5604    /// Sets or clears the value of [aspect_source][crate::model::Aspect::aspect_source].
5605    ///
5606    /// # Example
5607    /// ```ignore,no_run
5608    /// # use google_cloud_dataplex_v1::model::Aspect;
5609    /// use google_cloud_dataplex_v1::model::AspectSource;
5610    /// let x = Aspect::new().set_or_clear_aspect_source(Some(AspectSource::default()/* use setters */));
5611    /// let x = Aspect::new().set_or_clear_aspect_source(None::<AspectSource>);
5612    /// ```
5613    pub fn set_or_clear_aspect_source<T>(mut self, v: std::option::Option<T>) -> Self
5614    where
5615        T: std::convert::Into<crate::model::AspectSource>,
5616    {
5617        self.aspect_source = v.map(|x| x.into());
5618        self
5619    }
5620}
5621
5622impl wkt::message::Message for Aspect {
5623    fn typename() -> &'static str {
5624        "type.googleapis.com/google.cloud.dataplex.v1.Aspect"
5625    }
5626}
5627
5628/// Information related to the source system of the aspect.
5629#[derive(Clone, Default, PartialEq)]
5630#[non_exhaustive]
5631pub struct AspectSource {
5632    /// The time the aspect was created in the source system.
5633    pub create_time: std::option::Option<wkt::Timestamp>,
5634
5635    /// The time the aspect was last updated in the source system.
5636    pub update_time: std::option::Option<wkt::Timestamp>,
5637
5638    /// The version of the data format used to produce this data. This field is
5639    /// used to indicated when the underlying data format changes (e.g., schema
5640    /// modifications, changes to the source URL format definition, etc).
5641    pub data_version: std::string::String,
5642
5643    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5644}
5645
5646impl AspectSource {
5647    pub fn new() -> Self {
5648        std::default::Default::default()
5649    }
5650
5651    /// Sets the value of [create_time][crate::model::AspectSource::create_time].
5652    ///
5653    /// # Example
5654    /// ```ignore,no_run
5655    /// # use google_cloud_dataplex_v1::model::AspectSource;
5656    /// use wkt::Timestamp;
5657    /// let x = AspectSource::new().set_create_time(Timestamp::default()/* use setters */);
5658    /// ```
5659    pub fn set_create_time<T>(mut self, v: T) -> Self
5660    where
5661        T: std::convert::Into<wkt::Timestamp>,
5662    {
5663        self.create_time = std::option::Option::Some(v.into());
5664        self
5665    }
5666
5667    /// Sets or clears the value of [create_time][crate::model::AspectSource::create_time].
5668    ///
5669    /// # Example
5670    /// ```ignore,no_run
5671    /// # use google_cloud_dataplex_v1::model::AspectSource;
5672    /// use wkt::Timestamp;
5673    /// let x = AspectSource::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5674    /// let x = AspectSource::new().set_or_clear_create_time(None::<Timestamp>);
5675    /// ```
5676    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5677    where
5678        T: std::convert::Into<wkt::Timestamp>,
5679    {
5680        self.create_time = v.map(|x| x.into());
5681        self
5682    }
5683
5684    /// Sets the value of [update_time][crate::model::AspectSource::update_time].
5685    ///
5686    /// # Example
5687    /// ```ignore,no_run
5688    /// # use google_cloud_dataplex_v1::model::AspectSource;
5689    /// use wkt::Timestamp;
5690    /// let x = AspectSource::new().set_update_time(Timestamp::default()/* use setters */);
5691    /// ```
5692    pub fn set_update_time<T>(mut self, v: T) -> Self
5693    where
5694        T: std::convert::Into<wkt::Timestamp>,
5695    {
5696        self.update_time = std::option::Option::Some(v.into());
5697        self
5698    }
5699
5700    /// Sets or clears the value of [update_time][crate::model::AspectSource::update_time].
5701    ///
5702    /// # Example
5703    /// ```ignore,no_run
5704    /// # use google_cloud_dataplex_v1::model::AspectSource;
5705    /// use wkt::Timestamp;
5706    /// let x = AspectSource::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5707    /// let x = AspectSource::new().set_or_clear_update_time(None::<Timestamp>);
5708    /// ```
5709    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5710    where
5711        T: std::convert::Into<wkt::Timestamp>,
5712    {
5713        self.update_time = v.map(|x| x.into());
5714        self
5715    }
5716
5717    /// Sets the value of [data_version][crate::model::AspectSource::data_version].
5718    ///
5719    /// # Example
5720    /// ```ignore,no_run
5721    /// # use google_cloud_dataplex_v1::model::AspectSource;
5722    /// let x = AspectSource::new().set_data_version("example");
5723    /// ```
5724    pub fn set_data_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5725        self.data_version = v.into();
5726        self
5727    }
5728}
5729
5730impl wkt::message::Message for AspectSource {
5731    fn typename() -> &'static str {
5732        "type.googleapis.com/google.cloud.dataplex.v1.AspectSource"
5733    }
5734}
5735
5736/// An entry is a representation of a data resource that can be described by
5737/// various metadata.
5738#[derive(Clone, Default, PartialEq)]
5739#[non_exhaustive]
5740pub struct Entry {
5741    /// Identifier. The relative resource name of the entry, in the format
5742    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
5743    pub name: std::string::String,
5744
5745    /// Required. Immutable. The relative resource name of the entry type that was
5746    /// used to create this entry, in the format
5747    /// `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
5748    pub entry_type: std::string::String,
5749
5750    /// Output only. The time when the entry was created in Dataplex Universal
5751    /// Catalog.
5752    pub create_time: std::option::Option<wkt::Timestamp>,
5753
5754    /// Output only. The time when the entry was last updated in Dataplex Universal
5755    /// Catalog.
5756    pub update_time: std::option::Option<wkt::Timestamp>,
5757
5758    /// Optional. The aspects that are attached to the entry. Depending on how the
5759    /// aspect is attached to the entry, the format of the aspect key can be one of
5760    /// the following:
5761    ///
5762    /// * If the aspect is attached directly to the entry:
5763    ///   `{project_id_or_number}.{location_id}.{aspect_type_id}`
5764    /// * If the aspect is attached to an entry's path:
5765    ///   `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}`
5766    pub aspects: std::collections::HashMap<std::string::String, crate::model::Aspect>,
5767
5768    /// Optional. Immutable. The resource name of the parent entry, in the format
5769    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
5770    pub parent_entry: std::string::String,
5771
5772    /// Optional. A name for the entry that can be referenced by an external
5773    /// system. For more information, see [Fully qualified
5774    /// names](https://cloud.google.com/data-catalog/docs/fully-qualified-names).
5775    /// The maximum size of the field is 4000 characters.
5776    pub fully_qualified_name: std::string::String,
5777
5778    /// Optional. Information related to the source system of the data resource
5779    /// that is represented by the entry.
5780    pub entry_source: std::option::Option<crate::model::EntrySource>,
5781
5782    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5783}
5784
5785impl Entry {
5786    pub fn new() -> Self {
5787        std::default::Default::default()
5788    }
5789
5790    /// Sets the value of [name][crate::model::Entry::name].
5791    ///
5792    /// # Example
5793    /// ```ignore,no_run
5794    /// # use google_cloud_dataplex_v1::model::Entry;
5795    /// let x = Entry::new().set_name("example");
5796    /// ```
5797    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5798        self.name = v.into();
5799        self
5800    }
5801
5802    /// Sets the value of [entry_type][crate::model::Entry::entry_type].
5803    ///
5804    /// # Example
5805    /// ```ignore,no_run
5806    /// # use google_cloud_dataplex_v1::model::Entry;
5807    /// let x = Entry::new().set_entry_type("example");
5808    /// ```
5809    pub fn set_entry_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5810        self.entry_type = v.into();
5811        self
5812    }
5813
5814    /// Sets the value of [create_time][crate::model::Entry::create_time].
5815    ///
5816    /// # Example
5817    /// ```ignore,no_run
5818    /// # use google_cloud_dataplex_v1::model::Entry;
5819    /// use wkt::Timestamp;
5820    /// let x = Entry::new().set_create_time(Timestamp::default()/* use setters */);
5821    /// ```
5822    pub fn set_create_time<T>(mut self, v: T) -> Self
5823    where
5824        T: std::convert::Into<wkt::Timestamp>,
5825    {
5826        self.create_time = std::option::Option::Some(v.into());
5827        self
5828    }
5829
5830    /// Sets or clears the value of [create_time][crate::model::Entry::create_time].
5831    ///
5832    /// # Example
5833    /// ```ignore,no_run
5834    /// # use google_cloud_dataplex_v1::model::Entry;
5835    /// use wkt::Timestamp;
5836    /// let x = Entry::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5837    /// let x = Entry::new().set_or_clear_create_time(None::<Timestamp>);
5838    /// ```
5839    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5840    where
5841        T: std::convert::Into<wkt::Timestamp>,
5842    {
5843        self.create_time = v.map(|x| x.into());
5844        self
5845    }
5846
5847    /// Sets the value of [update_time][crate::model::Entry::update_time].
5848    ///
5849    /// # Example
5850    /// ```ignore,no_run
5851    /// # use google_cloud_dataplex_v1::model::Entry;
5852    /// use wkt::Timestamp;
5853    /// let x = Entry::new().set_update_time(Timestamp::default()/* use setters */);
5854    /// ```
5855    pub fn set_update_time<T>(mut self, v: T) -> Self
5856    where
5857        T: std::convert::Into<wkt::Timestamp>,
5858    {
5859        self.update_time = std::option::Option::Some(v.into());
5860        self
5861    }
5862
5863    /// Sets or clears the value of [update_time][crate::model::Entry::update_time].
5864    ///
5865    /// # Example
5866    /// ```ignore,no_run
5867    /// # use google_cloud_dataplex_v1::model::Entry;
5868    /// use wkt::Timestamp;
5869    /// let x = Entry::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5870    /// let x = Entry::new().set_or_clear_update_time(None::<Timestamp>);
5871    /// ```
5872    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5873    where
5874        T: std::convert::Into<wkt::Timestamp>,
5875    {
5876        self.update_time = v.map(|x| x.into());
5877        self
5878    }
5879
5880    /// Sets the value of [aspects][crate::model::Entry::aspects].
5881    ///
5882    /// # Example
5883    /// ```ignore,no_run
5884    /// # use google_cloud_dataplex_v1::model::Entry;
5885    /// use google_cloud_dataplex_v1::model::Aspect;
5886    /// let x = Entry::new().set_aspects([
5887    ///     ("key0", Aspect::default()/* use setters */),
5888    ///     ("key1", Aspect::default()/* use (different) setters */),
5889    /// ]);
5890    /// ```
5891    pub fn set_aspects<T, K, V>(mut self, v: T) -> Self
5892    where
5893        T: std::iter::IntoIterator<Item = (K, V)>,
5894        K: std::convert::Into<std::string::String>,
5895        V: std::convert::Into<crate::model::Aspect>,
5896    {
5897        use std::iter::Iterator;
5898        self.aspects = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5899        self
5900    }
5901
5902    /// Sets the value of [parent_entry][crate::model::Entry::parent_entry].
5903    ///
5904    /// # Example
5905    /// ```ignore,no_run
5906    /// # use google_cloud_dataplex_v1::model::Entry;
5907    /// let x = Entry::new().set_parent_entry("example");
5908    /// ```
5909    pub fn set_parent_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5910        self.parent_entry = v.into();
5911        self
5912    }
5913
5914    /// Sets the value of [fully_qualified_name][crate::model::Entry::fully_qualified_name].
5915    ///
5916    /// # Example
5917    /// ```ignore,no_run
5918    /// # use google_cloud_dataplex_v1::model::Entry;
5919    /// let x = Entry::new().set_fully_qualified_name("example");
5920    /// ```
5921    pub fn set_fully_qualified_name<T: std::convert::Into<std::string::String>>(
5922        mut self,
5923        v: T,
5924    ) -> Self {
5925        self.fully_qualified_name = v.into();
5926        self
5927    }
5928
5929    /// Sets the value of [entry_source][crate::model::Entry::entry_source].
5930    ///
5931    /// # Example
5932    /// ```ignore,no_run
5933    /// # use google_cloud_dataplex_v1::model::Entry;
5934    /// use google_cloud_dataplex_v1::model::EntrySource;
5935    /// let x = Entry::new().set_entry_source(EntrySource::default()/* use setters */);
5936    /// ```
5937    pub fn set_entry_source<T>(mut self, v: T) -> Self
5938    where
5939        T: std::convert::Into<crate::model::EntrySource>,
5940    {
5941        self.entry_source = std::option::Option::Some(v.into());
5942        self
5943    }
5944
5945    /// Sets or clears the value of [entry_source][crate::model::Entry::entry_source].
5946    ///
5947    /// # Example
5948    /// ```ignore,no_run
5949    /// # use google_cloud_dataplex_v1::model::Entry;
5950    /// use google_cloud_dataplex_v1::model::EntrySource;
5951    /// let x = Entry::new().set_or_clear_entry_source(Some(EntrySource::default()/* use setters */));
5952    /// let x = Entry::new().set_or_clear_entry_source(None::<EntrySource>);
5953    /// ```
5954    pub fn set_or_clear_entry_source<T>(mut self, v: std::option::Option<T>) -> Self
5955    where
5956        T: std::convert::Into<crate::model::EntrySource>,
5957    {
5958        self.entry_source = v.map(|x| x.into());
5959        self
5960    }
5961}
5962
5963impl wkt::message::Message for Entry {
5964    fn typename() -> &'static str {
5965        "type.googleapis.com/google.cloud.dataplex.v1.Entry"
5966    }
5967}
5968
5969/// Information related to the source system of the data resource that is
5970/// represented by the entry.
5971#[derive(Clone, Default, PartialEq)]
5972#[non_exhaustive]
5973pub struct EntrySource {
5974    /// The name of the resource in the source system.
5975    /// Maximum length is 4,000 characters.
5976    pub resource: std::string::String,
5977
5978    /// The name of the source system.
5979    /// Maximum length is 64 characters.
5980    pub system: std::string::String,
5981
5982    /// The platform containing the source system.
5983    /// Maximum length is 64 characters.
5984    pub platform: std::string::String,
5985
5986    /// A user-friendly display name.
5987    /// Maximum length is 500 characters.
5988    pub display_name: std::string::String,
5989
5990    /// A description of the data resource.
5991    /// Maximum length is 2,000 characters.
5992    pub description: std::string::String,
5993
5994    /// User-defined labels.
5995    /// The maximum size of keys and values is 128 characters each.
5996    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5997
5998    /// Immutable. The entries representing the ancestors of the data resource in
5999    /// the source system.
6000    pub ancestors: std::vec::Vec<crate::model::entry_source::Ancestor>,
6001
6002    /// The time when the resource was created in the source system.
6003    pub create_time: std::option::Option<wkt::Timestamp>,
6004
6005    /// The time when the resource was last updated in the source system. If the
6006    /// entry exists in the system and its `EntrySource` has `update_time`
6007    /// populated, further updates to the `EntrySource` of the entry must provide
6008    /// incremental updates to its `update_time`.
6009    pub update_time: std::option::Option<wkt::Timestamp>,
6010
6011    /// Output only. Location of the resource in the source system. You can search
6012    /// the entry by this location. By default, this should match the location of
6013    /// the entry group containing this entry. A different value allows capturing
6014    /// the source location for data external to Google Cloud.
6015    pub location: std::string::String,
6016
6017    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6018}
6019
6020impl EntrySource {
6021    pub fn new() -> Self {
6022        std::default::Default::default()
6023    }
6024
6025    /// Sets the value of [resource][crate::model::EntrySource::resource].
6026    ///
6027    /// # Example
6028    /// ```ignore,no_run
6029    /// # use google_cloud_dataplex_v1::model::EntrySource;
6030    /// let x = EntrySource::new().set_resource("example");
6031    /// ```
6032    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6033        self.resource = v.into();
6034        self
6035    }
6036
6037    /// Sets the value of [system][crate::model::EntrySource::system].
6038    ///
6039    /// # Example
6040    /// ```ignore,no_run
6041    /// # use google_cloud_dataplex_v1::model::EntrySource;
6042    /// let x = EntrySource::new().set_system("example");
6043    /// ```
6044    pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6045        self.system = v.into();
6046        self
6047    }
6048
6049    /// Sets the value of [platform][crate::model::EntrySource::platform].
6050    ///
6051    /// # Example
6052    /// ```ignore,no_run
6053    /// # use google_cloud_dataplex_v1::model::EntrySource;
6054    /// let x = EntrySource::new().set_platform("example");
6055    /// ```
6056    pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6057        self.platform = v.into();
6058        self
6059    }
6060
6061    /// Sets the value of [display_name][crate::model::EntrySource::display_name].
6062    ///
6063    /// # Example
6064    /// ```ignore,no_run
6065    /// # use google_cloud_dataplex_v1::model::EntrySource;
6066    /// let x = EntrySource::new().set_display_name("example");
6067    /// ```
6068    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6069        self.display_name = v.into();
6070        self
6071    }
6072
6073    /// Sets the value of [description][crate::model::EntrySource::description].
6074    ///
6075    /// # Example
6076    /// ```ignore,no_run
6077    /// # use google_cloud_dataplex_v1::model::EntrySource;
6078    /// let x = EntrySource::new().set_description("example");
6079    /// ```
6080    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6081        self.description = v.into();
6082        self
6083    }
6084
6085    /// Sets the value of [labels][crate::model::EntrySource::labels].
6086    ///
6087    /// # Example
6088    /// ```ignore,no_run
6089    /// # use google_cloud_dataplex_v1::model::EntrySource;
6090    /// let x = EntrySource::new().set_labels([
6091    ///     ("key0", "abc"),
6092    ///     ("key1", "xyz"),
6093    /// ]);
6094    /// ```
6095    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6096    where
6097        T: std::iter::IntoIterator<Item = (K, V)>,
6098        K: std::convert::Into<std::string::String>,
6099        V: std::convert::Into<std::string::String>,
6100    {
6101        use std::iter::Iterator;
6102        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6103        self
6104    }
6105
6106    /// Sets the value of [ancestors][crate::model::EntrySource::ancestors].
6107    ///
6108    /// # Example
6109    /// ```ignore,no_run
6110    /// # use google_cloud_dataplex_v1::model::EntrySource;
6111    /// use google_cloud_dataplex_v1::model::entry_source::Ancestor;
6112    /// let x = EntrySource::new()
6113    ///     .set_ancestors([
6114    ///         Ancestor::default()/* use setters */,
6115    ///         Ancestor::default()/* use (different) setters */,
6116    ///     ]);
6117    /// ```
6118    pub fn set_ancestors<T, V>(mut self, v: T) -> Self
6119    where
6120        T: std::iter::IntoIterator<Item = V>,
6121        V: std::convert::Into<crate::model::entry_source::Ancestor>,
6122    {
6123        use std::iter::Iterator;
6124        self.ancestors = v.into_iter().map(|i| i.into()).collect();
6125        self
6126    }
6127
6128    /// Sets the value of [create_time][crate::model::EntrySource::create_time].
6129    ///
6130    /// # Example
6131    /// ```ignore,no_run
6132    /// # use google_cloud_dataplex_v1::model::EntrySource;
6133    /// use wkt::Timestamp;
6134    /// let x = EntrySource::new().set_create_time(Timestamp::default()/* use setters */);
6135    /// ```
6136    pub fn set_create_time<T>(mut self, v: T) -> Self
6137    where
6138        T: std::convert::Into<wkt::Timestamp>,
6139    {
6140        self.create_time = std::option::Option::Some(v.into());
6141        self
6142    }
6143
6144    /// Sets or clears the value of [create_time][crate::model::EntrySource::create_time].
6145    ///
6146    /// # Example
6147    /// ```ignore,no_run
6148    /// # use google_cloud_dataplex_v1::model::EntrySource;
6149    /// use wkt::Timestamp;
6150    /// let x = EntrySource::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6151    /// let x = EntrySource::new().set_or_clear_create_time(None::<Timestamp>);
6152    /// ```
6153    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6154    where
6155        T: std::convert::Into<wkt::Timestamp>,
6156    {
6157        self.create_time = v.map(|x| x.into());
6158        self
6159    }
6160
6161    /// Sets the value of [update_time][crate::model::EntrySource::update_time].
6162    ///
6163    /// # Example
6164    /// ```ignore,no_run
6165    /// # use google_cloud_dataplex_v1::model::EntrySource;
6166    /// use wkt::Timestamp;
6167    /// let x = EntrySource::new().set_update_time(Timestamp::default()/* use setters */);
6168    /// ```
6169    pub fn set_update_time<T>(mut self, v: T) -> Self
6170    where
6171        T: std::convert::Into<wkt::Timestamp>,
6172    {
6173        self.update_time = std::option::Option::Some(v.into());
6174        self
6175    }
6176
6177    /// Sets or clears the value of [update_time][crate::model::EntrySource::update_time].
6178    ///
6179    /// # Example
6180    /// ```ignore,no_run
6181    /// # use google_cloud_dataplex_v1::model::EntrySource;
6182    /// use wkt::Timestamp;
6183    /// let x = EntrySource::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
6184    /// let x = EntrySource::new().set_or_clear_update_time(None::<Timestamp>);
6185    /// ```
6186    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6187    where
6188        T: std::convert::Into<wkt::Timestamp>,
6189    {
6190        self.update_time = v.map(|x| x.into());
6191        self
6192    }
6193
6194    /// Sets the value of [location][crate::model::EntrySource::location].
6195    ///
6196    /// # Example
6197    /// ```ignore,no_run
6198    /// # use google_cloud_dataplex_v1::model::EntrySource;
6199    /// let x = EntrySource::new().set_location("example");
6200    /// ```
6201    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6202        self.location = v.into();
6203        self
6204    }
6205}
6206
6207impl wkt::message::Message for EntrySource {
6208    fn typename() -> &'static str {
6209        "type.googleapis.com/google.cloud.dataplex.v1.EntrySource"
6210    }
6211}
6212
6213/// Defines additional types related to [EntrySource].
6214pub mod entry_source {
6215    #[allow(unused_imports)]
6216    use super::*;
6217
6218    /// Information about individual items in the hierarchy that is associated with
6219    /// the data resource.
6220    #[derive(Clone, Default, PartialEq)]
6221    #[non_exhaustive]
6222    pub struct Ancestor {
6223        /// Optional. The name of the ancestor resource.
6224        pub name: std::string::String,
6225
6226        /// Optional. The type of the ancestor resource.
6227        pub r#type: std::string::String,
6228
6229        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6230    }
6231
6232    impl Ancestor {
6233        pub fn new() -> Self {
6234            std::default::Default::default()
6235        }
6236
6237        /// Sets the value of [name][crate::model::entry_source::Ancestor::name].
6238        ///
6239        /// # Example
6240        /// ```ignore,no_run
6241        /// # use google_cloud_dataplex_v1::model::entry_source::Ancestor;
6242        /// let x = Ancestor::new().set_name("example");
6243        /// ```
6244        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6245            self.name = v.into();
6246            self
6247        }
6248
6249        /// Sets the value of [r#type][crate::model::entry_source::Ancestor::type].
6250        ///
6251        /// # Example
6252        /// ```ignore,no_run
6253        /// # use google_cloud_dataplex_v1::model::entry_source::Ancestor;
6254        /// let x = Ancestor::new().set_type("example");
6255        /// ```
6256        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6257            self.r#type = v.into();
6258            self
6259        }
6260    }
6261
6262    impl wkt::message::Message for Ancestor {
6263        fn typename() -> &'static str {
6264            "type.googleapis.com/google.cloud.dataplex.v1.EntrySource.Ancestor"
6265        }
6266    }
6267}
6268
6269/// Create EntryGroup Request.
6270#[derive(Clone, Default, PartialEq)]
6271#[non_exhaustive]
6272pub struct CreateEntryGroupRequest {
6273    /// Required. The resource name of the entryGroup, of the form:
6274    /// projects/{project_number}/locations/{location_id}
6275    /// where `location_id` refers to a Google Cloud region.
6276    pub parent: std::string::String,
6277
6278    /// Required. EntryGroup identifier.
6279    pub entry_group_id: std::string::String,
6280
6281    /// Required. EntryGroup Resource.
6282    pub entry_group: std::option::Option<crate::model::EntryGroup>,
6283
6284    /// Optional. The service validates the request without performing any
6285    /// mutations. The default is false.
6286    pub validate_only: bool,
6287
6288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6289}
6290
6291impl CreateEntryGroupRequest {
6292    pub fn new() -> Self {
6293        std::default::Default::default()
6294    }
6295
6296    /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
6297    ///
6298    /// # Example
6299    /// ```ignore,no_run
6300    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6301    /// let x = CreateEntryGroupRequest::new().set_parent("example");
6302    /// ```
6303    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6304        self.parent = v.into();
6305        self
6306    }
6307
6308    /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
6309    ///
6310    /// # Example
6311    /// ```ignore,no_run
6312    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6313    /// let x = CreateEntryGroupRequest::new().set_entry_group_id("example");
6314    /// ```
6315    pub fn set_entry_group_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6316        self.entry_group_id = v.into();
6317        self
6318    }
6319
6320    /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
6321    ///
6322    /// # Example
6323    /// ```ignore,no_run
6324    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6325    /// use google_cloud_dataplex_v1::model::EntryGroup;
6326    /// let x = CreateEntryGroupRequest::new().set_entry_group(EntryGroup::default()/* use setters */);
6327    /// ```
6328    pub fn set_entry_group<T>(mut self, v: T) -> Self
6329    where
6330        T: std::convert::Into<crate::model::EntryGroup>,
6331    {
6332        self.entry_group = std::option::Option::Some(v.into());
6333        self
6334    }
6335
6336    /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
6337    ///
6338    /// # Example
6339    /// ```ignore,no_run
6340    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6341    /// use google_cloud_dataplex_v1::model::EntryGroup;
6342    /// let x = CreateEntryGroupRequest::new().set_or_clear_entry_group(Some(EntryGroup::default()/* use setters */));
6343    /// let x = CreateEntryGroupRequest::new().set_or_clear_entry_group(None::<EntryGroup>);
6344    /// ```
6345    pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
6346    where
6347        T: std::convert::Into<crate::model::EntryGroup>,
6348    {
6349        self.entry_group = v.map(|x| x.into());
6350        self
6351    }
6352
6353    /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
6354    ///
6355    /// # Example
6356    /// ```ignore,no_run
6357    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6358    /// let x = CreateEntryGroupRequest::new().set_validate_only(true);
6359    /// ```
6360    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6361        self.validate_only = v.into();
6362        self
6363    }
6364}
6365
6366impl wkt::message::Message for CreateEntryGroupRequest {
6367    fn typename() -> &'static str {
6368        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryGroupRequest"
6369    }
6370}
6371
6372/// Update EntryGroup Request.
6373#[derive(Clone, Default, PartialEq)]
6374#[non_exhaustive]
6375pub struct UpdateEntryGroupRequest {
6376    /// Required. EntryGroup Resource.
6377    pub entry_group: std::option::Option<crate::model::EntryGroup>,
6378
6379    /// Required. Mask of fields to update.
6380    pub update_mask: std::option::Option<wkt::FieldMask>,
6381
6382    /// Optional. The service validates the request, without performing any
6383    /// mutations. The default is false.
6384    pub validate_only: bool,
6385
6386    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6387}
6388
6389impl UpdateEntryGroupRequest {
6390    pub fn new() -> Self {
6391        std::default::Default::default()
6392    }
6393
6394    /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
6395    ///
6396    /// # Example
6397    /// ```ignore,no_run
6398    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6399    /// use google_cloud_dataplex_v1::model::EntryGroup;
6400    /// let x = UpdateEntryGroupRequest::new().set_entry_group(EntryGroup::default()/* use setters */);
6401    /// ```
6402    pub fn set_entry_group<T>(mut self, v: T) -> Self
6403    where
6404        T: std::convert::Into<crate::model::EntryGroup>,
6405    {
6406        self.entry_group = std::option::Option::Some(v.into());
6407        self
6408    }
6409
6410    /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
6411    ///
6412    /// # Example
6413    /// ```ignore,no_run
6414    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6415    /// use google_cloud_dataplex_v1::model::EntryGroup;
6416    /// let x = UpdateEntryGroupRequest::new().set_or_clear_entry_group(Some(EntryGroup::default()/* use setters */));
6417    /// let x = UpdateEntryGroupRequest::new().set_or_clear_entry_group(None::<EntryGroup>);
6418    /// ```
6419    pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
6420    where
6421        T: std::convert::Into<crate::model::EntryGroup>,
6422    {
6423        self.entry_group = v.map(|x| x.into());
6424        self
6425    }
6426
6427    /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
6428    ///
6429    /// # Example
6430    /// ```ignore,no_run
6431    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6432    /// use wkt::FieldMask;
6433    /// let x = UpdateEntryGroupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6434    /// ```
6435    pub fn set_update_mask<T>(mut self, v: T) -> Self
6436    where
6437        T: std::convert::Into<wkt::FieldMask>,
6438    {
6439        self.update_mask = std::option::Option::Some(v.into());
6440        self
6441    }
6442
6443    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
6444    ///
6445    /// # Example
6446    /// ```ignore,no_run
6447    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6448    /// use wkt::FieldMask;
6449    /// let x = UpdateEntryGroupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6450    /// let x = UpdateEntryGroupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6451    /// ```
6452    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6453    where
6454        T: std::convert::Into<wkt::FieldMask>,
6455    {
6456        self.update_mask = v.map(|x| x.into());
6457        self
6458    }
6459
6460    /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
6461    ///
6462    /// # Example
6463    /// ```ignore,no_run
6464    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6465    /// let x = UpdateEntryGroupRequest::new().set_validate_only(true);
6466    /// ```
6467    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6468        self.validate_only = v.into();
6469        self
6470    }
6471}
6472
6473impl wkt::message::Message for UpdateEntryGroupRequest {
6474    fn typename() -> &'static str {
6475        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryGroupRequest"
6476    }
6477}
6478
6479/// Delete EntryGroup Request.
6480#[derive(Clone, Default, PartialEq)]
6481#[non_exhaustive]
6482pub struct DeleteEntryGroupRequest {
6483    /// Required. The resource name of the EntryGroup:
6484    /// `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
6485    pub name: std::string::String,
6486
6487    /// Optional. If the client provided etag value does not match the current etag
6488    /// value, the DeleteEntryGroupRequest method returns an ABORTED error
6489    /// response.
6490    pub etag: std::string::String,
6491
6492    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6493}
6494
6495impl DeleteEntryGroupRequest {
6496    pub fn new() -> Self {
6497        std::default::Default::default()
6498    }
6499
6500    /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
6501    ///
6502    /// # Example
6503    /// ```ignore,no_run
6504    /// # use google_cloud_dataplex_v1::model::DeleteEntryGroupRequest;
6505    /// let x = DeleteEntryGroupRequest::new().set_name("example");
6506    /// ```
6507    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6508        self.name = v.into();
6509        self
6510    }
6511
6512    /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
6513    ///
6514    /// # Example
6515    /// ```ignore,no_run
6516    /// # use google_cloud_dataplex_v1::model::DeleteEntryGroupRequest;
6517    /// let x = DeleteEntryGroupRequest::new().set_etag("example");
6518    /// ```
6519    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6520        self.etag = v.into();
6521        self
6522    }
6523}
6524
6525impl wkt::message::Message for DeleteEntryGroupRequest {
6526    fn typename() -> &'static str {
6527        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryGroupRequest"
6528    }
6529}
6530
6531/// List entryGroups request.
6532#[derive(Clone, Default, PartialEq)]
6533#[non_exhaustive]
6534pub struct ListEntryGroupsRequest {
6535    /// Required. The resource name of the entryGroup location, of the form:
6536    /// `projects/{project_number}/locations/{location_id}`
6537    /// where `location_id` refers to a Google Cloud region.
6538    pub parent: std::string::String,
6539
6540    /// Optional. Maximum number of EntryGroups to return. The service may return
6541    /// fewer than this value. If unspecified, the service returns at most 10
6542    /// EntryGroups. The maximum value is 1000; values above 1000 will be coerced
6543    /// to 1000.
6544    pub page_size: i32,
6545
6546    /// Optional. Page token received from a previous `ListEntryGroups` call.
6547    /// Provide this to retrieve the subsequent page. When paginating, all other
6548    /// parameters you provide to `ListEntryGroups` must match the call that
6549    /// provided the page token.
6550    pub page_token: std::string::String,
6551
6552    /// Optional. Filter request.
6553    pub filter: std::string::String,
6554
6555    /// Optional. Order by fields for the result.
6556    pub order_by: std::string::String,
6557
6558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6559}
6560
6561impl ListEntryGroupsRequest {
6562    pub fn new() -> Self {
6563        std::default::Default::default()
6564    }
6565
6566    /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
6567    ///
6568    /// # Example
6569    /// ```ignore,no_run
6570    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6571    /// let x = ListEntryGroupsRequest::new().set_parent("example");
6572    /// ```
6573    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6574        self.parent = v.into();
6575        self
6576    }
6577
6578    /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
6579    ///
6580    /// # Example
6581    /// ```ignore,no_run
6582    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6583    /// let x = ListEntryGroupsRequest::new().set_page_size(42);
6584    /// ```
6585    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6586        self.page_size = v.into();
6587        self
6588    }
6589
6590    /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
6591    ///
6592    /// # Example
6593    /// ```ignore,no_run
6594    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6595    /// let x = ListEntryGroupsRequest::new().set_page_token("example");
6596    /// ```
6597    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6598        self.page_token = v.into();
6599        self
6600    }
6601
6602    /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
6603    ///
6604    /// # Example
6605    /// ```ignore,no_run
6606    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6607    /// let x = ListEntryGroupsRequest::new().set_filter("example");
6608    /// ```
6609    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6610        self.filter = v.into();
6611        self
6612    }
6613
6614    /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
6615    ///
6616    /// # Example
6617    /// ```ignore,no_run
6618    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6619    /// let x = ListEntryGroupsRequest::new().set_order_by("example");
6620    /// ```
6621    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6622        self.order_by = v.into();
6623        self
6624    }
6625}
6626
6627impl wkt::message::Message for ListEntryGroupsRequest {
6628    fn typename() -> &'static str {
6629        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsRequest"
6630    }
6631}
6632
6633/// List entry groups response.
6634#[derive(Clone, Default, PartialEq)]
6635#[non_exhaustive]
6636pub struct ListEntryGroupsResponse {
6637    /// Entry groups under the given parent location.
6638    pub entry_groups: std::vec::Vec<crate::model::EntryGroup>,
6639
6640    /// Token to retrieve the next page of results, or empty if there are no more
6641    /// results in the list.
6642    pub next_page_token: std::string::String,
6643
6644    /// Locations that the service couldn't reach.
6645    pub unreachable_locations: std::vec::Vec<std::string::String>,
6646
6647    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6648}
6649
6650impl ListEntryGroupsResponse {
6651    pub fn new() -> Self {
6652        std::default::Default::default()
6653    }
6654
6655    /// Sets the value of [entry_groups][crate::model::ListEntryGroupsResponse::entry_groups].
6656    ///
6657    /// # Example
6658    /// ```ignore,no_run
6659    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsResponse;
6660    /// use google_cloud_dataplex_v1::model::EntryGroup;
6661    /// let x = ListEntryGroupsResponse::new()
6662    ///     .set_entry_groups([
6663    ///         EntryGroup::default()/* use setters */,
6664    ///         EntryGroup::default()/* use (different) setters */,
6665    ///     ]);
6666    /// ```
6667    pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
6668    where
6669        T: std::iter::IntoIterator<Item = V>,
6670        V: std::convert::Into<crate::model::EntryGroup>,
6671    {
6672        use std::iter::Iterator;
6673        self.entry_groups = v.into_iter().map(|i| i.into()).collect();
6674        self
6675    }
6676
6677    /// Sets the value of [next_page_token][crate::model::ListEntryGroupsResponse::next_page_token].
6678    ///
6679    /// # Example
6680    /// ```ignore,no_run
6681    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsResponse;
6682    /// let x = ListEntryGroupsResponse::new().set_next_page_token("example");
6683    /// ```
6684    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6685        self.next_page_token = v.into();
6686        self
6687    }
6688
6689    /// Sets the value of [unreachable_locations][crate::model::ListEntryGroupsResponse::unreachable_locations].
6690    ///
6691    /// # Example
6692    /// ```ignore,no_run
6693    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsResponse;
6694    /// let x = ListEntryGroupsResponse::new().set_unreachable_locations(["a", "b", "c"]);
6695    /// ```
6696    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
6697    where
6698        T: std::iter::IntoIterator<Item = V>,
6699        V: std::convert::Into<std::string::String>,
6700    {
6701        use std::iter::Iterator;
6702        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
6703        self
6704    }
6705}
6706
6707impl wkt::message::Message for ListEntryGroupsResponse {
6708    fn typename() -> &'static str {
6709        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsResponse"
6710    }
6711}
6712
6713#[doc(hidden)]
6714impl gax::paginator::internal::PageableResponse for ListEntryGroupsResponse {
6715    type PageItem = crate::model::EntryGroup;
6716
6717    fn items(self) -> std::vec::Vec<Self::PageItem> {
6718        self.entry_groups
6719    }
6720
6721    fn next_page_token(&self) -> std::string::String {
6722        use std::clone::Clone;
6723        self.next_page_token.clone()
6724    }
6725}
6726
6727/// Get EntryGroup request.
6728#[derive(Clone, Default, PartialEq)]
6729#[non_exhaustive]
6730pub struct GetEntryGroupRequest {
6731    /// Required. The resource name of the EntryGroup:
6732    /// `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
6733    pub name: std::string::String,
6734
6735    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6736}
6737
6738impl GetEntryGroupRequest {
6739    pub fn new() -> Self {
6740        std::default::Default::default()
6741    }
6742
6743    /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
6744    ///
6745    /// # Example
6746    /// ```ignore,no_run
6747    /// # use google_cloud_dataplex_v1::model::GetEntryGroupRequest;
6748    /// let x = GetEntryGroupRequest::new().set_name("example");
6749    /// ```
6750    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6751        self.name = v.into();
6752        self
6753    }
6754}
6755
6756impl wkt::message::Message for GetEntryGroupRequest {
6757    fn typename() -> &'static str {
6758        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryGroupRequest"
6759    }
6760}
6761
6762/// Create EntryType Request.
6763#[derive(Clone, Default, PartialEq)]
6764#[non_exhaustive]
6765pub struct CreateEntryTypeRequest {
6766    /// Required. The resource name of the EntryType, of the form:
6767    /// projects/{project_number}/locations/{location_id}
6768    /// where `location_id` refers to a Google Cloud region.
6769    pub parent: std::string::String,
6770
6771    /// Required. EntryType identifier.
6772    pub entry_type_id: std::string::String,
6773
6774    /// Required. EntryType Resource.
6775    pub entry_type: std::option::Option<crate::model::EntryType>,
6776
6777    /// Optional. The service validates the request without performing any
6778    /// mutations. The default is false.
6779    pub validate_only: bool,
6780
6781    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6782}
6783
6784impl CreateEntryTypeRequest {
6785    pub fn new() -> Self {
6786        std::default::Default::default()
6787    }
6788
6789    /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
6790    ///
6791    /// # Example
6792    /// ```ignore,no_run
6793    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6794    /// let x = CreateEntryTypeRequest::new().set_parent("example");
6795    /// ```
6796    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6797        self.parent = v.into();
6798        self
6799    }
6800
6801    /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
6802    ///
6803    /// # Example
6804    /// ```ignore,no_run
6805    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6806    /// let x = CreateEntryTypeRequest::new().set_entry_type_id("example");
6807    /// ```
6808    pub fn set_entry_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6809        self.entry_type_id = v.into();
6810        self
6811    }
6812
6813    /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
6814    ///
6815    /// # Example
6816    /// ```ignore,no_run
6817    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6818    /// use google_cloud_dataplex_v1::model::EntryType;
6819    /// let x = CreateEntryTypeRequest::new().set_entry_type(EntryType::default()/* use setters */);
6820    /// ```
6821    pub fn set_entry_type<T>(mut self, v: T) -> Self
6822    where
6823        T: std::convert::Into<crate::model::EntryType>,
6824    {
6825        self.entry_type = std::option::Option::Some(v.into());
6826        self
6827    }
6828
6829    /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
6830    ///
6831    /// # Example
6832    /// ```ignore,no_run
6833    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6834    /// use google_cloud_dataplex_v1::model::EntryType;
6835    /// let x = CreateEntryTypeRequest::new().set_or_clear_entry_type(Some(EntryType::default()/* use setters */));
6836    /// let x = CreateEntryTypeRequest::new().set_or_clear_entry_type(None::<EntryType>);
6837    /// ```
6838    pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
6839    where
6840        T: std::convert::Into<crate::model::EntryType>,
6841    {
6842        self.entry_type = v.map(|x| x.into());
6843        self
6844    }
6845
6846    /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
6847    ///
6848    /// # Example
6849    /// ```ignore,no_run
6850    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6851    /// let x = CreateEntryTypeRequest::new().set_validate_only(true);
6852    /// ```
6853    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6854        self.validate_only = v.into();
6855        self
6856    }
6857}
6858
6859impl wkt::message::Message for CreateEntryTypeRequest {
6860    fn typename() -> &'static str {
6861        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryTypeRequest"
6862    }
6863}
6864
6865/// Update EntryType Request.
6866#[derive(Clone, Default, PartialEq)]
6867#[non_exhaustive]
6868pub struct UpdateEntryTypeRequest {
6869    /// Required. EntryType Resource.
6870    pub entry_type: std::option::Option<crate::model::EntryType>,
6871
6872    /// Required. Mask of fields to update.
6873    pub update_mask: std::option::Option<wkt::FieldMask>,
6874
6875    /// Optional. The service validates the request without performing any
6876    /// mutations. The default is false.
6877    pub validate_only: bool,
6878
6879    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6880}
6881
6882impl UpdateEntryTypeRequest {
6883    pub fn new() -> Self {
6884        std::default::Default::default()
6885    }
6886
6887    /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
6888    ///
6889    /// # Example
6890    /// ```ignore,no_run
6891    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6892    /// use google_cloud_dataplex_v1::model::EntryType;
6893    /// let x = UpdateEntryTypeRequest::new().set_entry_type(EntryType::default()/* use setters */);
6894    /// ```
6895    pub fn set_entry_type<T>(mut self, v: T) -> Self
6896    where
6897        T: std::convert::Into<crate::model::EntryType>,
6898    {
6899        self.entry_type = std::option::Option::Some(v.into());
6900        self
6901    }
6902
6903    /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
6904    ///
6905    /// # Example
6906    /// ```ignore,no_run
6907    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6908    /// use google_cloud_dataplex_v1::model::EntryType;
6909    /// let x = UpdateEntryTypeRequest::new().set_or_clear_entry_type(Some(EntryType::default()/* use setters */));
6910    /// let x = UpdateEntryTypeRequest::new().set_or_clear_entry_type(None::<EntryType>);
6911    /// ```
6912    pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
6913    where
6914        T: std::convert::Into<crate::model::EntryType>,
6915    {
6916        self.entry_type = v.map(|x| x.into());
6917        self
6918    }
6919
6920    /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
6921    ///
6922    /// # Example
6923    /// ```ignore,no_run
6924    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6925    /// use wkt::FieldMask;
6926    /// let x = UpdateEntryTypeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6927    /// ```
6928    pub fn set_update_mask<T>(mut self, v: T) -> Self
6929    where
6930        T: std::convert::Into<wkt::FieldMask>,
6931    {
6932        self.update_mask = std::option::Option::Some(v.into());
6933        self
6934    }
6935
6936    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
6937    ///
6938    /// # Example
6939    /// ```ignore,no_run
6940    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6941    /// use wkt::FieldMask;
6942    /// let x = UpdateEntryTypeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6943    /// let x = UpdateEntryTypeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6944    /// ```
6945    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6946    where
6947        T: std::convert::Into<wkt::FieldMask>,
6948    {
6949        self.update_mask = v.map(|x| x.into());
6950        self
6951    }
6952
6953    /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
6954    ///
6955    /// # Example
6956    /// ```ignore,no_run
6957    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6958    /// let x = UpdateEntryTypeRequest::new().set_validate_only(true);
6959    /// ```
6960    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6961        self.validate_only = v.into();
6962        self
6963    }
6964}
6965
6966impl wkt::message::Message for UpdateEntryTypeRequest {
6967    fn typename() -> &'static str {
6968        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryTypeRequest"
6969    }
6970}
6971
6972/// Delete EntryType Request.
6973#[derive(Clone, Default, PartialEq)]
6974#[non_exhaustive]
6975pub struct DeleteEntryTypeRequest {
6976    /// Required. The resource name of the EntryType:
6977    /// `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
6978    pub name: std::string::String,
6979
6980    /// Optional. If the client provided etag value does not match the current etag
6981    /// value, the DeleteEntryTypeRequest method returns an ABORTED error response.
6982    pub etag: std::string::String,
6983
6984    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6985}
6986
6987impl DeleteEntryTypeRequest {
6988    pub fn new() -> Self {
6989        std::default::Default::default()
6990    }
6991
6992    /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
6993    ///
6994    /// # Example
6995    /// ```ignore,no_run
6996    /// # use google_cloud_dataplex_v1::model::DeleteEntryTypeRequest;
6997    /// let x = DeleteEntryTypeRequest::new().set_name("example");
6998    /// ```
6999    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7000        self.name = v.into();
7001        self
7002    }
7003
7004    /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
7005    ///
7006    /// # Example
7007    /// ```ignore,no_run
7008    /// # use google_cloud_dataplex_v1::model::DeleteEntryTypeRequest;
7009    /// let x = DeleteEntryTypeRequest::new().set_etag("example");
7010    /// ```
7011    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7012        self.etag = v.into();
7013        self
7014    }
7015}
7016
7017impl wkt::message::Message for DeleteEntryTypeRequest {
7018    fn typename() -> &'static str {
7019        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryTypeRequest"
7020    }
7021}
7022
7023/// List EntryTypes request
7024#[derive(Clone, Default, PartialEq)]
7025#[non_exhaustive]
7026pub struct ListEntryTypesRequest {
7027    /// Required. The resource name of the EntryType location, of the form:
7028    /// `projects/{project_number}/locations/{location_id}`
7029    /// where `location_id` refers to a Google Cloud region.
7030    pub parent: std::string::String,
7031
7032    /// Optional. Maximum number of EntryTypes to return. The service may return
7033    /// fewer than this value. If unspecified, the service returns at most 10
7034    /// EntryTypes. The maximum value is 1000; values above 1000 will be coerced to
7035    /// 1000.
7036    pub page_size: i32,
7037
7038    /// Optional. Page token received from a previous `ListEntryTypes` call.
7039    /// Provide this to retrieve the subsequent page. When paginating, all other
7040    /// parameters you provided to `ListEntryTypes` must match the call that
7041    /// provided the page token.
7042    pub page_token: std::string::String,
7043
7044    /// Optional. Filter request. Filters are case-sensitive.
7045    /// The service supports the following formats:
7046    ///
7047    /// * labels.key1 = "value1"
7048    /// * labels:key1
7049    /// * name = "value"
7050    ///
7051    /// These restrictions can be conjoined with AND, OR, and NOT conjunctions.
7052    pub filter: std::string::String,
7053
7054    /// Optional. Orders the result by `name` or `create_time` fields.
7055    /// If not specified, the ordering is undefined.
7056    pub order_by: std::string::String,
7057
7058    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7059}
7060
7061impl ListEntryTypesRequest {
7062    pub fn new() -> Self {
7063        std::default::Default::default()
7064    }
7065
7066    /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
7067    ///
7068    /// # Example
7069    /// ```ignore,no_run
7070    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7071    /// let x = ListEntryTypesRequest::new().set_parent("example");
7072    /// ```
7073    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7074        self.parent = v.into();
7075        self
7076    }
7077
7078    /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
7079    ///
7080    /// # Example
7081    /// ```ignore,no_run
7082    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7083    /// let x = ListEntryTypesRequest::new().set_page_size(42);
7084    /// ```
7085    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7086        self.page_size = v.into();
7087        self
7088    }
7089
7090    /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
7091    ///
7092    /// # Example
7093    /// ```ignore,no_run
7094    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7095    /// let x = ListEntryTypesRequest::new().set_page_token("example");
7096    /// ```
7097    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7098        self.page_token = v.into();
7099        self
7100    }
7101
7102    /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
7103    ///
7104    /// # Example
7105    /// ```ignore,no_run
7106    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7107    /// let x = ListEntryTypesRequest::new().set_filter("example");
7108    /// ```
7109    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7110        self.filter = v.into();
7111        self
7112    }
7113
7114    /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
7115    ///
7116    /// # Example
7117    /// ```ignore,no_run
7118    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7119    /// let x = ListEntryTypesRequest::new().set_order_by("example");
7120    /// ```
7121    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7122        self.order_by = v.into();
7123        self
7124    }
7125}
7126
7127impl wkt::message::Message for ListEntryTypesRequest {
7128    fn typename() -> &'static str {
7129        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesRequest"
7130    }
7131}
7132
7133/// List EntryTypes response.
7134#[derive(Clone, Default, PartialEq)]
7135#[non_exhaustive]
7136pub struct ListEntryTypesResponse {
7137    /// EntryTypes under the given parent location.
7138    pub entry_types: std::vec::Vec<crate::model::EntryType>,
7139
7140    /// Token to retrieve the next page of results, or empty if there are no more
7141    /// results in the list.
7142    pub next_page_token: std::string::String,
7143
7144    /// Locations that the service couldn't reach.
7145    pub unreachable_locations: std::vec::Vec<std::string::String>,
7146
7147    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7148}
7149
7150impl ListEntryTypesResponse {
7151    pub fn new() -> Self {
7152        std::default::Default::default()
7153    }
7154
7155    /// Sets the value of [entry_types][crate::model::ListEntryTypesResponse::entry_types].
7156    ///
7157    /// # Example
7158    /// ```ignore,no_run
7159    /// # use google_cloud_dataplex_v1::model::ListEntryTypesResponse;
7160    /// use google_cloud_dataplex_v1::model::EntryType;
7161    /// let x = ListEntryTypesResponse::new()
7162    ///     .set_entry_types([
7163    ///         EntryType::default()/* use setters */,
7164    ///         EntryType::default()/* use (different) setters */,
7165    ///     ]);
7166    /// ```
7167    pub fn set_entry_types<T, V>(mut self, v: T) -> Self
7168    where
7169        T: std::iter::IntoIterator<Item = V>,
7170        V: std::convert::Into<crate::model::EntryType>,
7171    {
7172        use std::iter::Iterator;
7173        self.entry_types = v.into_iter().map(|i| i.into()).collect();
7174        self
7175    }
7176
7177    /// Sets the value of [next_page_token][crate::model::ListEntryTypesResponse::next_page_token].
7178    ///
7179    /// # Example
7180    /// ```ignore,no_run
7181    /// # use google_cloud_dataplex_v1::model::ListEntryTypesResponse;
7182    /// let x = ListEntryTypesResponse::new().set_next_page_token("example");
7183    /// ```
7184    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7185        self.next_page_token = v.into();
7186        self
7187    }
7188
7189    /// Sets the value of [unreachable_locations][crate::model::ListEntryTypesResponse::unreachable_locations].
7190    ///
7191    /// # Example
7192    /// ```ignore,no_run
7193    /// # use google_cloud_dataplex_v1::model::ListEntryTypesResponse;
7194    /// let x = ListEntryTypesResponse::new().set_unreachable_locations(["a", "b", "c"]);
7195    /// ```
7196    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
7197    where
7198        T: std::iter::IntoIterator<Item = V>,
7199        V: std::convert::Into<std::string::String>,
7200    {
7201        use std::iter::Iterator;
7202        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
7203        self
7204    }
7205}
7206
7207impl wkt::message::Message for ListEntryTypesResponse {
7208    fn typename() -> &'static str {
7209        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesResponse"
7210    }
7211}
7212
7213#[doc(hidden)]
7214impl gax::paginator::internal::PageableResponse for ListEntryTypesResponse {
7215    type PageItem = crate::model::EntryType;
7216
7217    fn items(self) -> std::vec::Vec<Self::PageItem> {
7218        self.entry_types
7219    }
7220
7221    fn next_page_token(&self) -> std::string::String {
7222        use std::clone::Clone;
7223        self.next_page_token.clone()
7224    }
7225}
7226
7227/// Get EntryType request.
7228#[derive(Clone, Default, PartialEq)]
7229#[non_exhaustive]
7230pub struct GetEntryTypeRequest {
7231    /// Required. The resource name of the EntryType:
7232    /// `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
7233    pub name: std::string::String,
7234
7235    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7236}
7237
7238impl GetEntryTypeRequest {
7239    pub fn new() -> Self {
7240        std::default::Default::default()
7241    }
7242
7243    /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
7244    ///
7245    /// # Example
7246    /// ```ignore,no_run
7247    /// # use google_cloud_dataplex_v1::model::GetEntryTypeRequest;
7248    /// let x = GetEntryTypeRequest::new().set_name("example");
7249    /// ```
7250    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7251        self.name = v.into();
7252        self
7253    }
7254}
7255
7256impl wkt::message::Message for GetEntryTypeRequest {
7257    fn typename() -> &'static str {
7258        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryTypeRequest"
7259    }
7260}
7261
7262/// Create AspectType Request.
7263#[derive(Clone, Default, PartialEq)]
7264#[non_exhaustive]
7265pub struct CreateAspectTypeRequest {
7266    /// Required. The resource name of the AspectType, of the form:
7267    /// projects/{project_number}/locations/{location_id}
7268    /// where `location_id` refers to a Google Cloud region.
7269    pub parent: std::string::String,
7270
7271    /// Required. AspectType identifier.
7272    pub aspect_type_id: std::string::String,
7273
7274    /// Required. AspectType Resource.
7275    pub aspect_type: std::option::Option<crate::model::AspectType>,
7276
7277    /// Optional. The service validates the request without performing any
7278    /// mutations. The default is false.
7279    pub validate_only: bool,
7280
7281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7282}
7283
7284impl CreateAspectTypeRequest {
7285    pub fn new() -> Self {
7286        std::default::Default::default()
7287    }
7288
7289    /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
7290    ///
7291    /// # Example
7292    /// ```ignore,no_run
7293    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7294    /// let x = CreateAspectTypeRequest::new().set_parent("example");
7295    /// ```
7296    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7297        self.parent = v.into();
7298        self
7299    }
7300
7301    /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
7302    ///
7303    /// # Example
7304    /// ```ignore,no_run
7305    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7306    /// let x = CreateAspectTypeRequest::new().set_aspect_type_id("example");
7307    /// ```
7308    pub fn set_aspect_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7309        self.aspect_type_id = v.into();
7310        self
7311    }
7312
7313    /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
7314    ///
7315    /// # Example
7316    /// ```ignore,no_run
7317    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7318    /// use google_cloud_dataplex_v1::model::AspectType;
7319    /// let x = CreateAspectTypeRequest::new().set_aspect_type(AspectType::default()/* use setters */);
7320    /// ```
7321    pub fn set_aspect_type<T>(mut self, v: T) -> Self
7322    where
7323        T: std::convert::Into<crate::model::AspectType>,
7324    {
7325        self.aspect_type = std::option::Option::Some(v.into());
7326        self
7327    }
7328
7329    /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
7330    ///
7331    /// # Example
7332    /// ```ignore,no_run
7333    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7334    /// use google_cloud_dataplex_v1::model::AspectType;
7335    /// let x = CreateAspectTypeRequest::new().set_or_clear_aspect_type(Some(AspectType::default()/* use setters */));
7336    /// let x = CreateAspectTypeRequest::new().set_or_clear_aspect_type(None::<AspectType>);
7337    /// ```
7338    pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
7339    where
7340        T: std::convert::Into<crate::model::AspectType>,
7341    {
7342        self.aspect_type = v.map(|x| x.into());
7343        self
7344    }
7345
7346    /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
7347    ///
7348    /// # Example
7349    /// ```ignore,no_run
7350    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7351    /// let x = CreateAspectTypeRequest::new().set_validate_only(true);
7352    /// ```
7353    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7354        self.validate_only = v.into();
7355        self
7356    }
7357}
7358
7359impl wkt::message::Message for CreateAspectTypeRequest {
7360    fn typename() -> &'static str {
7361        "type.googleapis.com/google.cloud.dataplex.v1.CreateAspectTypeRequest"
7362    }
7363}
7364
7365/// Update AspectType Request
7366#[derive(Clone, Default, PartialEq)]
7367#[non_exhaustive]
7368pub struct UpdateAspectTypeRequest {
7369    /// Required. AspectType Resource
7370    pub aspect_type: std::option::Option<crate::model::AspectType>,
7371
7372    /// Required. Mask of fields to update.
7373    pub update_mask: std::option::Option<wkt::FieldMask>,
7374
7375    /// Optional. Only validate the request, but do not perform mutations.
7376    /// The default is false.
7377    pub validate_only: bool,
7378
7379    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7380}
7381
7382impl UpdateAspectTypeRequest {
7383    pub fn new() -> Self {
7384        std::default::Default::default()
7385    }
7386
7387    /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
7388    ///
7389    /// # Example
7390    /// ```ignore,no_run
7391    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7392    /// use google_cloud_dataplex_v1::model::AspectType;
7393    /// let x = UpdateAspectTypeRequest::new().set_aspect_type(AspectType::default()/* use setters */);
7394    /// ```
7395    pub fn set_aspect_type<T>(mut self, v: T) -> Self
7396    where
7397        T: std::convert::Into<crate::model::AspectType>,
7398    {
7399        self.aspect_type = std::option::Option::Some(v.into());
7400        self
7401    }
7402
7403    /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
7404    ///
7405    /// # Example
7406    /// ```ignore,no_run
7407    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7408    /// use google_cloud_dataplex_v1::model::AspectType;
7409    /// let x = UpdateAspectTypeRequest::new().set_or_clear_aspect_type(Some(AspectType::default()/* use setters */));
7410    /// let x = UpdateAspectTypeRequest::new().set_or_clear_aspect_type(None::<AspectType>);
7411    /// ```
7412    pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
7413    where
7414        T: std::convert::Into<crate::model::AspectType>,
7415    {
7416        self.aspect_type = v.map(|x| x.into());
7417        self
7418    }
7419
7420    /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
7421    ///
7422    /// # Example
7423    /// ```ignore,no_run
7424    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7425    /// use wkt::FieldMask;
7426    /// let x = UpdateAspectTypeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7427    /// ```
7428    pub fn set_update_mask<T>(mut self, v: T) -> Self
7429    where
7430        T: std::convert::Into<wkt::FieldMask>,
7431    {
7432        self.update_mask = std::option::Option::Some(v.into());
7433        self
7434    }
7435
7436    /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
7437    ///
7438    /// # Example
7439    /// ```ignore,no_run
7440    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7441    /// use wkt::FieldMask;
7442    /// let x = UpdateAspectTypeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7443    /// let x = UpdateAspectTypeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7444    /// ```
7445    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7446    where
7447        T: std::convert::Into<wkt::FieldMask>,
7448    {
7449        self.update_mask = v.map(|x| x.into());
7450        self
7451    }
7452
7453    /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
7454    ///
7455    /// # Example
7456    /// ```ignore,no_run
7457    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7458    /// let x = UpdateAspectTypeRequest::new().set_validate_only(true);
7459    /// ```
7460    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7461        self.validate_only = v.into();
7462        self
7463    }
7464}
7465
7466impl wkt::message::Message for UpdateAspectTypeRequest {
7467    fn typename() -> &'static str {
7468        "type.googleapis.com/google.cloud.dataplex.v1.UpdateAspectTypeRequest"
7469    }
7470}
7471
7472/// Delete AspectType Request.
7473#[derive(Clone, Default, PartialEq)]
7474#[non_exhaustive]
7475pub struct DeleteAspectTypeRequest {
7476    /// Required. The resource name of the AspectType:
7477    /// `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
7478    pub name: std::string::String,
7479
7480    /// Optional. If the client provided etag value does not match the current etag
7481    /// value, the DeleteAspectTypeRequest method returns an ABORTED error
7482    /// response.
7483    pub etag: std::string::String,
7484
7485    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7486}
7487
7488impl DeleteAspectTypeRequest {
7489    pub fn new() -> Self {
7490        std::default::Default::default()
7491    }
7492
7493    /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
7494    ///
7495    /// # Example
7496    /// ```ignore,no_run
7497    /// # use google_cloud_dataplex_v1::model::DeleteAspectTypeRequest;
7498    /// let x = DeleteAspectTypeRequest::new().set_name("example");
7499    /// ```
7500    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7501        self.name = v.into();
7502        self
7503    }
7504
7505    /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
7506    ///
7507    /// # Example
7508    /// ```ignore,no_run
7509    /// # use google_cloud_dataplex_v1::model::DeleteAspectTypeRequest;
7510    /// let x = DeleteAspectTypeRequest::new().set_etag("example");
7511    /// ```
7512    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7513        self.etag = v.into();
7514        self
7515    }
7516}
7517
7518impl wkt::message::Message for DeleteAspectTypeRequest {
7519    fn typename() -> &'static str {
7520        "type.googleapis.com/google.cloud.dataplex.v1.DeleteAspectTypeRequest"
7521    }
7522}
7523
7524/// List AspectTypes request.
7525#[derive(Clone, Default, PartialEq)]
7526#[non_exhaustive]
7527pub struct ListAspectTypesRequest {
7528    /// Required. The resource name of the AspectType location, of the form:
7529    /// `projects/{project_number}/locations/{location_id}`
7530    /// where `location_id` refers to a Google Cloud region.
7531    pub parent: std::string::String,
7532
7533    /// Optional. Maximum number of AspectTypes to return. The service may return
7534    /// fewer than this value. If unspecified, the service returns at most 10
7535    /// AspectTypes. The maximum value is 1000; values above 1000 will be coerced
7536    /// to 1000.
7537    pub page_size: i32,
7538
7539    /// Optional. Page token received from a previous `ListAspectTypes` call.
7540    /// Provide this to retrieve the subsequent page. When paginating, all other
7541    /// parameters you provide to `ListAspectTypes` must match the call that
7542    /// provided the page token.
7543    pub page_token: std::string::String,
7544
7545    /// Optional. Filter request. Filters are case-sensitive.
7546    /// The service supports the following formats:
7547    ///
7548    /// * labels.key1 = "value1"
7549    /// * labels:key1
7550    /// * name = "value"
7551    ///
7552    /// These restrictions can be conjoined with AND, OR, and NOT conjunctions.
7553    pub filter: std::string::String,
7554
7555    /// Optional. Orders the result by `name` or `create_time` fields.
7556    /// If not specified, the ordering is undefined.
7557    pub order_by: std::string::String,
7558
7559    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7560}
7561
7562impl ListAspectTypesRequest {
7563    pub fn new() -> Self {
7564        std::default::Default::default()
7565    }
7566
7567    /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
7568    ///
7569    /// # Example
7570    /// ```ignore,no_run
7571    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7572    /// let x = ListAspectTypesRequest::new().set_parent("example");
7573    /// ```
7574    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7575        self.parent = v.into();
7576        self
7577    }
7578
7579    /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
7580    ///
7581    /// # Example
7582    /// ```ignore,no_run
7583    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7584    /// let x = ListAspectTypesRequest::new().set_page_size(42);
7585    /// ```
7586    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7587        self.page_size = v.into();
7588        self
7589    }
7590
7591    /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
7592    ///
7593    /// # Example
7594    /// ```ignore,no_run
7595    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7596    /// let x = ListAspectTypesRequest::new().set_page_token("example");
7597    /// ```
7598    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7599        self.page_token = v.into();
7600        self
7601    }
7602
7603    /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
7604    ///
7605    /// # Example
7606    /// ```ignore,no_run
7607    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7608    /// let x = ListAspectTypesRequest::new().set_filter("example");
7609    /// ```
7610    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7611        self.filter = v.into();
7612        self
7613    }
7614
7615    /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
7616    ///
7617    /// # Example
7618    /// ```ignore,no_run
7619    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7620    /// let x = ListAspectTypesRequest::new().set_order_by("example");
7621    /// ```
7622    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7623        self.order_by = v.into();
7624        self
7625    }
7626}
7627
7628impl wkt::message::Message for ListAspectTypesRequest {
7629    fn typename() -> &'static str {
7630        "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesRequest"
7631    }
7632}
7633
7634/// List AspectTypes response.
7635#[derive(Clone, Default, PartialEq)]
7636#[non_exhaustive]
7637pub struct ListAspectTypesResponse {
7638    /// AspectTypes under the given parent location.
7639    pub aspect_types: std::vec::Vec<crate::model::AspectType>,
7640
7641    /// Token to retrieve the next page of results, or empty if there are no more
7642    /// results in the list.
7643    pub next_page_token: std::string::String,
7644
7645    /// Locations that the service couldn't reach.
7646    pub unreachable_locations: std::vec::Vec<std::string::String>,
7647
7648    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7649}
7650
7651impl ListAspectTypesResponse {
7652    pub fn new() -> Self {
7653        std::default::Default::default()
7654    }
7655
7656    /// Sets the value of [aspect_types][crate::model::ListAspectTypesResponse::aspect_types].
7657    ///
7658    /// # Example
7659    /// ```ignore,no_run
7660    /// # use google_cloud_dataplex_v1::model::ListAspectTypesResponse;
7661    /// use google_cloud_dataplex_v1::model::AspectType;
7662    /// let x = ListAspectTypesResponse::new()
7663    ///     .set_aspect_types([
7664    ///         AspectType::default()/* use setters */,
7665    ///         AspectType::default()/* use (different) setters */,
7666    ///     ]);
7667    /// ```
7668    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
7669    where
7670        T: std::iter::IntoIterator<Item = V>,
7671        V: std::convert::Into<crate::model::AspectType>,
7672    {
7673        use std::iter::Iterator;
7674        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
7675        self
7676    }
7677
7678    /// Sets the value of [next_page_token][crate::model::ListAspectTypesResponse::next_page_token].
7679    ///
7680    /// # Example
7681    /// ```ignore,no_run
7682    /// # use google_cloud_dataplex_v1::model::ListAspectTypesResponse;
7683    /// let x = ListAspectTypesResponse::new().set_next_page_token("example");
7684    /// ```
7685    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7686        self.next_page_token = v.into();
7687        self
7688    }
7689
7690    /// Sets the value of [unreachable_locations][crate::model::ListAspectTypesResponse::unreachable_locations].
7691    ///
7692    /// # Example
7693    /// ```ignore,no_run
7694    /// # use google_cloud_dataplex_v1::model::ListAspectTypesResponse;
7695    /// let x = ListAspectTypesResponse::new().set_unreachable_locations(["a", "b", "c"]);
7696    /// ```
7697    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
7698    where
7699        T: std::iter::IntoIterator<Item = V>,
7700        V: std::convert::Into<std::string::String>,
7701    {
7702        use std::iter::Iterator;
7703        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
7704        self
7705    }
7706}
7707
7708impl wkt::message::Message for ListAspectTypesResponse {
7709    fn typename() -> &'static str {
7710        "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesResponse"
7711    }
7712}
7713
7714#[doc(hidden)]
7715impl gax::paginator::internal::PageableResponse for ListAspectTypesResponse {
7716    type PageItem = crate::model::AspectType;
7717
7718    fn items(self) -> std::vec::Vec<Self::PageItem> {
7719        self.aspect_types
7720    }
7721
7722    fn next_page_token(&self) -> std::string::String {
7723        use std::clone::Clone;
7724        self.next_page_token.clone()
7725    }
7726}
7727
7728/// Get AspectType request.
7729#[derive(Clone, Default, PartialEq)]
7730#[non_exhaustive]
7731pub struct GetAspectTypeRequest {
7732    /// Required. The resource name of the AspectType:
7733    /// `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
7734    pub name: std::string::String,
7735
7736    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7737}
7738
7739impl GetAspectTypeRequest {
7740    pub fn new() -> Self {
7741        std::default::Default::default()
7742    }
7743
7744    /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
7745    ///
7746    /// # Example
7747    /// ```ignore,no_run
7748    /// # use google_cloud_dataplex_v1::model::GetAspectTypeRequest;
7749    /// let x = GetAspectTypeRequest::new().set_name("example");
7750    /// ```
7751    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7752        self.name = v.into();
7753        self
7754    }
7755}
7756
7757impl wkt::message::Message for GetAspectTypeRequest {
7758    fn typename() -> &'static str {
7759        "type.googleapis.com/google.cloud.dataplex.v1.GetAspectTypeRequest"
7760    }
7761}
7762
7763/// Create Entry request.
7764#[derive(Clone, Default, PartialEq)]
7765#[non_exhaustive]
7766pub struct CreateEntryRequest {
7767    /// Required. The resource name of the parent Entry Group:
7768    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
7769    pub parent: std::string::String,
7770
7771    /// Required. Entry identifier. It has to be unique within an Entry Group.
7772    ///
7773    /// Entries corresponding to Google Cloud resources use an Entry ID format
7774    /// based on [full resource
7775    /// names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
7776    /// The format is a full resource name of the resource without the
7777    /// prefix double slashes in the API service name part of the full resource
7778    /// name. This allows retrieval of entries using their associated resource
7779    /// name.
7780    ///
7781    /// For example, if the full resource name of a resource is
7782    /// `//library.googleapis.com/shelves/shelf1/books/book2`,
7783    /// then the suggested entry_id is
7784    /// `library.googleapis.com/shelves/shelf1/books/book2`.
7785    ///
7786    /// It is also suggested to follow the same convention for entries
7787    /// corresponding to resources from providers or systems other than Google
7788    /// Cloud.
7789    ///
7790    /// The maximum size of the field is 4000 characters.
7791    pub entry_id: std::string::String,
7792
7793    /// Required. Entry resource.
7794    pub entry: std::option::Option<crate::model::Entry>,
7795
7796    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7797}
7798
7799impl CreateEntryRequest {
7800    pub fn new() -> Self {
7801        std::default::Default::default()
7802    }
7803
7804    /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
7805    ///
7806    /// # Example
7807    /// ```ignore,no_run
7808    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7809    /// let x = CreateEntryRequest::new().set_parent("example");
7810    /// ```
7811    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7812        self.parent = v.into();
7813        self
7814    }
7815
7816    /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
7817    ///
7818    /// # Example
7819    /// ```ignore,no_run
7820    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7821    /// let x = CreateEntryRequest::new().set_entry_id("example");
7822    /// ```
7823    pub fn set_entry_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7824        self.entry_id = v.into();
7825        self
7826    }
7827
7828    /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
7829    ///
7830    /// # Example
7831    /// ```ignore,no_run
7832    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7833    /// use google_cloud_dataplex_v1::model::Entry;
7834    /// let x = CreateEntryRequest::new().set_entry(Entry::default()/* use setters */);
7835    /// ```
7836    pub fn set_entry<T>(mut self, v: T) -> Self
7837    where
7838        T: std::convert::Into<crate::model::Entry>,
7839    {
7840        self.entry = std::option::Option::Some(v.into());
7841        self
7842    }
7843
7844    /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
7845    ///
7846    /// # Example
7847    /// ```ignore,no_run
7848    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7849    /// use google_cloud_dataplex_v1::model::Entry;
7850    /// let x = CreateEntryRequest::new().set_or_clear_entry(Some(Entry::default()/* use setters */));
7851    /// let x = CreateEntryRequest::new().set_or_clear_entry(None::<Entry>);
7852    /// ```
7853    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
7854    where
7855        T: std::convert::Into<crate::model::Entry>,
7856    {
7857        self.entry = v.map(|x| x.into());
7858        self
7859    }
7860}
7861
7862impl wkt::message::Message for CreateEntryRequest {
7863    fn typename() -> &'static str {
7864        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryRequest"
7865    }
7866}
7867
7868/// Update Entry request.
7869#[derive(Clone, Default, PartialEq)]
7870#[non_exhaustive]
7871pub struct UpdateEntryRequest {
7872    /// Required. Entry resource.
7873    pub entry: std::option::Option<crate::model::Entry>,
7874
7875    /// Optional. Mask of fields to update. To update Aspects, the update_mask must
7876    /// contain the value "aspects".
7877    ///
7878    /// If the update_mask is empty, the service will update all modifiable fields
7879    /// present in the request.
7880    pub update_mask: std::option::Option<wkt::FieldMask>,
7881
7882    /// Optional. If set to true and the entry doesn't exist, the service will
7883    /// create it.
7884    pub allow_missing: bool,
7885
7886    /// Optional. If set to true and the aspect_keys specify aspect ranges, the
7887    /// service deletes any existing aspects from that range that weren't provided
7888    /// in the request.
7889    pub delete_missing_aspects: bool,
7890
7891    /// Optional. The map keys of the Aspects which the service should modify. It
7892    /// supports the following syntaxes:
7893    ///
7894    /// * `<aspect_type_reference>` - matches an aspect of the given type and empty
7895    ///   path.
7896    /// * `<aspect_type_reference>@path` - matches an aspect of the given type and
7897    ///   specified path. For example, to attach an aspect to a field that is
7898    ///   specified by the `schema` aspect, the path should have the format
7899    ///   `Schema.<field_name>`.
7900    /// * `<aspect_type_reference>@*` - matches aspects of the given type for all
7901    ///   paths.
7902    /// * `*@path` - matches aspects of all types on the given path.
7903    ///
7904    /// The service will not remove existing aspects matching the syntax unless
7905    /// `delete_missing_aspects` is set to true.
7906    ///
7907    /// If this field is left empty, the service treats it as specifying
7908    /// exactly those Aspects present in the request.
7909    pub aspect_keys: std::vec::Vec<std::string::String>,
7910
7911    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7912}
7913
7914impl UpdateEntryRequest {
7915    pub fn new() -> Self {
7916        std::default::Default::default()
7917    }
7918
7919    /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
7920    ///
7921    /// # Example
7922    /// ```ignore,no_run
7923    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7924    /// use google_cloud_dataplex_v1::model::Entry;
7925    /// let x = UpdateEntryRequest::new().set_entry(Entry::default()/* use setters */);
7926    /// ```
7927    pub fn set_entry<T>(mut self, v: T) -> Self
7928    where
7929        T: std::convert::Into<crate::model::Entry>,
7930    {
7931        self.entry = std::option::Option::Some(v.into());
7932        self
7933    }
7934
7935    /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
7936    ///
7937    /// # Example
7938    /// ```ignore,no_run
7939    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7940    /// use google_cloud_dataplex_v1::model::Entry;
7941    /// let x = UpdateEntryRequest::new().set_or_clear_entry(Some(Entry::default()/* use setters */));
7942    /// let x = UpdateEntryRequest::new().set_or_clear_entry(None::<Entry>);
7943    /// ```
7944    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
7945    where
7946        T: std::convert::Into<crate::model::Entry>,
7947    {
7948        self.entry = v.map(|x| x.into());
7949        self
7950    }
7951
7952    /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
7953    ///
7954    /// # Example
7955    /// ```ignore,no_run
7956    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7957    /// use wkt::FieldMask;
7958    /// let x = UpdateEntryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7959    /// ```
7960    pub fn set_update_mask<T>(mut self, v: T) -> Self
7961    where
7962        T: std::convert::Into<wkt::FieldMask>,
7963    {
7964        self.update_mask = std::option::Option::Some(v.into());
7965        self
7966    }
7967
7968    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
7969    ///
7970    /// # Example
7971    /// ```ignore,no_run
7972    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7973    /// use wkt::FieldMask;
7974    /// let x = UpdateEntryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7975    /// let x = UpdateEntryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7976    /// ```
7977    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7978    where
7979        T: std::convert::Into<wkt::FieldMask>,
7980    {
7981        self.update_mask = v.map(|x| x.into());
7982        self
7983    }
7984
7985    /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
7986    ///
7987    /// # Example
7988    /// ```ignore,no_run
7989    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7990    /// let x = UpdateEntryRequest::new().set_allow_missing(true);
7991    /// ```
7992    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7993        self.allow_missing = v.into();
7994        self
7995    }
7996
7997    /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
7998    ///
7999    /// # Example
8000    /// ```ignore,no_run
8001    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
8002    /// let x = UpdateEntryRequest::new().set_delete_missing_aspects(true);
8003    /// ```
8004    pub fn set_delete_missing_aspects<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8005        self.delete_missing_aspects = v.into();
8006        self
8007    }
8008
8009    /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
8010    ///
8011    /// # Example
8012    /// ```ignore,no_run
8013    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
8014    /// let x = UpdateEntryRequest::new().set_aspect_keys(["a", "b", "c"]);
8015    /// ```
8016    pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
8017    where
8018        T: std::iter::IntoIterator<Item = V>,
8019        V: std::convert::Into<std::string::String>,
8020    {
8021        use std::iter::Iterator;
8022        self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
8023        self
8024    }
8025}
8026
8027impl wkt::message::Message for UpdateEntryRequest {
8028    fn typename() -> &'static str {
8029        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryRequest"
8030    }
8031}
8032
8033/// Delete Entry request.
8034#[derive(Clone, Default, PartialEq)]
8035#[non_exhaustive]
8036pub struct DeleteEntryRequest {
8037    /// Required. The resource name of the Entry:
8038    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
8039    pub name: std::string::String,
8040
8041    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8042}
8043
8044impl DeleteEntryRequest {
8045    pub fn new() -> Self {
8046        std::default::Default::default()
8047    }
8048
8049    /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
8050    ///
8051    /// # Example
8052    /// ```ignore,no_run
8053    /// # use google_cloud_dataplex_v1::model::DeleteEntryRequest;
8054    /// let x = DeleteEntryRequest::new().set_name("example");
8055    /// ```
8056    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8057        self.name = v.into();
8058        self
8059    }
8060}
8061
8062impl wkt::message::Message for DeleteEntryRequest {
8063    fn typename() -> &'static str {
8064        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryRequest"
8065    }
8066}
8067
8068/// List Entries request.
8069#[derive(Clone, Default, PartialEq)]
8070#[non_exhaustive]
8071pub struct ListEntriesRequest {
8072    /// Required. The resource name of the parent Entry Group:
8073    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
8074    pub parent: std::string::String,
8075
8076    /// Optional. Number of items to return per page. If there are remaining
8077    /// results, the service returns a next_page_token. If unspecified, the service
8078    /// returns at most 10 Entries. The maximum value is 100; values above 100 will
8079    /// be coerced to 100.
8080    pub page_size: i32,
8081
8082    /// Optional. Page token received from a previous `ListEntries` call. Provide
8083    /// this to retrieve the subsequent page.
8084    pub page_token: std::string::String,
8085
8086    /// Optional. A filter on the entries to return. Filters are case-sensitive.
8087    /// You can filter the request by the following fields:
8088    ///
8089    /// * entry_type
8090    /// * entry_source.display_name
8091    /// * parent_entry
8092    ///
8093    /// The comparison operators are =, !=, <, >, <=, >=. The service compares
8094    /// strings according to lexical order.
8095    ///
8096    /// You can use the logical operators AND, OR, NOT in the filter.
8097    ///
8098    /// You can use Wildcard "*", but for entry_type and parent_entry you need to
8099    /// provide the full project id or number.
8100    ///
8101    /// You cannot use parent_entry in conjunction with other fields.
8102    ///
8103    /// Example filter expressions:
8104    ///
8105    /// * "entry_source.display_name=AnExampleDisplayName"
8106    /// * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type"
8107    /// * "entry_type=projects/example-project/locations/us/entryTypes/a* OR
8108    ///   entry_type=projects/another-project/locations/*"
8109    /// * "NOT entry_source.display_name=AnotherExampleDisplayName"
8110    /// * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry"
8111    pub filter: std::string::String,
8112
8113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8114}
8115
8116impl ListEntriesRequest {
8117    pub fn new() -> Self {
8118        std::default::Default::default()
8119    }
8120
8121    /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
8122    ///
8123    /// # Example
8124    /// ```ignore,no_run
8125    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8126    /// let x = ListEntriesRequest::new().set_parent("example");
8127    /// ```
8128    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8129        self.parent = v.into();
8130        self
8131    }
8132
8133    /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
8134    ///
8135    /// # Example
8136    /// ```ignore,no_run
8137    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8138    /// let x = ListEntriesRequest::new().set_page_size(42);
8139    /// ```
8140    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8141        self.page_size = v.into();
8142        self
8143    }
8144
8145    /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
8146    ///
8147    /// # Example
8148    /// ```ignore,no_run
8149    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8150    /// let x = ListEntriesRequest::new().set_page_token("example");
8151    /// ```
8152    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8153        self.page_token = v.into();
8154        self
8155    }
8156
8157    /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
8158    ///
8159    /// # Example
8160    /// ```ignore,no_run
8161    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8162    /// let x = ListEntriesRequest::new().set_filter("example");
8163    /// ```
8164    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8165        self.filter = v.into();
8166        self
8167    }
8168}
8169
8170impl wkt::message::Message for ListEntriesRequest {
8171    fn typename() -> &'static str {
8172        "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesRequest"
8173    }
8174}
8175
8176/// List Entries response.
8177#[derive(Clone, Default, PartialEq)]
8178#[non_exhaustive]
8179pub struct ListEntriesResponse {
8180    /// The list of entries under the given parent location.
8181    pub entries: std::vec::Vec<crate::model::Entry>,
8182
8183    /// Token to retrieve the next page of results, or empty if there are no more
8184    /// results in the list.
8185    pub next_page_token: std::string::String,
8186
8187    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8188}
8189
8190impl ListEntriesResponse {
8191    pub fn new() -> Self {
8192        std::default::Default::default()
8193    }
8194
8195    /// Sets the value of [entries][crate::model::ListEntriesResponse::entries].
8196    ///
8197    /// # Example
8198    /// ```ignore,no_run
8199    /// # use google_cloud_dataplex_v1::model::ListEntriesResponse;
8200    /// use google_cloud_dataplex_v1::model::Entry;
8201    /// let x = ListEntriesResponse::new()
8202    ///     .set_entries([
8203    ///         Entry::default()/* use setters */,
8204    ///         Entry::default()/* use (different) setters */,
8205    ///     ]);
8206    /// ```
8207    pub fn set_entries<T, V>(mut self, v: T) -> Self
8208    where
8209        T: std::iter::IntoIterator<Item = V>,
8210        V: std::convert::Into<crate::model::Entry>,
8211    {
8212        use std::iter::Iterator;
8213        self.entries = v.into_iter().map(|i| i.into()).collect();
8214        self
8215    }
8216
8217    /// Sets the value of [next_page_token][crate::model::ListEntriesResponse::next_page_token].
8218    ///
8219    /// # Example
8220    /// ```ignore,no_run
8221    /// # use google_cloud_dataplex_v1::model::ListEntriesResponse;
8222    /// let x = ListEntriesResponse::new().set_next_page_token("example");
8223    /// ```
8224    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8225        self.next_page_token = v.into();
8226        self
8227    }
8228}
8229
8230impl wkt::message::Message for ListEntriesResponse {
8231    fn typename() -> &'static str {
8232        "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesResponse"
8233    }
8234}
8235
8236#[doc(hidden)]
8237impl gax::paginator::internal::PageableResponse for ListEntriesResponse {
8238    type PageItem = crate::model::Entry;
8239
8240    fn items(self) -> std::vec::Vec<Self::PageItem> {
8241        self.entries
8242    }
8243
8244    fn next_page_token(&self) -> std::string::String {
8245        use std::clone::Clone;
8246        self.next_page_token.clone()
8247    }
8248}
8249
8250/// Get Entry request.
8251#[derive(Clone, Default, PartialEq)]
8252#[non_exhaustive]
8253pub struct GetEntryRequest {
8254    /// Required. The resource name of the Entry:
8255    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
8256    pub name: std::string::String,
8257
8258    /// Optional. View to control which parts of an entry the service should
8259    /// return.
8260    pub view: crate::model::EntryView,
8261
8262    /// Optional. Limits the aspects returned to the provided aspect types.
8263    /// It only works for CUSTOM view.
8264    pub aspect_types: std::vec::Vec<std::string::String>,
8265
8266    /// Optional. Limits the aspects returned to those associated with the provided
8267    /// paths within the Entry. It only works for CUSTOM view.
8268    pub paths: std::vec::Vec<std::string::String>,
8269
8270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8271}
8272
8273impl GetEntryRequest {
8274    pub fn new() -> Self {
8275        std::default::Default::default()
8276    }
8277
8278    /// Sets the value of [name][crate::model::GetEntryRequest::name].
8279    ///
8280    /// # Example
8281    /// ```ignore,no_run
8282    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8283    /// let x = GetEntryRequest::new().set_name("example");
8284    /// ```
8285    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8286        self.name = v.into();
8287        self
8288    }
8289
8290    /// Sets the value of [view][crate::model::GetEntryRequest::view].
8291    ///
8292    /// # Example
8293    /// ```ignore,no_run
8294    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8295    /// use google_cloud_dataplex_v1::model::EntryView;
8296    /// let x0 = GetEntryRequest::new().set_view(EntryView::Basic);
8297    /// let x1 = GetEntryRequest::new().set_view(EntryView::Full);
8298    /// let x2 = GetEntryRequest::new().set_view(EntryView::Custom);
8299    /// ```
8300    pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
8301        self.view = v.into();
8302        self
8303    }
8304
8305    /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
8306    ///
8307    /// # Example
8308    /// ```ignore,no_run
8309    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8310    /// let x = GetEntryRequest::new().set_aspect_types(["a", "b", "c"]);
8311    /// ```
8312    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
8313    where
8314        T: std::iter::IntoIterator<Item = V>,
8315        V: std::convert::Into<std::string::String>,
8316    {
8317        use std::iter::Iterator;
8318        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
8319        self
8320    }
8321
8322    /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
8323    ///
8324    /// # Example
8325    /// ```ignore,no_run
8326    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8327    /// let x = GetEntryRequest::new().set_paths(["a", "b", "c"]);
8328    /// ```
8329    pub fn set_paths<T, V>(mut self, v: T) -> Self
8330    where
8331        T: std::iter::IntoIterator<Item = V>,
8332        V: std::convert::Into<std::string::String>,
8333    {
8334        use std::iter::Iterator;
8335        self.paths = v.into_iter().map(|i| i.into()).collect();
8336        self
8337    }
8338}
8339
8340impl wkt::message::Message for GetEntryRequest {
8341    fn typename() -> &'static str {
8342        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryRequest"
8343    }
8344}
8345
8346/// Lookup Entry request using permissions in the source system.
8347#[derive(Clone, Default, PartialEq)]
8348#[non_exhaustive]
8349pub struct LookupEntryRequest {
8350    /// Required. The project to which the request should be attributed in the
8351    /// following form: `projects/{project}/locations/{location}`.
8352    pub name: std::string::String,
8353
8354    /// Optional. View to control which parts of an entry the service should
8355    /// return.
8356    pub view: crate::model::EntryView,
8357
8358    /// Optional. Limits the aspects returned to the provided aspect types.
8359    /// It only works for CUSTOM view.
8360    pub aspect_types: std::vec::Vec<std::string::String>,
8361
8362    /// Optional. Limits the aspects returned to those associated with the provided
8363    /// paths within the Entry. It only works for CUSTOM view.
8364    pub paths: std::vec::Vec<std::string::String>,
8365
8366    /// Required. The resource name of the Entry:
8367    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
8368    pub entry: std::string::String,
8369
8370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8371}
8372
8373impl LookupEntryRequest {
8374    pub fn new() -> Self {
8375        std::default::Default::default()
8376    }
8377
8378    /// Sets the value of [name][crate::model::LookupEntryRequest::name].
8379    ///
8380    /// # Example
8381    /// ```ignore,no_run
8382    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8383    /// let x = LookupEntryRequest::new().set_name("example");
8384    /// ```
8385    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8386        self.name = v.into();
8387        self
8388    }
8389
8390    /// Sets the value of [view][crate::model::LookupEntryRequest::view].
8391    ///
8392    /// # Example
8393    /// ```ignore,no_run
8394    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8395    /// use google_cloud_dataplex_v1::model::EntryView;
8396    /// let x0 = LookupEntryRequest::new().set_view(EntryView::Basic);
8397    /// let x1 = LookupEntryRequest::new().set_view(EntryView::Full);
8398    /// let x2 = LookupEntryRequest::new().set_view(EntryView::Custom);
8399    /// ```
8400    pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
8401        self.view = v.into();
8402        self
8403    }
8404
8405    /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
8406    ///
8407    /// # Example
8408    /// ```ignore,no_run
8409    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8410    /// let x = LookupEntryRequest::new().set_aspect_types(["a", "b", "c"]);
8411    /// ```
8412    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
8413    where
8414        T: std::iter::IntoIterator<Item = V>,
8415        V: std::convert::Into<std::string::String>,
8416    {
8417        use std::iter::Iterator;
8418        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
8419        self
8420    }
8421
8422    /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
8423    ///
8424    /// # Example
8425    /// ```ignore,no_run
8426    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8427    /// let x = LookupEntryRequest::new().set_paths(["a", "b", "c"]);
8428    /// ```
8429    pub fn set_paths<T, V>(mut self, v: T) -> Self
8430    where
8431        T: std::iter::IntoIterator<Item = V>,
8432        V: std::convert::Into<std::string::String>,
8433    {
8434        use std::iter::Iterator;
8435        self.paths = v.into_iter().map(|i| i.into()).collect();
8436        self
8437    }
8438
8439    /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
8440    ///
8441    /// # Example
8442    /// ```ignore,no_run
8443    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8444    /// let x = LookupEntryRequest::new().set_entry("example");
8445    /// ```
8446    pub fn set_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8447        self.entry = v.into();
8448        self
8449    }
8450}
8451
8452impl wkt::message::Message for LookupEntryRequest {
8453    fn typename() -> &'static str {
8454        "type.googleapis.com/google.cloud.dataplex.v1.LookupEntryRequest"
8455    }
8456}
8457
8458#[derive(Clone, Default, PartialEq)]
8459#[non_exhaustive]
8460pub struct SearchEntriesRequest {
8461    /// Required. The project to which the request should be attributed in the
8462    /// following form: `projects/{project}/locations/global`.
8463    pub name: std::string::String,
8464
8465    /// Required. The query against which entries in scope should be matched.
8466    /// The query syntax is defined in [Search syntax for Dataplex Universal
8467    /// Catalog](https://cloud.google.com/dataplex/docs/search-syntax).
8468    pub query: std::string::String,
8469
8470    /// Optional. Number of results in the search page. If <=0, then defaults
8471    /// to 10. Max limit for page_size is 1000. Throws an invalid argument for
8472    /// page_size > 1000.
8473    pub page_size: i32,
8474
8475    /// Optional. Page token received from a previous `SearchEntries` call. Provide
8476    /// this to retrieve the subsequent page.
8477    pub page_token: std::string::String,
8478
8479    /// Optional. Specifies the ordering of results.
8480    /// Supported values are:
8481    ///
8482    /// * `relevance`
8483    /// * `last_modified_timestamp`
8484    /// * `last_modified_timestamp asc`
8485    pub order_by: std::string::String,
8486
8487    /// Optional. The scope under which the search should be operating. It must
8488    /// either be `organizations/<org_id>` or `projects/<project_ref>`. If it is
8489    /// unspecified, it defaults to the organization where the project provided in
8490    /// `name` is located.
8491    pub scope: std::string::String,
8492
8493    /// Optional. Specifies whether the search should understand the meaning and
8494    /// intent behind the query, rather than just matching keywords.
8495    pub semantic_search: bool,
8496
8497    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8498}
8499
8500impl SearchEntriesRequest {
8501    pub fn new() -> Self {
8502        std::default::Default::default()
8503    }
8504
8505    /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
8506    ///
8507    /// # Example
8508    /// ```ignore,no_run
8509    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8510    /// let x = SearchEntriesRequest::new().set_name("example");
8511    /// ```
8512    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8513        self.name = v.into();
8514        self
8515    }
8516
8517    /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
8518    ///
8519    /// # Example
8520    /// ```ignore,no_run
8521    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8522    /// let x = SearchEntriesRequest::new().set_query("example");
8523    /// ```
8524    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8525        self.query = v.into();
8526        self
8527    }
8528
8529    /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
8530    ///
8531    /// # Example
8532    /// ```ignore,no_run
8533    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8534    /// let x = SearchEntriesRequest::new().set_page_size(42);
8535    /// ```
8536    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8537        self.page_size = v.into();
8538        self
8539    }
8540
8541    /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
8542    ///
8543    /// # Example
8544    /// ```ignore,no_run
8545    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8546    /// let x = SearchEntriesRequest::new().set_page_token("example");
8547    /// ```
8548    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8549        self.page_token = v.into();
8550        self
8551    }
8552
8553    /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
8554    ///
8555    /// # Example
8556    /// ```ignore,no_run
8557    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8558    /// let x = SearchEntriesRequest::new().set_order_by("example");
8559    /// ```
8560    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8561        self.order_by = v.into();
8562        self
8563    }
8564
8565    /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
8566    ///
8567    /// # Example
8568    /// ```ignore,no_run
8569    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8570    /// let x = SearchEntriesRequest::new().set_scope("example");
8571    /// ```
8572    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8573        self.scope = v.into();
8574        self
8575    }
8576
8577    /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
8578    ///
8579    /// # Example
8580    /// ```ignore,no_run
8581    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8582    /// let x = SearchEntriesRequest::new().set_semantic_search(true);
8583    /// ```
8584    pub fn set_semantic_search<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8585        self.semantic_search = v.into();
8586        self
8587    }
8588}
8589
8590impl wkt::message::Message for SearchEntriesRequest {
8591    fn typename() -> &'static str {
8592        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesRequest"
8593    }
8594}
8595
8596/// A single result of a SearchEntries request.
8597#[derive(Clone, Default, PartialEq)]
8598#[non_exhaustive]
8599pub struct SearchEntriesResult {
8600    /// Linked resource name.
8601    #[deprecated]
8602    pub linked_resource: std::string::String,
8603
8604    pub dataplex_entry: std::option::Option<crate::model::Entry>,
8605
8606    /// Snippets.
8607    #[deprecated]
8608    pub snippets: std::option::Option<crate::model::search_entries_result::Snippets>,
8609
8610    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8611}
8612
8613impl SearchEntriesResult {
8614    pub fn new() -> Self {
8615        std::default::Default::default()
8616    }
8617
8618    /// Sets the value of [linked_resource][crate::model::SearchEntriesResult::linked_resource].
8619    ///
8620    /// # Example
8621    /// ```ignore,no_run
8622    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8623    /// let x = SearchEntriesResult::new().set_linked_resource("example");
8624    /// ```
8625    #[deprecated]
8626    pub fn set_linked_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8627        self.linked_resource = v.into();
8628        self
8629    }
8630
8631    /// Sets the value of [dataplex_entry][crate::model::SearchEntriesResult::dataplex_entry].
8632    ///
8633    /// # Example
8634    /// ```ignore,no_run
8635    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8636    /// use google_cloud_dataplex_v1::model::Entry;
8637    /// let x = SearchEntriesResult::new().set_dataplex_entry(Entry::default()/* use setters */);
8638    /// ```
8639    pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
8640    where
8641        T: std::convert::Into<crate::model::Entry>,
8642    {
8643        self.dataplex_entry = std::option::Option::Some(v.into());
8644        self
8645    }
8646
8647    /// Sets or clears the value of [dataplex_entry][crate::model::SearchEntriesResult::dataplex_entry].
8648    ///
8649    /// # Example
8650    /// ```ignore,no_run
8651    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8652    /// use google_cloud_dataplex_v1::model::Entry;
8653    /// let x = SearchEntriesResult::new().set_or_clear_dataplex_entry(Some(Entry::default()/* use setters */));
8654    /// let x = SearchEntriesResult::new().set_or_clear_dataplex_entry(None::<Entry>);
8655    /// ```
8656    pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
8657    where
8658        T: std::convert::Into<crate::model::Entry>,
8659    {
8660        self.dataplex_entry = v.map(|x| x.into());
8661        self
8662    }
8663
8664    /// Sets the value of [snippets][crate::model::SearchEntriesResult::snippets].
8665    ///
8666    /// # Example
8667    /// ```ignore,no_run
8668    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8669    /// use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8670    /// let x = SearchEntriesResult::new().set_snippets(Snippets::default()/* use setters */);
8671    /// ```
8672    #[deprecated]
8673    pub fn set_snippets<T>(mut self, v: T) -> Self
8674    where
8675        T: std::convert::Into<crate::model::search_entries_result::Snippets>,
8676    {
8677        self.snippets = std::option::Option::Some(v.into());
8678        self
8679    }
8680
8681    /// Sets or clears the value of [snippets][crate::model::SearchEntriesResult::snippets].
8682    ///
8683    /// # Example
8684    /// ```ignore,no_run
8685    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8686    /// use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8687    /// let x = SearchEntriesResult::new().set_or_clear_snippets(Some(Snippets::default()/* use setters */));
8688    /// let x = SearchEntriesResult::new().set_or_clear_snippets(None::<Snippets>);
8689    /// ```
8690    #[deprecated]
8691    pub fn set_or_clear_snippets<T>(mut self, v: std::option::Option<T>) -> Self
8692    where
8693        T: std::convert::Into<crate::model::search_entries_result::Snippets>,
8694    {
8695        self.snippets = v.map(|x| x.into());
8696        self
8697    }
8698}
8699
8700impl wkt::message::Message for SearchEntriesResult {
8701    fn typename() -> &'static str {
8702        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult"
8703    }
8704}
8705
8706/// Defines additional types related to [SearchEntriesResult].
8707pub mod search_entries_result {
8708    #[allow(unused_imports)]
8709    use super::*;
8710
8711    /// Snippets for the entry, contains HTML-style highlighting for
8712    /// matched tokens, will be used in UI.
8713    #[derive(Clone, Default, PartialEq)]
8714    #[non_exhaustive]
8715    #[deprecated]
8716    pub struct Snippets {
8717        /// Entry
8718        #[deprecated]
8719        pub dataplex_entry: std::option::Option<crate::model::Entry>,
8720
8721        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8722    }
8723
8724    impl Snippets {
8725        pub fn new() -> Self {
8726            std::default::Default::default()
8727        }
8728
8729        /// Sets the value of [dataplex_entry][crate::model::search_entries_result::Snippets::dataplex_entry].
8730        ///
8731        /// # Example
8732        /// ```ignore,no_run
8733        /// # use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8734        /// use google_cloud_dataplex_v1::model::Entry;
8735        /// let x = Snippets::new().set_dataplex_entry(Entry::default()/* use setters */);
8736        /// ```
8737        #[deprecated]
8738        pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
8739        where
8740            T: std::convert::Into<crate::model::Entry>,
8741        {
8742            self.dataplex_entry = std::option::Option::Some(v.into());
8743            self
8744        }
8745
8746        /// Sets or clears the value of [dataplex_entry][crate::model::search_entries_result::Snippets::dataplex_entry].
8747        ///
8748        /// # Example
8749        /// ```ignore,no_run
8750        /// # use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8751        /// use google_cloud_dataplex_v1::model::Entry;
8752        /// let x = Snippets::new().set_or_clear_dataplex_entry(Some(Entry::default()/* use setters */));
8753        /// let x = Snippets::new().set_or_clear_dataplex_entry(None::<Entry>);
8754        /// ```
8755        #[deprecated]
8756        pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
8757        where
8758            T: std::convert::Into<crate::model::Entry>,
8759        {
8760            self.dataplex_entry = v.map(|x| x.into());
8761            self
8762        }
8763    }
8764
8765    impl wkt::message::Message for Snippets {
8766        fn typename() -> &'static str {
8767            "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult.Snippets"
8768        }
8769    }
8770}
8771
8772#[derive(Clone, Default, PartialEq)]
8773#[non_exhaustive]
8774pub struct SearchEntriesResponse {
8775    /// The results matching the search query.
8776    pub results: std::vec::Vec<crate::model::SearchEntriesResult>,
8777
8778    /// The estimated total number of matching entries. This number isn't
8779    /// guaranteed to be accurate.
8780    pub total_size: i32,
8781
8782    /// Token to retrieve the next page of results, or empty if there are no more
8783    /// results in the list.
8784    pub next_page_token: std::string::String,
8785
8786    /// Locations that the service couldn't reach. Search results don't include
8787    /// data from these locations.
8788    pub unreachable: std::vec::Vec<std::string::String>,
8789
8790    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8791}
8792
8793impl SearchEntriesResponse {
8794    pub fn new() -> Self {
8795        std::default::Default::default()
8796    }
8797
8798    /// Sets the value of [results][crate::model::SearchEntriesResponse::results].
8799    ///
8800    /// # Example
8801    /// ```ignore,no_run
8802    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8803    /// use google_cloud_dataplex_v1::model::SearchEntriesResult;
8804    /// let x = SearchEntriesResponse::new()
8805    ///     .set_results([
8806    ///         SearchEntriesResult::default()/* use setters */,
8807    ///         SearchEntriesResult::default()/* use (different) setters */,
8808    ///     ]);
8809    /// ```
8810    pub fn set_results<T, V>(mut self, v: T) -> Self
8811    where
8812        T: std::iter::IntoIterator<Item = V>,
8813        V: std::convert::Into<crate::model::SearchEntriesResult>,
8814    {
8815        use std::iter::Iterator;
8816        self.results = v.into_iter().map(|i| i.into()).collect();
8817        self
8818    }
8819
8820    /// Sets the value of [total_size][crate::model::SearchEntriesResponse::total_size].
8821    ///
8822    /// # Example
8823    /// ```ignore,no_run
8824    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8825    /// let x = SearchEntriesResponse::new().set_total_size(42);
8826    /// ```
8827    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8828        self.total_size = v.into();
8829        self
8830    }
8831
8832    /// Sets the value of [next_page_token][crate::model::SearchEntriesResponse::next_page_token].
8833    ///
8834    /// # Example
8835    /// ```ignore,no_run
8836    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8837    /// let x = SearchEntriesResponse::new().set_next_page_token("example");
8838    /// ```
8839    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8840        self.next_page_token = v.into();
8841        self
8842    }
8843
8844    /// Sets the value of [unreachable][crate::model::SearchEntriesResponse::unreachable].
8845    ///
8846    /// # Example
8847    /// ```ignore,no_run
8848    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8849    /// let x = SearchEntriesResponse::new().set_unreachable(["a", "b", "c"]);
8850    /// ```
8851    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
8852    where
8853        T: std::iter::IntoIterator<Item = V>,
8854        V: std::convert::Into<std::string::String>,
8855    {
8856        use std::iter::Iterator;
8857        self.unreachable = v.into_iter().map(|i| i.into()).collect();
8858        self
8859    }
8860}
8861
8862impl wkt::message::Message for SearchEntriesResponse {
8863    fn typename() -> &'static str {
8864        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResponse"
8865    }
8866}
8867
8868#[doc(hidden)]
8869impl gax::paginator::internal::PageableResponse for SearchEntriesResponse {
8870    type PageItem = crate::model::SearchEntriesResult;
8871
8872    fn items(self) -> std::vec::Vec<Self::PageItem> {
8873        self.results
8874    }
8875
8876    fn next_page_token(&self) -> std::string::String {
8877        use std::clone::Clone;
8878        self.next_page_token.clone()
8879    }
8880}
8881
8882/// An object that describes the values that you want to set for an entry and its
8883/// attached aspects when you import metadata. Used when you run a metadata
8884/// import job. See
8885/// [CreateMetadataJob][google.cloud.dataplex.v1.CatalogService.CreateMetadataJob].
8886///
8887/// You provide a collection of import items in a metadata import file. For more
8888/// information about how to create a metadata import file, see [Metadata import
8889/// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).
8890///
8891/// [google.cloud.dataplex.v1.CatalogService.CreateMetadataJob]: crate::client::CatalogService::create_metadata_job
8892#[derive(Clone, Default, PartialEq)]
8893#[non_exhaustive]
8894pub struct ImportItem {
8895    /// Information about an entry and its attached aspects.
8896    pub entry: std::option::Option<crate::model::Entry>,
8897
8898    /// Information about the entry link. User should provide either one of the
8899    /// entry or entry_link. While providing entry_link, user should not
8900    /// provide update_mask and aspect_keys.
8901    pub entry_link: std::option::Option<crate::model::EntryLink>,
8902
8903    /// The fields to update, in paths that are relative to the `Entry` resource.
8904    /// Separate each field with a comma.
8905    ///
8906    /// In `FULL` entry sync mode, Dataplex Universal Catalog includes the paths of
8907    /// all of the fields for an entry that can be modified, including aspects.
8908    /// This means that Dataplex Universal Catalog replaces the existing entry with
8909    /// the entry in the metadata import file. All modifiable fields are updated,
8910    /// regardless of the fields that are listed in the update mask, and regardless
8911    /// of whether a field is present in the `entry` object.
8912    ///
8913    /// The `update_mask` field is ignored when an entry is created or re-created.
8914    ///
8915    /// In an aspect-only metadata job (when entry sync mode is `NONE`), set this
8916    /// value to `aspects`.
8917    ///
8918    /// Dataplex Universal Catalog also determines which entries and aspects to
8919    /// modify by comparing the values and timestamps that you provide in the
8920    /// metadata import file with the values and timestamps that exist in your
8921    /// project. For more information, see [Comparison
8922    /// logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic).
8923    pub update_mask: std::option::Option<wkt::FieldMask>,
8924
8925    /// The aspects to modify. Supports the following syntaxes:
8926    ///
8927    /// * `{aspect_type_reference}`: matches aspects that belong to the specified
8928    ///   aspect type and are attached directly to the entry.
8929    /// * `{aspect_type_reference}@{path}`: matches aspects that belong to the
8930    ///   specified aspect type and path.
8931    /// * `{aspect_type_reference}@*` : matches aspects of the given type for all
8932    ///   paths.
8933    /// * `*@path` : matches aspects of all types on the given path.
8934    ///
8935    /// Replace `{aspect_type_reference}` with a reference to the aspect type, in
8936    /// the format
8937    /// `{project_id_or_number}.{location_id}.{aspect_type_id}`.
8938    ///
8939    /// In `FULL` entry sync mode, if you leave this field empty, it is treated as
8940    /// specifying exactly those aspects that are present within the specified
8941    /// entry. Dataplex Universal Catalog implicitly adds the keys for all of the
8942    /// required aspects of an entry.
8943    pub aspect_keys: std::vec::Vec<std::string::String>,
8944
8945    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8946}
8947
8948impl ImportItem {
8949    pub fn new() -> Self {
8950        std::default::Default::default()
8951    }
8952
8953    /// Sets the value of [entry][crate::model::ImportItem::entry].
8954    ///
8955    /// # Example
8956    /// ```ignore,no_run
8957    /// # use google_cloud_dataplex_v1::model::ImportItem;
8958    /// use google_cloud_dataplex_v1::model::Entry;
8959    /// let x = ImportItem::new().set_entry(Entry::default()/* use setters */);
8960    /// ```
8961    pub fn set_entry<T>(mut self, v: T) -> Self
8962    where
8963        T: std::convert::Into<crate::model::Entry>,
8964    {
8965        self.entry = std::option::Option::Some(v.into());
8966        self
8967    }
8968
8969    /// Sets or clears the value of [entry][crate::model::ImportItem::entry].
8970    ///
8971    /// # Example
8972    /// ```ignore,no_run
8973    /// # use google_cloud_dataplex_v1::model::ImportItem;
8974    /// use google_cloud_dataplex_v1::model::Entry;
8975    /// let x = ImportItem::new().set_or_clear_entry(Some(Entry::default()/* use setters */));
8976    /// let x = ImportItem::new().set_or_clear_entry(None::<Entry>);
8977    /// ```
8978    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
8979    where
8980        T: std::convert::Into<crate::model::Entry>,
8981    {
8982        self.entry = v.map(|x| x.into());
8983        self
8984    }
8985
8986    /// Sets the value of [entry_link][crate::model::ImportItem::entry_link].
8987    ///
8988    /// # Example
8989    /// ```ignore,no_run
8990    /// # use google_cloud_dataplex_v1::model::ImportItem;
8991    /// use google_cloud_dataplex_v1::model::EntryLink;
8992    /// let x = ImportItem::new().set_entry_link(EntryLink::default()/* use setters */);
8993    /// ```
8994    pub fn set_entry_link<T>(mut self, v: T) -> Self
8995    where
8996        T: std::convert::Into<crate::model::EntryLink>,
8997    {
8998        self.entry_link = std::option::Option::Some(v.into());
8999        self
9000    }
9001
9002    /// Sets or clears the value of [entry_link][crate::model::ImportItem::entry_link].
9003    ///
9004    /// # Example
9005    /// ```ignore,no_run
9006    /// # use google_cloud_dataplex_v1::model::ImportItem;
9007    /// use google_cloud_dataplex_v1::model::EntryLink;
9008    /// let x = ImportItem::new().set_or_clear_entry_link(Some(EntryLink::default()/* use setters */));
9009    /// let x = ImportItem::new().set_or_clear_entry_link(None::<EntryLink>);
9010    /// ```
9011    pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
9012    where
9013        T: std::convert::Into<crate::model::EntryLink>,
9014    {
9015        self.entry_link = v.map(|x| x.into());
9016        self
9017    }
9018
9019    /// Sets the value of [update_mask][crate::model::ImportItem::update_mask].
9020    ///
9021    /// # Example
9022    /// ```ignore,no_run
9023    /// # use google_cloud_dataplex_v1::model::ImportItem;
9024    /// use wkt::FieldMask;
9025    /// let x = ImportItem::new().set_update_mask(FieldMask::default()/* use setters */);
9026    /// ```
9027    pub fn set_update_mask<T>(mut self, v: T) -> Self
9028    where
9029        T: std::convert::Into<wkt::FieldMask>,
9030    {
9031        self.update_mask = std::option::Option::Some(v.into());
9032        self
9033    }
9034
9035    /// Sets or clears the value of [update_mask][crate::model::ImportItem::update_mask].
9036    ///
9037    /// # Example
9038    /// ```ignore,no_run
9039    /// # use google_cloud_dataplex_v1::model::ImportItem;
9040    /// use wkt::FieldMask;
9041    /// let x = ImportItem::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
9042    /// let x = ImportItem::new().set_or_clear_update_mask(None::<FieldMask>);
9043    /// ```
9044    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9045    where
9046        T: std::convert::Into<wkt::FieldMask>,
9047    {
9048        self.update_mask = v.map(|x| x.into());
9049        self
9050    }
9051
9052    /// Sets the value of [aspect_keys][crate::model::ImportItem::aspect_keys].
9053    ///
9054    /// # Example
9055    /// ```ignore,no_run
9056    /// # use google_cloud_dataplex_v1::model::ImportItem;
9057    /// let x = ImportItem::new().set_aspect_keys(["a", "b", "c"]);
9058    /// ```
9059    pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
9060    where
9061        T: std::iter::IntoIterator<Item = V>,
9062        V: std::convert::Into<std::string::String>,
9063    {
9064        use std::iter::Iterator;
9065        self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
9066        self
9067    }
9068}
9069
9070impl wkt::message::Message for ImportItem {
9071    fn typename() -> &'static str {
9072        "type.googleapis.com/google.cloud.dataplex.v1.ImportItem"
9073    }
9074}
9075
9076/// Create metadata job request.
9077#[derive(Clone, Default, PartialEq)]
9078#[non_exhaustive]
9079pub struct CreateMetadataJobRequest {
9080    /// Required. The resource name of the parent location, in the format
9081    /// `projects/{project_id_or_number}/locations/{location_id}`
9082    pub parent: std::string::String,
9083
9084    /// Required. The metadata job resource.
9085    pub metadata_job: std::option::Option<crate::model::MetadataJob>,
9086
9087    /// Optional. The metadata job ID. If not provided, a unique ID is generated
9088    /// with the prefix `metadata-job-`.
9089    pub metadata_job_id: std::string::String,
9090
9091    /// Optional. The service validates the request without performing any
9092    /// mutations. The default is false.
9093    pub validate_only: bool,
9094
9095    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9096}
9097
9098impl CreateMetadataJobRequest {
9099    pub fn new() -> Self {
9100        std::default::Default::default()
9101    }
9102
9103    /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
9104    ///
9105    /// # Example
9106    /// ```ignore,no_run
9107    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9108    /// let x = CreateMetadataJobRequest::new().set_parent("example");
9109    /// ```
9110    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9111        self.parent = v.into();
9112        self
9113    }
9114
9115    /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
9116    ///
9117    /// # Example
9118    /// ```ignore,no_run
9119    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9120    /// use google_cloud_dataplex_v1::model::MetadataJob;
9121    /// let x = CreateMetadataJobRequest::new().set_metadata_job(MetadataJob::default()/* use setters */);
9122    /// ```
9123    pub fn set_metadata_job<T>(mut self, v: T) -> Self
9124    where
9125        T: std::convert::Into<crate::model::MetadataJob>,
9126    {
9127        self.metadata_job = std::option::Option::Some(v.into());
9128        self
9129    }
9130
9131    /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
9132    ///
9133    /// # Example
9134    /// ```ignore,no_run
9135    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9136    /// use google_cloud_dataplex_v1::model::MetadataJob;
9137    /// let x = CreateMetadataJobRequest::new().set_or_clear_metadata_job(Some(MetadataJob::default()/* use setters */));
9138    /// let x = CreateMetadataJobRequest::new().set_or_clear_metadata_job(None::<MetadataJob>);
9139    /// ```
9140    pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
9141    where
9142        T: std::convert::Into<crate::model::MetadataJob>,
9143    {
9144        self.metadata_job = v.map(|x| x.into());
9145        self
9146    }
9147
9148    /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
9149    ///
9150    /// # Example
9151    /// ```ignore,no_run
9152    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9153    /// let x = CreateMetadataJobRequest::new().set_metadata_job_id("example");
9154    /// ```
9155    pub fn set_metadata_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9156        self.metadata_job_id = v.into();
9157        self
9158    }
9159
9160    /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
9161    ///
9162    /// # Example
9163    /// ```ignore,no_run
9164    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9165    /// let x = CreateMetadataJobRequest::new().set_validate_only(true);
9166    /// ```
9167    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9168        self.validate_only = v.into();
9169        self
9170    }
9171}
9172
9173impl wkt::message::Message for CreateMetadataJobRequest {
9174    fn typename() -> &'static str {
9175        "type.googleapis.com/google.cloud.dataplex.v1.CreateMetadataJobRequest"
9176    }
9177}
9178
9179/// Get metadata job request.
9180#[derive(Clone, Default, PartialEq)]
9181#[non_exhaustive]
9182pub struct GetMetadataJobRequest {
9183    /// Required. The resource name of the metadata job, in the format
9184    /// `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`.
9185    pub name: std::string::String,
9186
9187    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9188}
9189
9190impl GetMetadataJobRequest {
9191    pub fn new() -> Self {
9192        std::default::Default::default()
9193    }
9194
9195    /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
9196    ///
9197    /// # Example
9198    /// ```ignore,no_run
9199    /// # use google_cloud_dataplex_v1::model::GetMetadataJobRequest;
9200    /// let x = GetMetadataJobRequest::new().set_name("example");
9201    /// ```
9202    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9203        self.name = v.into();
9204        self
9205    }
9206}
9207
9208impl wkt::message::Message for GetMetadataJobRequest {
9209    fn typename() -> &'static str {
9210        "type.googleapis.com/google.cloud.dataplex.v1.GetMetadataJobRequest"
9211    }
9212}
9213
9214/// List metadata jobs request.
9215#[derive(Clone, Default, PartialEq)]
9216#[non_exhaustive]
9217pub struct ListMetadataJobsRequest {
9218    /// Required. The resource name of the parent location, in the format
9219    /// `projects/{project_id_or_number}/locations/{location_id}`
9220    pub parent: std::string::String,
9221
9222    /// Optional. The maximum number of metadata jobs to return. The service might
9223    /// return fewer jobs than this value. If unspecified, at most 10 jobs are
9224    /// returned. The maximum value is 1,000.
9225    pub page_size: i32,
9226
9227    /// Optional. The page token received from a previous `ListMetadataJobs` call.
9228    /// Provide this token to retrieve the subsequent page of results. When
9229    /// paginating, all other parameters that are provided to the
9230    /// `ListMetadataJobs` request must match the call that provided the page
9231    /// token.
9232    pub page_token: std::string::String,
9233
9234    /// Optional. Filter request. Filters are case-sensitive.
9235    /// The service supports the following formats:
9236    ///
9237    /// * `labels.key1 = "value1"`
9238    /// * `labels:key1`
9239    /// * `name = "value"`
9240    ///
9241    /// You can combine filters with `AND`, `OR`, and `NOT` operators.
9242    pub filter: std::string::String,
9243
9244    /// Optional. The field to sort the results by, either `name` or `create_time`.
9245    /// If not specified, the ordering is undefined.
9246    pub order_by: std::string::String,
9247
9248    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9249}
9250
9251impl ListMetadataJobsRequest {
9252    pub fn new() -> Self {
9253        std::default::Default::default()
9254    }
9255
9256    /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
9257    ///
9258    /// # Example
9259    /// ```ignore,no_run
9260    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9261    /// let x = ListMetadataJobsRequest::new().set_parent("example");
9262    /// ```
9263    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9264        self.parent = v.into();
9265        self
9266    }
9267
9268    /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
9269    ///
9270    /// # Example
9271    /// ```ignore,no_run
9272    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9273    /// let x = ListMetadataJobsRequest::new().set_page_size(42);
9274    /// ```
9275    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9276        self.page_size = v.into();
9277        self
9278    }
9279
9280    /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
9281    ///
9282    /// # Example
9283    /// ```ignore,no_run
9284    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9285    /// let x = ListMetadataJobsRequest::new().set_page_token("example");
9286    /// ```
9287    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9288        self.page_token = v.into();
9289        self
9290    }
9291
9292    /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
9293    ///
9294    /// # Example
9295    /// ```ignore,no_run
9296    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9297    /// let x = ListMetadataJobsRequest::new().set_filter("example");
9298    /// ```
9299    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9300        self.filter = v.into();
9301        self
9302    }
9303
9304    /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
9305    ///
9306    /// # Example
9307    /// ```ignore,no_run
9308    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9309    /// let x = ListMetadataJobsRequest::new().set_order_by("example");
9310    /// ```
9311    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9312        self.order_by = v.into();
9313        self
9314    }
9315}
9316
9317impl wkt::message::Message for ListMetadataJobsRequest {
9318    fn typename() -> &'static str {
9319        "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsRequest"
9320    }
9321}
9322
9323/// List metadata jobs response.
9324#[derive(Clone, Default, PartialEq)]
9325#[non_exhaustive]
9326pub struct ListMetadataJobsResponse {
9327    /// Metadata jobs under the specified parent location.
9328    pub metadata_jobs: std::vec::Vec<crate::model::MetadataJob>,
9329
9330    /// A token to retrieve the next page of results. If there are no more results
9331    /// in the list, the value is empty.
9332    pub next_page_token: std::string::String,
9333
9334    /// Locations that the service couldn't reach.
9335    pub unreachable_locations: std::vec::Vec<std::string::String>,
9336
9337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9338}
9339
9340impl ListMetadataJobsResponse {
9341    pub fn new() -> Self {
9342        std::default::Default::default()
9343    }
9344
9345    /// Sets the value of [metadata_jobs][crate::model::ListMetadataJobsResponse::metadata_jobs].
9346    ///
9347    /// # Example
9348    /// ```ignore,no_run
9349    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsResponse;
9350    /// use google_cloud_dataplex_v1::model::MetadataJob;
9351    /// let x = ListMetadataJobsResponse::new()
9352    ///     .set_metadata_jobs([
9353    ///         MetadataJob::default()/* use setters */,
9354    ///         MetadataJob::default()/* use (different) setters */,
9355    ///     ]);
9356    /// ```
9357    pub fn set_metadata_jobs<T, V>(mut self, v: T) -> Self
9358    where
9359        T: std::iter::IntoIterator<Item = V>,
9360        V: std::convert::Into<crate::model::MetadataJob>,
9361    {
9362        use std::iter::Iterator;
9363        self.metadata_jobs = v.into_iter().map(|i| i.into()).collect();
9364        self
9365    }
9366
9367    /// Sets the value of [next_page_token][crate::model::ListMetadataJobsResponse::next_page_token].
9368    ///
9369    /// # Example
9370    /// ```ignore,no_run
9371    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsResponse;
9372    /// let x = ListMetadataJobsResponse::new().set_next_page_token("example");
9373    /// ```
9374    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9375        self.next_page_token = v.into();
9376        self
9377    }
9378
9379    /// Sets the value of [unreachable_locations][crate::model::ListMetadataJobsResponse::unreachable_locations].
9380    ///
9381    /// # Example
9382    /// ```ignore,no_run
9383    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsResponse;
9384    /// let x = ListMetadataJobsResponse::new().set_unreachable_locations(["a", "b", "c"]);
9385    /// ```
9386    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
9387    where
9388        T: std::iter::IntoIterator<Item = V>,
9389        V: std::convert::Into<std::string::String>,
9390    {
9391        use std::iter::Iterator;
9392        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
9393        self
9394    }
9395}
9396
9397impl wkt::message::Message for ListMetadataJobsResponse {
9398    fn typename() -> &'static str {
9399        "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsResponse"
9400    }
9401}
9402
9403#[doc(hidden)]
9404impl gax::paginator::internal::PageableResponse for ListMetadataJobsResponse {
9405    type PageItem = crate::model::MetadataJob;
9406
9407    fn items(self) -> std::vec::Vec<Self::PageItem> {
9408        self.metadata_jobs
9409    }
9410
9411    fn next_page_token(&self) -> std::string::String {
9412        use std::clone::Clone;
9413        self.next_page_token.clone()
9414    }
9415}
9416
9417/// Cancel metadata job request.
9418#[derive(Clone, Default, PartialEq)]
9419#[non_exhaustive]
9420pub struct CancelMetadataJobRequest {
9421    /// Required. The resource name of the job, in the format
9422    /// `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`
9423    pub name: std::string::String,
9424
9425    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9426}
9427
9428impl CancelMetadataJobRequest {
9429    pub fn new() -> Self {
9430        std::default::Default::default()
9431    }
9432
9433    /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
9434    ///
9435    /// # Example
9436    /// ```ignore,no_run
9437    /// # use google_cloud_dataplex_v1::model::CancelMetadataJobRequest;
9438    /// let x = CancelMetadataJobRequest::new().set_name("example");
9439    /// ```
9440    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9441        self.name = v.into();
9442        self
9443    }
9444}
9445
9446impl wkt::message::Message for CancelMetadataJobRequest {
9447    fn typename() -> &'static str {
9448        "type.googleapis.com/google.cloud.dataplex.v1.CancelMetadataJobRequest"
9449    }
9450}
9451
9452/// A metadata job resource.
9453#[derive(Clone, Default, PartialEq)]
9454#[non_exhaustive]
9455pub struct MetadataJob {
9456    /// Output only. Identifier. The name of the resource that the configuration is
9457    /// applied to, in the format
9458    /// `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`.
9459    pub name: std::string::String,
9460
9461    /// Output only. A system-generated, globally unique ID for the metadata job.
9462    /// If the metadata job is deleted and then re-created with the same name, this
9463    /// ID is different.
9464    pub uid: std::string::String,
9465
9466    /// Output only. The time when the metadata job was created.
9467    pub create_time: std::option::Option<wkt::Timestamp>,
9468
9469    /// Output only. The time when the metadata job was updated.
9470    pub update_time: std::option::Option<wkt::Timestamp>,
9471
9472    /// Optional. User-defined labels.
9473    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9474
9475    /// Required. Metadata job type.
9476    pub r#type: crate::model::metadata_job::Type,
9477
9478    /// Output only. Metadata job status.
9479    pub status: std::option::Option<crate::model::metadata_job::Status>,
9480
9481    pub spec: std::option::Option<crate::model::metadata_job::Spec>,
9482
9483    pub result: std::option::Option<crate::model::metadata_job::Result>,
9484
9485    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9486}
9487
9488impl MetadataJob {
9489    pub fn new() -> Self {
9490        std::default::Default::default()
9491    }
9492
9493    /// Sets the value of [name][crate::model::MetadataJob::name].
9494    ///
9495    /// # Example
9496    /// ```ignore,no_run
9497    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9498    /// let x = MetadataJob::new().set_name("example");
9499    /// ```
9500    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9501        self.name = v.into();
9502        self
9503    }
9504
9505    /// Sets the value of [uid][crate::model::MetadataJob::uid].
9506    ///
9507    /// # Example
9508    /// ```ignore,no_run
9509    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9510    /// let x = MetadataJob::new().set_uid("example");
9511    /// ```
9512    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9513        self.uid = v.into();
9514        self
9515    }
9516
9517    /// Sets the value of [create_time][crate::model::MetadataJob::create_time].
9518    ///
9519    /// # Example
9520    /// ```ignore,no_run
9521    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9522    /// use wkt::Timestamp;
9523    /// let x = MetadataJob::new().set_create_time(Timestamp::default()/* use setters */);
9524    /// ```
9525    pub fn set_create_time<T>(mut self, v: T) -> Self
9526    where
9527        T: std::convert::Into<wkt::Timestamp>,
9528    {
9529        self.create_time = std::option::Option::Some(v.into());
9530        self
9531    }
9532
9533    /// Sets or clears the value of [create_time][crate::model::MetadataJob::create_time].
9534    ///
9535    /// # Example
9536    /// ```ignore,no_run
9537    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9538    /// use wkt::Timestamp;
9539    /// let x = MetadataJob::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9540    /// let x = MetadataJob::new().set_or_clear_create_time(None::<Timestamp>);
9541    /// ```
9542    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9543    where
9544        T: std::convert::Into<wkt::Timestamp>,
9545    {
9546        self.create_time = v.map(|x| x.into());
9547        self
9548    }
9549
9550    /// Sets the value of [update_time][crate::model::MetadataJob::update_time].
9551    ///
9552    /// # Example
9553    /// ```ignore,no_run
9554    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9555    /// use wkt::Timestamp;
9556    /// let x = MetadataJob::new().set_update_time(Timestamp::default()/* use setters */);
9557    /// ```
9558    pub fn set_update_time<T>(mut self, v: T) -> Self
9559    where
9560        T: std::convert::Into<wkt::Timestamp>,
9561    {
9562        self.update_time = std::option::Option::Some(v.into());
9563        self
9564    }
9565
9566    /// Sets or clears the value of [update_time][crate::model::MetadataJob::update_time].
9567    ///
9568    /// # Example
9569    /// ```ignore,no_run
9570    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9571    /// use wkt::Timestamp;
9572    /// let x = MetadataJob::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9573    /// let x = MetadataJob::new().set_or_clear_update_time(None::<Timestamp>);
9574    /// ```
9575    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9576    where
9577        T: std::convert::Into<wkt::Timestamp>,
9578    {
9579        self.update_time = v.map(|x| x.into());
9580        self
9581    }
9582
9583    /// Sets the value of [labels][crate::model::MetadataJob::labels].
9584    ///
9585    /// # Example
9586    /// ```ignore,no_run
9587    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9588    /// let x = MetadataJob::new().set_labels([
9589    ///     ("key0", "abc"),
9590    ///     ("key1", "xyz"),
9591    /// ]);
9592    /// ```
9593    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9594    where
9595        T: std::iter::IntoIterator<Item = (K, V)>,
9596        K: std::convert::Into<std::string::String>,
9597        V: std::convert::Into<std::string::String>,
9598    {
9599        use std::iter::Iterator;
9600        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9601        self
9602    }
9603
9604    /// Sets the value of [r#type][crate::model::MetadataJob::type].
9605    ///
9606    /// # Example
9607    /// ```ignore,no_run
9608    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9609    /// use google_cloud_dataplex_v1::model::metadata_job::Type;
9610    /// let x0 = MetadataJob::new().set_type(Type::Import);
9611    /// let x1 = MetadataJob::new().set_type(Type::Export);
9612    /// ```
9613    pub fn set_type<T: std::convert::Into<crate::model::metadata_job::Type>>(
9614        mut self,
9615        v: T,
9616    ) -> Self {
9617        self.r#type = v.into();
9618        self
9619    }
9620
9621    /// Sets the value of [status][crate::model::MetadataJob::status].
9622    ///
9623    /// # Example
9624    /// ```ignore,no_run
9625    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9626    /// use google_cloud_dataplex_v1::model::metadata_job::Status;
9627    /// let x = MetadataJob::new().set_status(Status::default()/* use setters */);
9628    /// ```
9629    pub fn set_status<T>(mut self, v: T) -> Self
9630    where
9631        T: std::convert::Into<crate::model::metadata_job::Status>,
9632    {
9633        self.status = std::option::Option::Some(v.into());
9634        self
9635    }
9636
9637    /// Sets or clears the value of [status][crate::model::MetadataJob::status].
9638    ///
9639    /// # Example
9640    /// ```ignore,no_run
9641    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9642    /// use google_cloud_dataplex_v1::model::metadata_job::Status;
9643    /// let x = MetadataJob::new().set_or_clear_status(Some(Status::default()/* use setters */));
9644    /// let x = MetadataJob::new().set_or_clear_status(None::<Status>);
9645    /// ```
9646    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
9647    where
9648        T: std::convert::Into<crate::model::metadata_job::Status>,
9649    {
9650        self.status = v.map(|x| x.into());
9651        self
9652    }
9653
9654    /// Sets the value of [spec][crate::model::MetadataJob::spec].
9655    ///
9656    /// Note that all the setters affecting `spec` are mutually
9657    /// exclusive.
9658    ///
9659    /// # Example
9660    /// ```ignore,no_run
9661    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9662    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
9663    /// let x = MetadataJob::new().set_spec(Some(
9664    ///     google_cloud_dataplex_v1::model::metadata_job::Spec::ImportSpec(ImportJobSpec::default().into())));
9665    /// ```
9666    pub fn set_spec<
9667        T: std::convert::Into<std::option::Option<crate::model::metadata_job::Spec>>,
9668    >(
9669        mut self,
9670        v: T,
9671    ) -> Self {
9672        self.spec = v.into();
9673        self
9674    }
9675
9676    /// The value of [spec][crate::model::MetadataJob::spec]
9677    /// if it holds a `ImportSpec`, `None` if the field is not set or
9678    /// holds a different branch.
9679    pub fn import_spec(
9680        &self,
9681    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobSpec>> {
9682        #[allow(unreachable_patterns)]
9683        self.spec.as_ref().and_then(|v| match v {
9684            crate::model::metadata_job::Spec::ImportSpec(v) => std::option::Option::Some(v),
9685            _ => std::option::Option::None,
9686        })
9687    }
9688
9689    /// Sets the value of [spec][crate::model::MetadataJob::spec]
9690    /// to hold a `ImportSpec`.
9691    ///
9692    /// Note that all the setters affecting `spec` are
9693    /// mutually exclusive.
9694    ///
9695    /// # Example
9696    /// ```ignore,no_run
9697    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9698    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
9699    /// let x = MetadataJob::new().set_import_spec(ImportJobSpec::default()/* use setters */);
9700    /// assert!(x.import_spec().is_some());
9701    /// assert!(x.export_spec().is_none());
9702    /// ```
9703    pub fn set_import_spec<
9704        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobSpec>>,
9705    >(
9706        mut self,
9707        v: T,
9708    ) -> Self {
9709        self.spec =
9710            std::option::Option::Some(crate::model::metadata_job::Spec::ImportSpec(v.into()));
9711        self
9712    }
9713
9714    /// The value of [spec][crate::model::MetadataJob::spec]
9715    /// if it holds a `ExportSpec`, `None` if the field is not set or
9716    /// holds a different branch.
9717    pub fn export_spec(
9718        &self,
9719    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobSpec>> {
9720        #[allow(unreachable_patterns)]
9721        self.spec.as_ref().and_then(|v| match v {
9722            crate::model::metadata_job::Spec::ExportSpec(v) => std::option::Option::Some(v),
9723            _ => std::option::Option::None,
9724        })
9725    }
9726
9727    /// Sets the value of [spec][crate::model::MetadataJob::spec]
9728    /// to hold a `ExportSpec`.
9729    ///
9730    /// Note that all the setters affecting `spec` are
9731    /// mutually exclusive.
9732    ///
9733    /// # Example
9734    /// ```ignore,no_run
9735    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9736    /// use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
9737    /// let x = MetadataJob::new().set_export_spec(ExportJobSpec::default()/* use setters */);
9738    /// assert!(x.export_spec().is_some());
9739    /// assert!(x.import_spec().is_none());
9740    /// ```
9741    pub fn set_export_spec<
9742        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobSpec>>,
9743    >(
9744        mut self,
9745        v: T,
9746    ) -> Self {
9747        self.spec =
9748            std::option::Option::Some(crate::model::metadata_job::Spec::ExportSpec(v.into()));
9749        self
9750    }
9751
9752    /// Sets the value of [result][crate::model::MetadataJob::result].
9753    ///
9754    /// Note that all the setters affecting `result` are mutually
9755    /// exclusive.
9756    ///
9757    /// # Example
9758    /// ```ignore,no_run
9759    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9760    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9761    /// let x = MetadataJob::new().set_result(Some(
9762    ///     google_cloud_dataplex_v1::model::metadata_job::Result::ImportResult(ImportJobResult::default().into())));
9763    /// ```
9764    pub fn set_result<
9765        T: std::convert::Into<std::option::Option<crate::model::metadata_job::Result>>,
9766    >(
9767        mut self,
9768        v: T,
9769    ) -> Self {
9770        self.result = v.into();
9771        self
9772    }
9773
9774    /// The value of [result][crate::model::MetadataJob::result]
9775    /// if it holds a `ImportResult`, `None` if the field is not set or
9776    /// holds a different branch.
9777    pub fn import_result(
9778        &self,
9779    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobResult>> {
9780        #[allow(unreachable_patterns)]
9781        self.result.as_ref().and_then(|v| match v {
9782            crate::model::metadata_job::Result::ImportResult(v) => std::option::Option::Some(v),
9783            _ => std::option::Option::None,
9784        })
9785    }
9786
9787    /// Sets the value of [result][crate::model::MetadataJob::result]
9788    /// to hold a `ImportResult`.
9789    ///
9790    /// Note that all the setters affecting `result` are
9791    /// mutually exclusive.
9792    ///
9793    /// # Example
9794    /// ```ignore,no_run
9795    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9796    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9797    /// let x = MetadataJob::new().set_import_result(ImportJobResult::default()/* use setters */);
9798    /// assert!(x.import_result().is_some());
9799    /// assert!(x.export_result().is_none());
9800    /// ```
9801    pub fn set_import_result<
9802        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobResult>>,
9803    >(
9804        mut self,
9805        v: T,
9806    ) -> Self {
9807        self.result =
9808            std::option::Option::Some(crate::model::metadata_job::Result::ImportResult(v.into()));
9809        self
9810    }
9811
9812    /// The value of [result][crate::model::MetadataJob::result]
9813    /// if it holds a `ExportResult`, `None` if the field is not set or
9814    /// holds a different branch.
9815    pub fn export_result(
9816        &self,
9817    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobResult>> {
9818        #[allow(unreachable_patterns)]
9819        self.result.as_ref().and_then(|v| match v {
9820            crate::model::metadata_job::Result::ExportResult(v) => std::option::Option::Some(v),
9821            _ => std::option::Option::None,
9822        })
9823    }
9824
9825    /// Sets the value of [result][crate::model::MetadataJob::result]
9826    /// to hold a `ExportResult`.
9827    ///
9828    /// Note that all the setters affecting `result` are
9829    /// mutually exclusive.
9830    ///
9831    /// # Example
9832    /// ```ignore,no_run
9833    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9834    /// use google_cloud_dataplex_v1::model::metadata_job::ExportJobResult;
9835    /// let x = MetadataJob::new().set_export_result(ExportJobResult::default()/* use setters */);
9836    /// assert!(x.export_result().is_some());
9837    /// assert!(x.import_result().is_none());
9838    /// ```
9839    pub fn set_export_result<
9840        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobResult>>,
9841    >(
9842        mut self,
9843        v: T,
9844    ) -> Self {
9845        self.result =
9846            std::option::Option::Some(crate::model::metadata_job::Result::ExportResult(v.into()));
9847        self
9848    }
9849}
9850
9851impl wkt::message::Message for MetadataJob {
9852    fn typename() -> &'static str {
9853        "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob"
9854    }
9855}
9856
9857/// Defines additional types related to [MetadataJob].
9858pub mod metadata_job {
9859    #[allow(unused_imports)]
9860    use super::*;
9861
9862    /// Results from a metadata import job.
9863    #[derive(Clone, Default, PartialEq)]
9864    #[non_exhaustive]
9865    pub struct ImportJobResult {
9866        /// Output only. The total number of entries that were deleted.
9867        pub deleted_entries: i64,
9868
9869        /// Output only. The total number of entries that were updated.
9870        pub updated_entries: i64,
9871
9872        /// Output only. The total number of entries that were created.
9873        pub created_entries: i64,
9874
9875        /// Output only. The total number of entries that were unchanged.
9876        pub unchanged_entries: i64,
9877
9878        /// Output only. The total number of entries that were recreated.
9879        pub recreated_entries: i64,
9880
9881        /// Output only. The time when the status was updated.
9882        pub update_time: std::option::Option<wkt::Timestamp>,
9883
9884        /// Output only. The total number of entry links that were successfully
9885        /// deleted.
9886        pub deleted_entry_links: i64,
9887
9888        /// Output only. The total number of entry links that were successfully
9889        /// created.
9890        pub created_entry_links: i64,
9891
9892        /// Output only. The total number of entry links that were left unchanged.
9893        pub unchanged_entry_links: i64,
9894
9895        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9896    }
9897
9898    impl ImportJobResult {
9899        pub fn new() -> Self {
9900            std::default::Default::default()
9901        }
9902
9903        /// Sets the value of [deleted_entries][crate::model::metadata_job::ImportJobResult::deleted_entries].
9904        ///
9905        /// # Example
9906        /// ```ignore,no_run
9907        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9908        /// let x = ImportJobResult::new().set_deleted_entries(42);
9909        /// ```
9910        pub fn set_deleted_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9911            self.deleted_entries = v.into();
9912            self
9913        }
9914
9915        /// Sets the value of [updated_entries][crate::model::metadata_job::ImportJobResult::updated_entries].
9916        ///
9917        /// # Example
9918        /// ```ignore,no_run
9919        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9920        /// let x = ImportJobResult::new().set_updated_entries(42);
9921        /// ```
9922        pub fn set_updated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9923            self.updated_entries = v.into();
9924            self
9925        }
9926
9927        /// Sets the value of [created_entries][crate::model::metadata_job::ImportJobResult::created_entries].
9928        ///
9929        /// # Example
9930        /// ```ignore,no_run
9931        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9932        /// let x = ImportJobResult::new().set_created_entries(42);
9933        /// ```
9934        pub fn set_created_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9935            self.created_entries = v.into();
9936            self
9937        }
9938
9939        /// Sets the value of [unchanged_entries][crate::model::metadata_job::ImportJobResult::unchanged_entries].
9940        ///
9941        /// # Example
9942        /// ```ignore,no_run
9943        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9944        /// let x = ImportJobResult::new().set_unchanged_entries(42);
9945        /// ```
9946        pub fn set_unchanged_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9947            self.unchanged_entries = v.into();
9948            self
9949        }
9950
9951        /// Sets the value of [recreated_entries][crate::model::metadata_job::ImportJobResult::recreated_entries].
9952        ///
9953        /// # Example
9954        /// ```ignore,no_run
9955        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9956        /// let x = ImportJobResult::new().set_recreated_entries(42);
9957        /// ```
9958        pub fn set_recreated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9959            self.recreated_entries = v.into();
9960            self
9961        }
9962
9963        /// Sets the value of [update_time][crate::model::metadata_job::ImportJobResult::update_time].
9964        ///
9965        /// # Example
9966        /// ```ignore,no_run
9967        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9968        /// use wkt::Timestamp;
9969        /// let x = ImportJobResult::new().set_update_time(Timestamp::default()/* use setters */);
9970        /// ```
9971        pub fn set_update_time<T>(mut self, v: T) -> Self
9972        where
9973            T: std::convert::Into<wkt::Timestamp>,
9974        {
9975            self.update_time = std::option::Option::Some(v.into());
9976            self
9977        }
9978
9979        /// Sets or clears the value of [update_time][crate::model::metadata_job::ImportJobResult::update_time].
9980        ///
9981        /// # Example
9982        /// ```ignore,no_run
9983        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9984        /// use wkt::Timestamp;
9985        /// let x = ImportJobResult::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9986        /// let x = ImportJobResult::new().set_or_clear_update_time(None::<Timestamp>);
9987        /// ```
9988        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9989        where
9990            T: std::convert::Into<wkt::Timestamp>,
9991        {
9992            self.update_time = v.map(|x| x.into());
9993            self
9994        }
9995
9996        /// Sets the value of [deleted_entry_links][crate::model::metadata_job::ImportJobResult::deleted_entry_links].
9997        ///
9998        /// # Example
9999        /// ```ignore,no_run
10000        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
10001        /// let x = ImportJobResult::new().set_deleted_entry_links(42);
10002        /// ```
10003        pub fn set_deleted_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10004            self.deleted_entry_links = v.into();
10005            self
10006        }
10007
10008        /// Sets the value of [created_entry_links][crate::model::metadata_job::ImportJobResult::created_entry_links].
10009        ///
10010        /// # Example
10011        /// ```ignore,no_run
10012        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
10013        /// let x = ImportJobResult::new().set_created_entry_links(42);
10014        /// ```
10015        pub fn set_created_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10016            self.created_entry_links = v.into();
10017            self
10018        }
10019
10020        /// Sets the value of [unchanged_entry_links][crate::model::metadata_job::ImportJobResult::unchanged_entry_links].
10021        ///
10022        /// # Example
10023        /// ```ignore,no_run
10024        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
10025        /// let x = ImportJobResult::new().set_unchanged_entry_links(42);
10026        /// ```
10027        pub fn set_unchanged_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10028            self.unchanged_entry_links = v.into();
10029            self
10030        }
10031    }
10032
10033    impl wkt::message::Message for ImportJobResult {
10034        fn typename() -> &'static str {
10035            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobResult"
10036        }
10037    }
10038
10039    /// Summary results from a metadata export job. The results are a snapshot of
10040    /// the metadata at the time when the job was created. The exported entries are
10041    /// saved to a Cloud Storage bucket.
10042    #[derive(Clone, Default, PartialEq)]
10043    #[non_exhaustive]
10044    pub struct ExportJobResult {
10045        /// Output only. The number of entries that were exported.
10046        pub exported_entries: i64,
10047
10048        /// Output only. The error message if the metadata export job failed.
10049        pub error_message: std::string::String,
10050
10051        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10052    }
10053
10054    impl ExportJobResult {
10055        pub fn new() -> Self {
10056            std::default::Default::default()
10057        }
10058
10059        /// Sets the value of [exported_entries][crate::model::metadata_job::ExportJobResult::exported_entries].
10060        ///
10061        /// # Example
10062        /// ```ignore,no_run
10063        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobResult;
10064        /// let x = ExportJobResult::new().set_exported_entries(42);
10065        /// ```
10066        pub fn set_exported_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10067            self.exported_entries = v.into();
10068            self
10069        }
10070
10071        /// Sets the value of [error_message][crate::model::metadata_job::ExportJobResult::error_message].
10072        ///
10073        /// # Example
10074        /// ```ignore,no_run
10075        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobResult;
10076        /// let x = ExportJobResult::new().set_error_message("example");
10077        /// ```
10078        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
10079            mut self,
10080            v: T,
10081        ) -> Self {
10082            self.error_message = v.into();
10083            self
10084        }
10085    }
10086
10087    impl wkt::message::Message for ExportJobResult {
10088        fn typename() -> &'static str {
10089            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobResult"
10090        }
10091    }
10092
10093    /// Job specification for a metadata import job.
10094    ///
10095    /// You can run the following kinds of metadata import jobs:
10096    ///
10097    /// * Full sync of entries with incremental import of their aspects.
10098    ///   Supported for custom entries.
10099    /// * Incremental import of aspects only. Supported for aspects that belong
10100    ///   to custom entries and system entries. For custom entries, you can modify
10101    ///   both optional aspects and required aspects. For system entries, you can
10102    ///   modify optional aspects.
10103    #[derive(Clone, Default, PartialEq)]
10104    #[non_exhaustive]
10105    pub struct ImportJobSpec {
10106        /// Optional. The URI of a Cloud Storage bucket or folder (beginning with
10107        /// `gs://` and ending with `/`) that contains the metadata import files for
10108        /// this job.
10109        ///
10110        /// A metadata import file defines the values to set for each of the entries
10111        /// and aspects in a metadata import job. For more information about how to
10112        /// create a metadata import file and the file requirements, see [Metadata
10113        /// import
10114        /// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).
10115        ///
10116        /// You can provide multiple metadata import files in the same metadata job.
10117        /// The bucket or folder must contain at least one metadata import file, in
10118        /// JSON Lines format (either `.json` or `.jsonl` file extension).
10119        ///
10120        /// In `FULL` entry sync mode, don't save the metadata import file in a
10121        /// folder named `SOURCE_STORAGE_URI/deletions/`.
10122        ///
10123        /// **Caution**: If the metadata import file contains no data, all entries
10124        /// and aspects that belong to the job's scope are deleted.
10125        pub source_storage_uri: std::string::String,
10126
10127        /// Optional. The time when the process that created the metadata import
10128        /// files began.
10129        pub source_create_time: std::option::Option<wkt::Timestamp>,
10130
10131        /// Required. A boundary on the scope of impact that the metadata import job
10132        /// can have.
10133        pub scope: std::option::Option<crate::model::metadata_job::import_job_spec::ImportJobScope>,
10134
10135        /// Required. The sync mode for entries.
10136        pub entry_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
10137
10138        /// Required. The sync mode for aspects.
10139        pub aspect_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
10140
10141        /// Optional. The level of logs to write to Cloud Logging for this job.
10142        ///
10143        /// Debug-level logs provide highly-detailed information for
10144        /// troubleshooting, but their increased verbosity could incur [additional
10145        /// costs](https://cloud.google.com/stackdriver/pricing) that might not be
10146        /// merited for all jobs.
10147        ///
10148        /// If unspecified, defaults to `INFO`.
10149        pub log_level: crate::model::metadata_job::import_job_spec::LogLevel,
10150
10151        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10152    }
10153
10154    impl ImportJobSpec {
10155        pub fn new() -> Self {
10156            std::default::Default::default()
10157        }
10158
10159        /// Sets the value of [source_storage_uri][crate::model::metadata_job::ImportJobSpec::source_storage_uri].
10160        ///
10161        /// # Example
10162        /// ```ignore,no_run
10163        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10164        /// let x = ImportJobSpec::new().set_source_storage_uri("example");
10165        /// ```
10166        pub fn set_source_storage_uri<T: std::convert::Into<std::string::String>>(
10167            mut self,
10168            v: T,
10169        ) -> Self {
10170            self.source_storage_uri = v.into();
10171            self
10172        }
10173
10174        /// Sets the value of [source_create_time][crate::model::metadata_job::ImportJobSpec::source_create_time].
10175        ///
10176        /// # Example
10177        /// ```ignore,no_run
10178        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10179        /// use wkt::Timestamp;
10180        /// let x = ImportJobSpec::new().set_source_create_time(Timestamp::default()/* use setters */);
10181        /// ```
10182        pub fn set_source_create_time<T>(mut self, v: T) -> Self
10183        where
10184            T: std::convert::Into<wkt::Timestamp>,
10185        {
10186            self.source_create_time = std::option::Option::Some(v.into());
10187            self
10188        }
10189
10190        /// Sets or clears the value of [source_create_time][crate::model::metadata_job::ImportJobSpec::source_create_time].
10191        ///
10192        /// # Example
10193        /// ```ignore,no_run
10194        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10195        /// use wkt::Timestamp;
10196        /// let x = ImportJobSpec::new().set_or_clear_source_create_time(Some(Timestamp::default()/* use setters */));
10197        /// let x = ImportJobSpec::new().set_or_clear_source_create_time(None::<Timestamp>);
10198        /// ```
10199        pub fn set_or_clear_source_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10200        where
10201            T: std::convert::Into<wkt::Timestamp>,
10202        {
10203            self.source_create_time = v.map(|x| x.into());
10204            self
10205        }
10206
10207        /// Sets the value of [scope][crate::model::metadata_job::ImportJobSpec::scope].
10208        ///
10209        /// # Example
10210        /// ```ignore,no_run
10211        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10212        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10213        /// let x = ImportJobSpec::new().set_scope(ImportJobScope::default()/* use setters */);
10214        /// ```
10215        pub fn set_scope<T>(mut self, v: T) -> Self
10216        where
10217            T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
10218        {
10219            self.scope = std::option::Option::Some(v.into());
10220            self
10221        }
10222
10223        /// Sets or clears the value of [scope][crate::model::metadata_job::ImportJobSpec::scope].
10224        ///
10225        /// # Example
10226        /// ```ignore,no_run
10227        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10228        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10229        /// let x = ImportJobSpec::new().set_or_clear_scope(Some(ImportJobScope::default()/* use setters */));
10230        /// let x = ImportJobSpec::new().set_or_clear_scope(None::<ImportJobScope>);
10231        /// ```
10232        pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
10233        where
10234            T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
10235        {
10236            self.scope = v.map(|x| x.into());
10237            self
10238        }
10239
10240        /// Sets the value of [entry_sync_mode][crate::model::metadata_job::ImportJobSpec::entry_sync_mode].
10241        ///
10242        /// # Example
10243        /// ```ignore,no_run
10244        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10245        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::SyncMode;
10246        /// let x0 = ImportJobSpec::new().set_entry_sync_mode(SyncMode::Full);
10247        /// let x1 = ImportJobSpec::new().set_entry_sync_mode(SyncMode::Incremental);
10248        /// let x2 = ImportJobSpec::new().set_entry_sync_mode(SyncMode::None);
10249        /// ```
10250        pub fn set_entry_sync_mode<
10251            T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
10252        >(
10253            mut self,
10254            v: T,
10255        ) -> Self {
10256            self.entry_sync_mode = v.into();
10257            self
10258        }
10259
10260        /// Sets the value of [aspect_sync_mode][crate::model::metadata_job::ImportJobSpec::aspect_sync_mode].
10261        ///
10262        /// # Example
10263        /// ```ignore,no_run
10264        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10265        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::SyncMode;
10266        /// let x0 = ImportJobSpec::new().set_aspect_sync_mode(SyncMode::Full);
10267        /// let x1 = ImportJobSpec::new().set_aspect_sync_mode(SyncMode::Incremental);
10268        /// let x2 = ImportJobSpec::new().set_aspect_sync_mode(SyncMode::None);
10269        /// ```
10270        pub fn set_aspect_sync_mode<
10271            T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
10272        >(
10273            mut self,
10274            v: T,
10275        ) -> Self {
10276            self.aspect_sync_mode = v.into();
10277            self
10278        }
10279
10280        /// Sets the value of [log_level][crate::model::metadata_job::ImportJobSpec::log_level].
10281        ///
10282        /// # Example
10283        /// ```ignore,no_run
10284        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10285        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::LogLevel;
10286        /// let x0 = ImportJobSpec::new().set_log_level(LogLevel::Debug);
10287        /// let x1 = ImportJobSpec::new().set_log_level(LogLevel::Info);
10288        /// ```
10289        pub fn set_log_level<
10290            T: std::convert::Into<crate::model::metadata_job::import_job_spec::LogLevel>,
10291        >(
10292            mut self,
10293            v: T,
10294        ) -> Self {
10295            self.log_level = v.into();
10296            self
10297        }
10298    }
10299
10300    impl wkt::message::Message for ImportJobSpec {
10301        fn typename() -> &'static str {
10302            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec"
10303        }
10304    }
10305
10306    /// Defines additional types related to [ImportJobSpec].
10307    pub mod import_job_spec {
10308        #[allow(unused_imports)]
10309        use super::*;
10310
10311        /// A boundary on the scope of impact that the metadata import job can have.
10312        #[derive(Clone, Default, PartialEq)]
10313        #[non_exhaustive]
10314        pub struct ImportJobScope {
10315            /// Required. The entry groups that are in scope for the import job,
10316            /// specified as relative resource names in the format
10317            /// `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`.
10318            /// Only entries and aspects that belong to the specified entry groups are
10319            /// affected by the job.
10320            ///
10321            /// The entry groups and the job must be in the same location.
10322            pub entry_groups: std::vec::Vec<std::string::String>,
10323
10324            /// Required. The entry types that are in scope for the import job,
10325            /// specified as relative resource names in the format
10326            /// `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`.
10327            /// The job modifies only the entries and aspects that belong to these
10328            /// entry types.
10329            ///
10330            /// If the metadata import file attempts to modify an entry whose type
10331            /// isn't included in this list, the import job is halted before modifying
10332            /// any entries or aspects.
10333            ///
10334            /// The location of an entry type must either match the location of the
10335            /// job, or the entry type must be global.
10336            pub entry_types: std::vec::Vec<std::string::String>,
10337
10338            /// Optional. The aspect types that are in scope for the import job,
10339            /// specified as relative resource names in the format
10340            /// `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
10341            /// The job modifies only the aspects that belong to these aspect types.
10342            ///
10343            /// This field is required when creating an aspect-only import job.
10344            ///
10345            /// If the metadata import file attempts to modify an aspect whose type
10346            /// isn't included in this list, the import job is halted before modifying
10347            /// any entries or aspects.
10348            ///
10349            /// The location of an aspect type must either match the location of the
10350            /// job, or the aspect type must be global.
10351            pub aspect_types: std::vec::Vec<std::string::String>,
10352
10353            /// Optional. The glossaries that are in scope for the import job,
10354            /// specified as relative resource names in the format
10355            /// `projects/{project_number_or_id}/locations/{location_id}/glossaries/{glossary_id}`.
10356            ///
10357            /// While importing Business Glossary entries, the user must
10358            /// provide glossaries. While importing entries, the user does not have to
10359            /// provide glossaries. If the metadata import file attempts to modify
10360            /// Business Glossary entries whose glossary isn't included in this list,
10361            /// the import job will skip those entries.
10362            ///
10363            /// The location of a glossary must either match the location of the
10364            /// job, or the glossary must be global.
10365            pub glossaries: std::vec::Vec<std::string::String>,
10366
10367            /// Optional. The entry link types that are in scope for the import job,
10368            /// specified as relative resource names in the format
10369            /// `projects/{project_number_or_id}/locations/{location_id}/entryLinkTypes/{entry_link_type_id}`.
10370            /// The job modifies only the entryLinks that belong to these entry link
10371            /// types.
10372            ///
10373            /// If the metadata import file attempts to create or delete an entry link
10374            /// whose entry link type isn't included in this list, the import job will
10375            /// skip those entry links.
10376            pub entry_link_types: std::vec::Vec<std::string::String>,
10377
10378            /// Optional. Defines the scope of entries that can be referenced in the
10379            /// entry links.
10380            ///
10381            /// Currently, projects are supported as valid scopes.
10382            /// Format: `projects/{project_number_or_id}`
10383            ///
10384            /// If the metadata import file attempts to create an entry link
10385            /// which references an entry that is not in the scope, the import job will
10386            /// skip that entry link.
10387            pub referenced_entry_scopes: std::vec::Vec<std::string::String>,
10388
10389            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10390        }
10391
10392        impl ImportJobScope {
10393            pub fn new() -> Self {
10394                std::default::Default::default()
10395            }
10396
10397            /// Sets the value of [entry_groups][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_groups].
10398            ///
10399            /// # Example
10400            /// ```ignore,no_run
10401            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10402            /// let x = ImportJobScope::new().set_entry_groups(["a", "b", "c"]);
10403            /// ```
10404            pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
10405            where
10406                T: std::iter::IntoIterator<Item = V>,
10407                V: std::convert::Into<std::string::String>,
10408            {
10409                use std::iter::Iterator;
10410                self.entry_groups = v.into_iter().map(|i| i.into()).collect();
10411                self
10412            }
10413
10414            /// Sets the value of [entry_types][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_types].
10415            ///
10416            /// # Example
10417            /// ```ignore,no_run
10418            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10419            /// let x = ImportJobScope::new().set_entry_types(["a", "b", "c"]);
10420            /// ```
10421            pub fn set_entry_types<T, V>(mut self, v: T) -> Self
10422            where
10423                T: std::iter::IntoIterator<Item = V>,
10424                V: std::convert::Into<std::string::String>,
10425            {
10426                use std::iter::Iterator;
10427                self.entry_types = v.into_iter().map(|i| i.into()).collect();
10428                self
10429            }
10430
10431            /// Sets the value of [aspect_types][crate::model::metadata_job::import_job_spec::ImportJobScope::aspect_types].
10432            ///
10433            /// # Example
10434            /// ```ignore,no_run
10435            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10436            /// let x = ImportJobScope::new().set_aspect_types(["a", "b", "c"]);
10437            /// ```
10438            pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
10439            where
10440                T: std::iter::IntoIterator<Item = V>,
10441                V: std::convert::Into<std::string::String>,
10442            {
10443                use std::iter::Iterator;
10444                self.aspect_types = v.into_iter().map(|i| i.into()).collect();
10445                self
10446            }
10447
10448            /// Sets the value of [glossaries][crate::model::metadata_job::import_job_spec::ImportJobScope::glossaries].
10449            ///
10450            /// # Example
10451            /// ```ignore,no_run
10452            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10453            /// let x = ImportJobScope::new().set_glossaries(["a", "b", "c"]);
10454            /// ```
10455            pub fn set_glossaries<T, V>(mut self, v: T) -> Self
10456            where
10457                T: std::iter::IntoIterator<Item = V>,
10458                V: std::convert::Into<std::string::String>,
10459            {
10460                use std::iter::Iterator;
10461                self.glossaries = v.into_iter().map(|i| i.into()).collect();
10462                self
10463            }
10464
10465            /// Sets the value of [entry_link_types][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_link_types].
10466            ///
10467            /// # Example
10468            /// ```ignore,no_run
10469            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10470            /// let x = ImportJobScope::new().set_entry_link_types(["a", "b", "c"]);
10471            /// ```
10472            pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
10473            where
10474                T: std::iter::IntoIterator<Item = V>,
10475                V: std::convert::Into<std::string::String>,
10476            {
10477                use std::iter::Iterator;
10478                self.entry_link_types = v.into_iter().map(|i| i.into()).collect();
10479                self
10480            }
10481
10482            /// Sets the value of [referenced_entry_scopes][crate::model::metadata_job::import_job_spec::ImportJobScope::referenced_entry_scopes].
10483            ///
10484            /// # Example
10485            /// ```ignore,no_run
10486            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10487            /// let x = ImportJobScope::new().set_referenced_entry_scopes(["a", "b", "c"]);
10488            /// ```
10489            pub fn set_referenced_entry_scopes<T, V>(mut self, v: T) -> Self
10490            where
10491                T: std::iter::IntoIterator<Item = V>,
10492                V: std::convert::Into<std::string::String>,
10493            {
10494                use std::iter::Iterator;
10495                self.referenced_entry_scopes = v.into_iter().map(|i| i.into()).collect();
10496                self
10497            }
10498        }
10499
10500        impl wkt::message::Message for ImportJobScope {
10501            fn typename() -> &'static str {
10502                "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope"
10503            }
10504        }
10505
10506        /// Specifies how the entries and aspects in a metadata import job are
10507        /// updated. For more information, see [Sync
10508        /// mode](https://cloud.google.com/dataplex/docs/import-metadata#sync-mode).
10509        ///
10510        /// # Working with unknown values
10511        ///
10512        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10513        /// additional enum variants at any time. Adding new variants is not considered
10514        /// a breaking change. Applications should write their code in anticipation of:
10515        ///
10516        /// - New values appearing in future releases of the client library, **and**
10517        /// - New values received dynamically, without application changes.
10518        ///
10519        /// Please consult the [Working with enums] section in the user guide for some
10520        /// guidelines.
10521        ///
10522        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10523        #[derive(Clone, Debug, PartialEq)]
10524        #[non_exhaustive]
10525        pub enum SyncMode {
10526            /// Sync mode unspecified.
10527            Unspecified,
10528            /// All resources in the job's scope are modified. If a resource exists in
10529            /// Dataplex Universal Catalog but isn't included in the metadata import
10530            /// file, the resource is deleted when you run the metadata job. Use this
10531            /// mode to perform a full sync of the set of entries in the job scope.
10532            ///
10533            /// This sync mode is supported for entries.
10534            Full,
10535            /// Only the resources that are explicitly included in the
10536            /// metadata import file are modified. Use this mode to modify a subset of
10537            /// resources while leaving unreferenced resources unchanged.
10538            ///
10539            /// This sync mode is supported for aspects.
10540            Incremental,
10541            /// If entry sync mode is `NONE`, then aspects are modified according
10542            /// to the aspect sync mode. Other metadata that belongs to entries in the
10543            /// job's scope isn't modified.
10544            ///
10545            /// This sync mode is supported for entries.
10546            None,
10547            /// If set, the enum was initialized with an unknown value.
10548            ///
10549            /// Applications can examine the value using [SyncMode::value] or
10550            /// [SyncMode::name].
10551            UnknownValue(sync_mode::UnknownValue),
10552        }
10553
10554        #[doc(hidden)]
10555        pub mod sync_mode {
10556            #[allow(unused_imports)]
10557            use super::*;
10558            #[derive(Clone, Debug, PartialEq)]
10559            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10560        }
10561
10562        impl SyncMode {
10563            /// Gets the enum value.
10564            ///
10565            /// Returns `None` if the enum contains an unknown value deserialized from
10566            /// the string representation of enums.
10567            pub fn value(&self) -> std::option::Option<i32> {
10568                match self {
10569                    Self::Unspecified => std::option::Option::Some(0),
10570                    Self::Full => std::option::Option::Some(1),
10571                    Self::Incremental => std::option::Option::Some(2),
10572                    Self::None => std::option::Option::Some(3),
10573                    Self::UnknownValue(u) => u.0.value(),
10574                }
10575            }
10576
10577            /// Gets the enum value as a string.
10578            ///
10579            /// Returns `None` if the enum contains an unknown value deserialized from
10580            /// the integer representation of enums.
10581            pub fn name(&self) -> std::option::Option<&str> {
10582                match self {
10583                    Self::Unspecified => std::option::Option::Some("SYNC_MODE_UNSPECIFIED"),
10584                    Self::Full => std::option::Option::Some("FULL"),
10585                    Self::Incremental => std::option::Option::Some("INCREMENTAL"),
10586                    Self::None => std::option::Option::Some("NONE"),
10587                    Self::UnknownValue(u) => u.0.name(),
10588                }
10589            }
10590        }
10591
10592        impl std::default::Default for SyncMode {
10593            fn default() -> Self {
10594                use std::convert::From;
10595                Self::from(0)
10596            }
10597        }
10598
10599        impl std::fmt::Display for SyncMode {
10600            fn fmt(
10601                &self,
10602                f: &mut std::fmt::Formatter<'_>,
10603            ) -> std::result::Result<(), std::fmt::Error> {
10604                wkt::internal::display_enum(f, self.name(), self.value())
10605            }
10606        }
10607
10608        impl std::convert::From<i32> for SyncMode {
10609            fn from(value: i32) -> Self {
10610                match value {
10611                    0 => Self::Unspecified,
10612                    1 => Self::Full,
10613                    2 => Self::Incremental,
10614                    3 => Self::None,
10615                    _ => Self::UnknownValue(sync_mode::UnknownValue(
10616                        wkt::internal::UnknownEnumValue::Integer(value),
10617                    )),
10618                }
10619            }
10620        }
10621
10622        impl std::convert::From<&str> for SyncMode {
10623            fn from(value: &str) -> Self {
10624                use std::string::ToString;
10625                match value {
10626                    "SYNC_MODE_UNSPECIFIED" => Self::Unspecified,
10627                    "FULL" => Self::Full,
10628                    "INCREMENTAL" => Self::Incremental,
10629                    "NONE" => Self::None,
10630                    _ => Self::UnknownValue(sync_mode::UnknownValue(
10631                        wkt::internal::UnknownEnumValue::String(value.to_string()),
10632                    )),
10633                }
10634            }
10635        }
10636
10637        impl serde::ser::Serialize for SyncMode {
10638            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10639            where
10640                S: serde::Serializer,
10641            {
10642                match self {
10643                    Self::Unspecified => serializer.serialize_i32(0),
10644                    Self::Full => serializer.serialize_i32(1),
10645                    Self::Incremental => serializer.serialize_i32(2),
10646                    Self::None => serializer.serialize_i32(3),
10647                    Self::UnknownValue(u) => u.0.serialize(serializer),
10648                }
10649            }
10650        }
10651
10652        impl<'de> serde::de::Deserialize<'de> for SyncMode {
10653            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10654            where
10655                D: serde::Deserializer<'de>,
10656            {
10657                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SyncMode>::new(
10658                    ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode",
10659                ))
10660            }
10661        }
10662
10663        /// The level of logs to write to Cloud Logging for this job.
10664        ///
10665        /// # Working with unknown values
10666        ///
10667        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10668        /// additional enum variants at any time. Adding new variants is not considered
10669        /// a breaking change. Applications should write their code in anticipation of:
10670        ///
10671        /// - New values appearing in future releases of the client library, **and**
10672        /// - New values received dynamically, without application changes.
10673        ///
10674        /// Please consult the [Working with enums] section in the user guide for some
10675        /// guidelines.
10676        ///
10677        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10678        #[derive(Clone, Debug, PartialEq)]
10679        #[non_exhaustive]
10680        pub enum LogLevel {
10681            /// Log level unspecified.
10682            Unspecified,
10683            /// Debug-level logging. Captures detailed logs for each import item. Use
10684            /// debug-level logging to troubleshoot issues with specific import items.
10685            /// For example, use debug-level logging to identify resources that are
10686            /// missing from the job scope, entries or aspects that don't conform to
10687            /// the associated entry type or aspect type, or other misconfigurations
10688            /// with the metadata import file.
10689            ///
10690            /// Depending on the size of your metadata job and the number of logs that
10691            /// are generated, debug-level logging might incur
10692            /// [additional costs](https://cloud.google.com/stackdriver/pricing).
10693            Debug,
10694            /// Info-level logging. Captures logs at the overall job level. Includes
10695            /// aggregate logs about import items, but doesn't specify which import
10696            /// item has an error.
10697            Info,
10698            /// If set, the enum was initialized with an unknown value.
10699            ///
10700            /// Applications can examine the value using [LogLevel::value] or
10701            /// [LogLevel::name].
10702            UnknownValue(log_level::UnknownValue),
10703        }
10704
10705        #[doc(hidden)]
10706        pub mod log_level {
10707            #[allow(unused_imports)]
10708            use super::*;
10709            #[derive(Clone, Debug, PartialEq)]
10710            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10711        }
10712
10713        impl LogLevel {
10714            /// Gets the enum value.
10715            ///
10716            /// Returns `None` if the enum contains an unknown value deserialized from
10717            /// the string representation of enums.
10718            pub fn value(&self) -> std::option::Option<i32> {
10719                match self {
10720                    Self::Unspecified => std::option::Option::Some(0),
10721                    Self::Debug => std::option::Option::Some(1),
10722                    Self::Info => std::option::Option::Some(2),
10723                    Self::UnknownValue(u) => u.0.value(),
10724                }
10725            }
10726
10727            /// Gets the enum value as a string.
10728            ///
10729            /// Returns `None` if the enum contains an unknown value deserialized from
10730            /// the integer representation of enums.
10731            pub fn name(&self) -> std::option::Option<&str> {
10732                match self {
10733                    Self::Unspecified => std::option::Option::Some("LOG_LEVEL_UNSPECIFIED"),
10734                    Self::Debug => std::option::Option::Some("DEBUG"),
10735                    Self::Info => std::option::Option::Some("INFO"),
10736                    Self::UnknownValue(u) => u.0.name(),
10737                }
10738            }
10739        }
10740
10741        impl std::default::Default for LogLevel {
10742            fn default() -> Self {
10743                use std::convert::From;
10744                Self::from(0)
10745            }
10746        }
10747
10748        impl std::fmt::Display for LogLevel {
10749            fn fmt(
10750                &self,
10751                f: &mut std::fmt::Formatter<'_>,
10752            ) -> std::result::Result<(), std::fmt::Error> {
10753                wkt::internal::display_enum(f, self.name(), self.value())
10754            }
10755        }
10756
10757        impl std::convert::From<i32> for LogLevel {
10758            fn from(value: i32) -> Self {
10759                match value {
10760                    0 => Self::Unspecified,
10761                    1 => Self::Debug,
10762                    2 => Self::Info,
10763                    _ => Self::UnknownValue(log_level::UnknownValue(
10764                        wkt::internal::UnknownEnumValue::Integer(value),
10765                    )),
10766                }
10767            }
10768        }
10769
10770        impl std::convert::From<&str> for LogLevel {
10771            fn from(value: &str) -> Self {
10772                use std::string::ToString;
10773                match value {
10774                    "LOG_LEVEL_UNSPECIFIED" => Self::Unspecified,
10775                    "DEBUG" => Self::Debug,
10776                    "INFO" => Self::Info,
10777                    _ => Self::UnknownValue(log_level::UnknownValue(
10778                        wkt::internal::UnknownEnumValue::String(value.to_string()),
10779                    )),
10780                }
10781            }
10782        }
10783
10784        impl serde::ser::Serialize for LogLevel {
10785            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10786            where
10787                S: serde::Serializer,
10788            {
10789                match self {
10790                    Self::Unspecified => serializer.serialize_i32(0),
10791                    Self::Debug => serializer.serialize_i32(1),
10792                    Self::Info => serializer.serialize_i32(2),
10793                    Self::UnknownValue(u) => u.0.serialize(serializer),
10794                }
10795            }
10796        }
10797
10798        impl<'de> serde::de::Deserialize<'de> for LogLevel {
10799            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10800            where
10801                D: serde::Deserializer<'de>,
10802            {
10803                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LogLevel>::new(
10804                    ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel",
10805                ))
10806            }
10807        }
10808    }
10809
10810    /// Job specification for a metadata export job.
10811    #[derive(Clone, Default, PartialEq)]
10812    #[non_exhaustive]
10813    pub struct ExportJobSpec {
10814        /// Required. The scope of the export job.
10815        pub scope: std::option::Option<crate::model::metadata_job::export_job_spec::ExportJobScope>,
10816
10817        /// Required. The root path of the Cloud Storage bucket to export the
10818        /// metadata to, in the format `gs://{bucket}/`. You can optionally specify a
10819        /// custom prefix after the bucket name, in the format
10820        /// `gs://{bucket}/{prefix}/`. The maximum length of the custom prefix is 128
10821        /// characters. Dataplex Universal Catalog constructs the object path for the
10822        /// exported files by using the bucket name and prefix that you provide,
10823        /// followed by a system-generated path.
10824        ///
10825        /// The bucket must be in the same VPC Service Controls perimeter as the job.
10826        pub output_path: std::string::String,
10827
10828        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10829    }
10830
10831    impl ExportJobSpec {
10832        pub fn new() -> Self {
10833            std::default::Default::default()
10834        }
10835
10836        /// Sets the value of [scope][crate::model::metadata_job::ExportJobSpec::scope].
10837        ///
10838        /// # Example
10839        /// ```ignore,no_run
10840        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
10841        /// use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10842        /// let x = ExportJobSpec::new().set_scope(ExportJobScope::default()/* use setters */);
10843        /// ```
10844        pub fn set_scope<T>(mut self, v: T) -> Self
10845        where
10846            T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
10847        {
10848            self.scope = std::option::Option::Some(v.into());
10849            self
10850        }
10851
10852        /// Sets or clears the value of [scope][crate::model::metadata_job::ExportJobSpec::scope].
10853        ///
10854        /// # Example
10855        /// ```ignore,no_run
10856        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
10857        /// use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10858        /// let x = ExportJobSpec::new().set_or_clear_scope(Some(ExportJobScope::default()/* use setters */));
10859        /// let x = ExportJobSpec::new().set_or_clear_scope(None::<ExportJobScope>);
10860        /// ```
10861        pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
10862        where
10863            T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
10864        {
10865            self.scope = v.map(|x| x.into());
10866            self
10867        }
10868
10869        /// Sets the value of [output_path][crate::model::metadata_job::ExportJobSpec::output_path].
10870        ///
10871        /// # Example
10872        /// ```ignore,no_run
10873        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
10874        /// let x = ExportJobSpec::new().set_output_path("example");
10875        /// ```
10876        pub fn set_output_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10877            self.output_path = v.into();
10878            self
10879        }
10880    }
10881
10882    impl wkt::message::Message for ExportJobSpec {
10883        fn typename() -> &'static str {
10884            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec"
10885        }
10886    }
10887
10888    /// Defines additional types related to [ExportJobSpec].
10889    pub mod export_job_spec {
10890        #[allow(unused_imports)]
10891        use super::*;
10892
10893        /// The scope of the export job.
10894        #[derive(Clone, Default, PartialEq)]
10895        #[non_exhaustive]
10896        pub struct ExportJobScope {
10897            /// Whether the metadata export job is an organization-level export job.
10898            ///
10899            /// - If `true`, the job exports the entries from the same organization and
10900            ///   VPC Service Controls perimeter as the job. The project that the job
10901            ///   belongs to determines the VPC Service Controls perimeter. If you set
10902            ///   the job scope to be at the organization level, then don't provide a
10903            ///   list of projects or entry groups.
10904            /// - If `false`, you must specify a list of projects or a list of entry
10905            ///   groups whose entries you want to export.
10906            ///
10907            /// The default is `false`.
10908            pub organization_level: bool,
10909
10910            /// The projects whose metadata you want to export, in the format
10911            /// `projects/{project_id_or_number}`. Only the entries from
10912            /// the specified projects are exported.
10913            ///
10914            /// The projects must be in the same organization and VPC Service Controls
10915            /// perimeter as the job.
10916            ///
10917            /// If you set the job scope to be a list of projects, then set the
10918            /// organization-level export flag to false and don't provide a list of
10919            /// entry groups.
10920            pub projects: std::vec::Vec<std::string::String>,
10921
10922            /// The entry groups whose metadata you want to export, in the format
10923            /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
10924            /// Only the entries in the specified entry groups are exported.
10925            ///
10926            /// The entry groups must be in the same location and the same VPC Service
10927            /// Controls perimeter as the job.
10928            ///
10929            /// If you set the job scope to be a list of entry groups, then set the
10930            /// organization-level export flag to false and don't provide a list of
10931            /// projects.
10932            pub entry_groups: std::vec::Vec<std::string::String>,
10933
10934            /// The entry types that are in scope for the export job, specified as
10935            /// relative resource names in the format
10936            /// `projects/{project_id_or_number}/locations/{location}/entryTypes/{entry_type_id}`.
10937            /// Only entries that belong to the specified entry types are affected by
10938            /// the job.
10939            pub entry_types: std::vec::Vec<std::string::String>,
10940
10941            /// The aspect types that are in scope for the export job, specified as
10942            /// relative resource names in the format
10943            /// `projects/{project_id_or_number}/locations/{location}/aspectTypes/{aspect_type_id}`.
10944            /// Only aspects that belong to the specified aspect types are affected by
10945            /// the job.
10946            pub aspect_types: std::vec::Vec<std::string::String>,
10947
10948            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10949        }
10950
10951        impl ExportJobScope {
10952            pub fn new() -> Self {
10953                std::default::Default::default()
10954            }
10955
10956            /// Sets the value of [organization_level][crate::model::metadata_job::export_job_spec::ExportJobScope::organization_level].
10957            ///
10958            /// # Example
10959            /// ```ignore,no_run
10960            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10961            /// let x = ExportJobScope::new().set_organization_level(true);
10962            /// ```
10963            pub fn set_organization_level<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10964                self.organization_level = v.into();
10965                self
10966            }
10967
10968            /// Sets the value of [projects][crate::model::metadata_job::export_job_spec::ExportJobScope::projects].
10969            ///
10970            /// # Example
10971            /// ```ignore,no_run
10972            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10973            /// let x = ExportJobScope::new().set_projects(["a", "b", "c"]);
10974            /// ```
10975            pub fn set_projects<T, V>(mut self, v: T) -> Self
10976            where
10977                T: std::iter::IntoIterator<Item = V>,
10978                V: std::convert::Into<std::string::String>,
10979            {
10980                use std::iter::Iterator;
10981                self.projects = v.into_iter().map(|i| i.into()).collect();
10982                self
10983            }
10984
10985            /// Sets the value of [entry_groups][crate::model::metadata_job::export_job_spec::ExportJobScope::entry_groups].
10986            ///
10987            /// # Example
10988            /// ```ignore,no_run
10989            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10990            /// let x = ExportJobScope::new().set_entry_groups(["a", "b", "c"]);
10991            /// ```
10992            pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
10993            where
10994                T: std::iter::IntoIterator<Item = V>,
10995                V: std::convert::Into<std::string::String>,
10996            {
10997                use std::iter::Iterator;
10998                self.entry_groups = v.into_iter().map(|i| i.into()).collect();
10999                self
11000            }
11001
11002            /// Sets the value of [entry_types][crate::model::metadata_job::export_job_spec::ExportJobScope::entry_types].
11003            ///
11004            /// # Example
11005            /// ```ignore,no_run
11006            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
11007            /// let x = ExportJobScope::new().set_entry_types(["a", "b", "c"]);
11008            /// ```
11009            pub fn set_entry_types<T, V>(mut self, v: T) -> Self
11010            where
11011                T: std::iter::IntoIterator<Item = V>,
11012                V: std::convert::Into<std::string::String>,
11013            {
11014                use std::iter::Iterator;
11015                self.entry_types = v.into_iter().map(|i| i.into()).collect();
11016                self
11017            }
11018
11019            /// Sets the value of [aspect_types][crate::model::metadata_job::export_job_spec::ExportJobScope::aspect_types].
11020            ///
11021            /// # Example
11022            /// ```ignore,no_run
11023            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
11024            /// let x = ExportJobScope::new().set_aspect_types(["a", "b", "c"]);
11025            /// ```
11026            pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
11027            where
11028                T: std::iter::IntoIterator<Item = V>,
11029                V: std::convert::Into<std::string::String>,
11030            {
11031                use std::iter::Iterator;
11032                self.aspect_types = v.into_iter().map(|i| i.into()).collect();
11033                self
11034            }
11035        }
11036
11037        impl wkt::message::Message for ExportJobScope {
11038            fn typename() -> &'static str {
11039                "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScope"
11040            }
11041        }
11042    }
11043
11044    /// Metadata job status.
11045    #[derive(Clone, Default, PartialEq)]
11046    #[non_exhaustive]
11047    pub struct Status {
11048        /// Output only. State of the metadata job.
11049        pub state: crate::model::metadata_job::status::State,
11050
11051        /// Output only. Message relating to the progression of a metadata job.
11052        pub message: std::string::String,
11053
11054        /// Output only. Progress tracking.
11055        pub completion_percent: i32,
11056
11057        /// Output only. The time when the status was updated.
11058        pub update_time: std::option::Option<wkt::Timestamp>,
11059
11060        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11061    }
11062
11063    impl Status {
11064        pub fn new() -> Self {
11065            std::default::Default::default()
11066        }
11067
11068        /// Sets the value of [state][crate::model::metadata_job::Status::state].
11069        ///
11070        /// # Example
11071        /// ```ignore,no_run
11072        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11073        /// use google_cloud_dataplex_v1::model::metadata_job::status::State;
11074        /// let x0 = Status::new().set_state(State::Queued);
11075        /// let x1 = Status::new().set_state(State::Running);
11076        /// let x2 = Status::new().set_state(State::Canceling);
11077        /// ```
11078        pub fn set_state<T: std::convert::Into<crate::model::metadata_job::status::State>>(
11079            mut self,
11080            v: T,
11081        ) -> Self {
11082            self.state = v.into();
11083            self
11084        }
11085
11086        /// Sets the value of [message][crate::model::metadata_job::Status::message].
11087        ///
11088        /// # Example
11089        /// ```ignore,no_run
11090        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11091        /// let x = Status::new().set_message("example");
11092        /// ```
11093        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11094            self.message = v.into();
11095            self
11096        }
11097
11098        /// Sets the value of [completion_percent][crate::model::metadata_job::Status::completion_percent].
11099        ///
11100        /// # Example
11101        /// ```ignore,no_run
11102        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11103        /// let x = Status::new().set_completion_percent(42);
11104        /// ```
11105        pub fn set_completion_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11106            self.completion_percent = v.into();
11107            self
11108        }
11109
11110        /// Sets the value of [update_time][crate::model::metadata_job::Status::update_time].
11111        ///
11112        /// # Example
11113        /// ```ignore,no_run
11114        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11115        /// use wkt::Timestamp;
11116        /// let x = Status::new().set_update_time(Timestamp::default()/* use setters */);
11117        /// ```
11118        pub fn set_update_time<T>(mut self, v: T) -> Self
11119        where
11120            T: std::convert::Into<wkt::Timestamp>,
11121        {
11122            self.update_time = std::option::Option::Some(v.into());
11123            self
11124        }
11125
11126        /// Sets or clears the value of [update_time][crate::model::metadata_job::Status::update_time].
11127        ///
11128        /// # Example
11129        /// ```ignore,no_run
11130        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11131        /// use wkt::Timestamp;
11132        /// let x = Status::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11133        /// let x = Status::new().set_or_clear_update_time(None::<Timestamp>);
11134        /// ```
11135        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11136        where
11137            T: std::convert::Into<wkt::Timestamp>,
11138        {
11139            self.update_time = v.map(|x| x.into());
11140            self
11141        }
11142    }
11143
11144    impl wkt::message::Message for Status {
11145        fn typename() -> &'static str {
11146            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.Status"
11147        }
11148    }
11149
11150    /// Defines additional types related to [Status].
11151    pub mod status {
11152        #[allow(unused_imports)]
11153        use super::*;
11154
11155        /// State of a metadata job.
11156        ///
11157        /// # Working with unknown values
11158        ///
11159        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11160        /// additional enum variants at any time. Adding new variants is not considered
11161        /// a breaking change. Applications should write their code in anticipation of:
11162        ///
11163        /// - New values appearing in future releases of the client library, **and**
11164        /// - New values received dynamically, without application changes.
11165        ///
11166        /// Please consult the [Working with enums] section in the user guide for some
11167        /// guidelines.
11168        ///
11169        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11170        #[derive(Clone, Debug, PartialEq)]
11171        #[non_exhaustive]
11172        pub enum State {
11173            /// State unspecified.
11174            Unspecified,
11175            /// The job is queued.
11176            Queued,
11177            /// The job is running.
11178            Running,
11179            /// The job is being canceled.
11180            Canceling,
11181            /// The job is canceled.
11182            Canceled,
11183            /// The job succeeded.
11184            Succeeded,
11185            /// The job failed.
11186            Failed,
11187            /// The job completed with some errors.
11188            SucceededWithErrors,
11189            /// If set, the enum was initialized with an unknown value.
11190            ///
11191            /// Applications can examine the value using [State::value] or
11192            /// [State::name].
11193            UnknownValue(state::UnknownValue),
11194        }
11195
11196        #[doc(hidden)]
11197        pub mod state {
11198            #[allow(unused_imports)]
11199            use super::*;
11200            #[derive(Clone, Debug, PartialEq)]
11201            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11202        }
11203
11204        impl State {
11205            /// Gets the enum value.
11206            ///
11207            /// Returns `None` if the enum contains an unknown value deserialized from
11208            /// the string representation of enums.
11209            pub fn value(&self) -> std::option::Option<i32> {
11210                match self {
11211                    Self::Unspecified => std::option::Option::Some(0),
11212                    Self::Queued => std::option::Option::Some(1),
11213                    Self::Running => std::option::Option::Some(2),
11214                    Self::Canceling => std::option::Option::Some(3),
11215                    Self::Canceled => std::option::Option::Some(4),
11216                    Self::Succeeded => std::option::Option::Some(5),
11217                    Self::Failed => std::option::Option::Some(6),
11218                    Self::SucceededWithErrors => std::option::Option::Some(7),
11219                    Self::UnknownValue(u) => u.0.value(),
11220                }
11221            }
11222
11223            /// Gets the enum value as a string.
11224            ///
11225            /// Returns `None` if the enum contains an unknown value deserialized from
11226            /// the integer representation of enums.
11227            pub fn name(&self) -> std::option::Option<&str> {
11228                match self {
11229                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11230                    Self::Queued => std::option::Option::Some("QUEUED"),
11231                    Self::Running => std::option::Option::Some("RUNNING"),
11232                    Self::Canceling => std::option::Option::Some("CANCELING"),
11233                    Self::Canceled => std::option::Option::Some("CANCELED"),
11234                    Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
11235                    Self::Failed => std::option::Option::Some("FAILED"),
11236                    Self::SucceededWithErrors => std::option::Option::Some("SUCCEEDED_WITH_ERRORS"),
11237                    Self::UnknownValue(u) => u.0.name(),
11238                }
11239            }
11240        }
11241
11242        impl std::default::Default for State {
11243            fn default() -> Self {
11244                use std::convert::From;
11245                Self::from(0)
11246            }
11247        }
11248
11249        impl std::fmt::Display for State {
11250            fn fmt(
11251                &self,
11252                f: &mut std::fmt::Formatter<'_>,
11253            ) -> std::result::Result<(), std::fmt::Error> {
11254                wkt::internal::display_enum(f, self.name(), self.value())
11255            }
11256        }
11257
11258        impl std::convert::From<i32> for State {
11259            fn from(value: i32) -> Self {
11260                match value {
11261                    0 => Self::Unspecified,
11262                    1 => Self::Queued,
11263                    2 => Self::Running,
11264                    3 => Self::Canceling,
11265                    4 => Self::Canceled,
11266                    5 => Self::Succeeded,
11267                    6 => Self::Failed,
11268                    7 => Self::SucceededWithErrors,
11269                    _ => Self::UnknownValue(state::UnknownValue(
11270                        wkt::internal::UnknownEnumValue::Integer(value),
11271                    )),
11272                }
11273            }
11274        }
11275
11276        impl std::convert::From<&str> for State {
11277            fn from(value: &str) -> Self {
11278                use std::string::ToString;
11279                match value {
11280                    "STATE_UNSPECIFIED" => Self::Unspecified,
11281                    "QUEUED" => Self::Queued,
11282                    "RUNNING" => Self::Running,
11283                    "CANCELING" => Self::Canceling,
11284                    "CANCELED" => Self::Canceled,
11285                    "SUCCEEDED" => Self::Succeeded,
11286                    "FAILED" => Self::Failed,
11287                    "SUCCEEDED_WITH_ERRORS" => Self::SucceededWithErrors,
11288                    _ => Self::UnknownValue(state::UnknownValue(
11289                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11290                    )),
11291                }
11292            }
11293        }
11294
11295        impl serde::ser::Serialize for State {
11296            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11297            where
11298                S: serde::Serializer,
11299            {
11300                match self {
11301                    Self::Unspecified => serializer.serialize_i32(0),
11302                    Self::Queued => serializer.serialize_i32(1),
11303                    Self::Running => serializer.serialize_i32(2),
11304                    Self::Canceling => serializer.serialize_i32(3),
11305                    Self::Canceled => serializer.serialize_i32(4),
11306                    Self::Succeeded => serializer.serialize_i32(5),
11307                    Self::Failed => serializer.serialize_i32(6),
11308                    Self::SucceededWithErrors => serializer.serialize_i32(7),
11309                    Self::UnknownValue(u) => u.0.serialize(serializer),
11310                }
11311            }
11312        }
11313
11314        impl<'de> serde::de::Deserialize<'de> for State {
11315            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11316            where
11317                D: serde::Deserializer<'de>,
11318            {
11319                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11320                    ".google.cloud.dataplex.v1.MetadataJob.Status.State",
11321                ))
11322            }
11323        }
11324    }
11325
11326    /// Metadata job type.
11327    ///
11328    /// # Working with unknown values
11329    ///
11330    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11331    /// additional enum variants at any time. Adding new variants is not considered
11332    /// a breaking change. Applications should write their code in anticipation of:
11333    ///
11334    /// - New values appearing in future releases of the client library, **and**
11335    /// - New values received dynamically, without application changes.
11336    ///
11337    /// Please consult the [Working with enums] section in the user guide for some
11338    /// guidelines.
11339    ///
11340    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11341    #[derive(Clone, Debug, PartialEq)]
11342    #[non_exhaustive]
11343    pub enum Type {
11344        /// Unspecified.
11345        Unspecified,
11346        /// Import job.
11347        Import,
11348        /// Export job.
11349        Export,
11350        /// If set, the enum was initialized with an unknown value.
11351        ///
11352        /// Applications can examine the value using [Type::value] or
11353        /// [Type::name].
11354        UnknownValue(r#type::UnknownValue),
11355    }
11356
11357    #[doc(hidden)]
11358    pub mod r#type {
11359        #[allow(unused_imports)]
11360        use super::*;
11361        #[derive(Clone, Debug, PartialEq)]
11362        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11363    }
11364
11365    impl Type {
11366        /// Gets the enum value.
11367        ///
11368        /// Returns `None` if the enum contains an unknown value deserialized from
11369        /// the string representation of enums.
11370        pub fn value(&self) -> std::option::Option<i32> {
11371            match self {
11372                Self::Unspecified => std::option::Option::Some(0),
11373                Self::Import => std::option::Option::Some(1),
11374                Self::Export => std::option::Option::Some(2),
11375                Self::UnknownValue(u) => u.0.value(),
11376            }
11377        }
11378
11379        /// Gets the enum value as a string.
11380        ///
11381        /// Returns `None` if the enum contains an unknown value deserialized from
11382        /// the integer representation of enums.
11383        pub fn name(&self) -> std::option::Option<&str> {
11384            match self {
11385                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
11386                Self::Import => std::option::Option::Some("IMPORT"),
11387                Self::Export => std::option::Option::Some("EXPORT"),
11388                Self::UnknownValue(u) => u.0.name(),
11389            }
11390        }
11391    }
11392
11393    impl std::default::Default for Type {
11394        fn default() -> Self {
11395            use std::convert::From;
11396            Self::from(0)
11397        }
11398    }
11399
11400    impl std::fmt::Display for Type {
11401        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11402            wkt::internal::display_enum(f, self.name(), self.value())
11403        }
11404    }
11405
11406    impl std::convert::From<i32> for Type {
11407        fn from(value: i32) -> Self {
11408            match value {
11409                0 => Self::Unspecified,
11410                1 => Self::Import,
11411                2 => Self::Export,
11412                _ => Self::UnknownValue(r#type::UnknownValue(
11413                    wkt::internal::UnknownEnumValue::Integer(value),
11414                )),
11415            }
11416        }
11417    }
11418
11419    impl std::convert::From<&str> for Type {
11420        fn from(value: &str) -> Self {
11421            use std::string::ToString;
11422            match value {
11423                "TYPE_UNSPECIFIED" => Self::Unspecified,
11424                "IMPORT" => Self::Import,
11425                "EXPORT" => Self::Export,
11426                _ => Self::UnknownValue(r#type::UnknownValue(
11427                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11428                )),
11429            }
11430        }
11431    }
11432
11433    impl serde::ser::Serialize for Type {
11434        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11435        where
11436            S: serde::Serializer,
11437        {
11438            match self {
11439                Self::Unspecified => serializer.serialize_i32(0),
11440                Self::Import => serializer.serialize_i32(1),
11441                Self::Export => serializer.serialize_i32(2),
11442                Self::UnknownValue(u) => u.0.serialize(serializer),
11443            }
11444        }
11445    }
11446
11447    impl<'de> serde::de::Deserialize<'de> for Type {
11448        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11449        where
11450            D: serde::Deserializer<'de>,
11451        {
11452            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
11453                ".google.cloud.dataplex.v1.MetadataJob.Type",
11454            ))
11455        }
11456    }
11457
11458    #[derive(Clone, Debug, PartialEq)]
11459    #[non_exhaustive]
11460    pub enum Spec {
11461        /// Import job specification.
11462        ImportSpec(std::boxed::Box<crate::model::metadata_job::ImportJobSpec>),
11463        /// Export job specification.
11464        ExportSpec(std::boxed::Box<crate::model::metadata_job::ExportJobSpec>),
11465    }
11466
11467    #[derive(Clone, Debug, PartialEq)]
11468    #[non_exhaustive]
11469    pub enum Result {
11470        /// Output only. Import job result.
11471        ImportResult(std::boxed::Box<crate::model::metadata_job::ImportJobResult>),
11472        /// Output only. Export job result.
11473        ExportResult(std::boxed::Box<crate::model::metadata_job::ExportJobResult>),
11474    }
11475}
11476
11477/// EntryLink represents a link between two Entries.
11478#[derive(Clone, Default, PartialEq)]
11479#[non_exhaustive]
11480pub struct EntryLink {
11481    /// Output only. Immutable. Identifier. The relative resource name of the Entry
11482    /// Link, of the form:
11483    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`
11484    pub name: std::string::String,
11485
11486    /// Required. Immutable. Relative resource name of the Entry Link Type used to
11487    /// create this Entry Link. For example:
11488    ///
11489    /// - Entry link between synonym terms in a glossary:
11490    ///   `projects/dataplex-types/locations/global/entryLinkTypes/synonym`
11491    /// - Entry link between related terms in a glossary:
11492    ///   `projects/dataplex-types/locations/global/entryLinkTypes/related`
11493    /// - Entry link between glossary terms and data assets:
11494    ///   `projects/dataplex-types/locations/global/entryLinkTypes/definition`
11495    pub entry_link_type: std::string::String,
11496
11497    /// Output only. The time when the Entry Link was created.
11498    pub create_time: std::option::Option<wkt::Timestamp>,
11499
11500    /// Output only. The time when the Entry Link was last updated.
11501    pub update_time: std::option::Option<wkt::Timestamp>,
11502
11503    /// Required. Specifies the Entries referenced in the Entry Link. There should
11504    /// be exactly two entry references.
11505    pub entry_references: std::vec::Vec<crate::model::entry_link::EntryReference>,
11506
11507    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11508}
11509
11510impl EntryLink {
11511    pub fn new() -> Self {
11512        std::default::Default::default()
11513    }
11514
11515    /// Sets the value of [name][crate::model::EntryLink::name].
11516    ///
11517    /// # Example
11518    /// ```ignore,no_run
11519    /// # use google_cloud_dataplex_v1::model::EntryLink;
11520    /// let x = EntryLink::new().set_name("example");
11521    /// ```
11522    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11523        self.name = v.into();
11524        self
11525    }
11526
11527    /// Sets the value of [entry_link_type][crate::model::EntryLink::entry_link_type].
11528    ///
11529    /// # Example
11530    /// ```ignore,no_run
11531    /// # use google_cloud_dataplex_v1::model::EntryLink;
11532    /// let x = EntryLink::new().set_entry_link_type("example");
11533    /// ```
11534    pub fn set_entry_link_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11535        self.entry_link_type = v.into();
11536        self
11537    }
11538
11539    /// Sets the value of [create_time][crate::model::EntryLink::create_time].
11540    ///
11541    /// # Example
11542    /// ```ignore,no_run
11543    /// # use google_cloud_dataplex_v1::model::EntryLink;
11544    /// use wkt::Timestamp;
11545    /// let x = EntryLink::new().set_create_time(Timestamp::default()/* use setters */);
11546    /// ```
11547    pub fn set_create_time<T>(mut self, v: T) -> Self
11548    where
11549        T: std::convert::Into<wkt::Timestamp>,
11550    {
11551        self.create_time = std::option::Option::Some(v.into());
11552        self
11553    }
11554
11555    /// Sets or clears the value of [create_time][crate::model::EntryLink::create_time].
11556    ///
11557    /// # Example
11558    /// ```ignore,no_run
11559    /// # use google_cloud_dataplex_v1::model::EntryLink;
11560    /// use wkt::Timestamp;
11561    /// let x = EntryLink::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11562    /// let x = EntryLink::new().set_or_clear_create_time(None::<Timestamp>);
11563    /// ```
11564    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11565    where
11566        T: std::convert::Into<wkt::Timestamp>,
11567    {
11568        self.create_time = v.map(|x| x.into());
11569        self
11570    }
11571
11572    /// Sets the value of [update_time][crate::model::EntryLink::update_time].
11573    ///
11574    /// # Example
11575    /// ```ignore,no_run
11576    /// # use google_cloud_dataplex_v1::model::EntryLink;
11577    /// use wkt::Timestamp;
11578    /// let x = EntryLink::new().set_update_time(Timestamp::default()/* use setters */);
11579    /// ```
11580    pub fn set_update_time<T>(mut self, v: T) -> Self
11581    where
11582        T: std::convert::Into<wkt::Timestamp>,
11583    {
11584        self.update_time = std::option::Option::Some(v.into());
11585        self
11586    }
11587
11588    /// Sets or clears the value of [update_time][crate::model::EntryLink::update_time].
11589    ///
11590    /// # Example
11591    /// ```ignore,no_run
11592    /// # use google_cloud_dataplex_v1::model::EntryLink;
11593    /// use wkt::Timestamp;
11594    /// let x = EntryLink::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11595    /// let x = EntryLink::new().set_or_clear_update_time(None::<Timestamp>);
11596    /// ```
11597    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11598    where
11599        T: std::convert::Into<wkt::Timestamp>,
11600    {
11601        self.update_time = v.map(|x| x.into());
11602        self
11603    }
11604
11605    /// Sets the value of [entry_references][crate::model::EntryLink::entry_references].
11606    ///
11607    /// # Example
11608    /// ```ignore,no_run
11609    /// # use google_cloud_dataplex_v1::model::EntryLink;
11610    /// use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11611    /// let x = EntryLink::new()
11612    ///     .set_entry_references([
11613    ///         EntryReference::default()/* use setters */,
11614    ///         EntryReference::default()/* use (different) setters */,
11615    ///     ]);
11616    /// ```
11617    pub fn set_entry_references<T, V>(mut self, v: T) -> Self
11618    where
11619        T: std::iter::IntoIterator<Item = V>,
11620        V: std::convert::Into<crate::model::entry_link::EntryReference>,
11621    {
11622        use std::iter::Iterator;
11623        self.entry_references = v.into_iter().map(|i| i.into()).collect();
11624        self
11625    }
11626}
11627
11628impl wkt::message::Message for EntryLink {
11629    fn typename() -> &'static str {
11630        "type.googleapis.com/google.cloud.dataplex.v1.EntryLink"
11631    }
11632}
11633
11634/// Defines additional types related to [EntryLink].
11635pub mod entry_link {
11636    #[allow(unused_imports)]
11637    use super::*;
11638
11639    /// Reference to the Entry that is linked through the Entry Link.
11640    #[derive(Clone, Default, PartialEq)]
11641    #[non_exhaustive]
11642    pub struct EntryReference {
11643        /// Required. Immutable. The relative resource name of the referenced Entry,
11644        /// of the form:
11645        /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
11646        pub name: std::string::String,
11647
11648        /// Immutable. The path in the Entry that is referenced in the Entry Link.
11649        /// Empty path denotes that the Entry itself is referenced in the Entry
11650        /// Link.
11651        pub path: std::string::String,
11652
11653        /// Required. Immutable. The reference type of the Entry.
11654        pub r#type: crate::model::entry_link::entry_reference::Type,
11655
11656        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11657    }
11658
11659    impl EntryReference {
11660        pub fn new() -> Self {
11661            std::default::Default::default()
11662        }
11663
11664        /// Sets the value of [name][crate::model::entry_link::EntryReference::name].
11665        ///
11666        /// # Example
11667        /// ```ignore,no_run
11668        /// # use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11669        /// let x = EntryReference::new().set_name("example");
11670        /// ```
11671        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11672            self.name = v.into();
11673            self
11674        }
11675
11676        /// Sets the value of [path][crate::model::entry_link::EntryReference::path].
11677        ///
11678        /// # Example
11679        /// ```ignore,no_run
11680        /// # use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11681        /// let x = EntryReference::new().set_path("example");
11682        /// ```
11683        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11684            self.path = v.into();
11685            self
11686        }
11687
11688        /// Sets the value of [r#type][crate::model::entry_link::EntryReference::type].
11689        ///
11690        /// # Example
11691        /// ```ignore,no_run
11692        /// # use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11693        /// use google_cloud_dataplex_v1::model::entry_link::entry_reference::Type;
11694        /// let x0 = EntryReference::new().set_type(Type::Source);
11695        /// let x1 = EntryReference::new().set_type(Type::Target);
11696        /// ```
11697        pub fn set_type<T: std::convert::Into<crate::model::entry_link::entry_reference::Type>>(
11698            mut self,
11699            v: T,
11700        ) -> Self {
11701            self.r#type = v.into();
11702            self
11703        }
11704    }
11705
11706    impl wkt::message::Message for EntryReference {
11707        fn typename() -> &'static str {
11708            "type.googleapis.com/google.cloud.dataplex.v1.EntryLink.EntryReference"
11709        }
11710    }
11711
11712    /// Defines additional types related to [EntryReference].
11713    pub mod entry_reference {
11714        #[allow(unused_imports)]
11715        use super::*;
11716
11717        /// Reference type of the Entry.
11718        ///
11719        /// # Working with unknown values
11720        ///
11721        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11722        /// additional enum variants at any time. Adding new variants is not considered
11723        /// a breaking change. Applications should write their code in anticipation of:
11724        ///
11725        /// - New values appearing in future releases of the client library, **and**
11726        /// - New values received dynamically, without application changes.
11727        ///
11728        /// Please consult the [Working with enums] section in the user guide for some
11729        /// guidelines.
11730        ///
11731        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11732        #[derive(Clone, Debug, PartialEq)]
11733        #[non_exhaustive]
11734        pub enum Type {
11735            /// Unspecified reference type. Implies that the Entry is referenced
11736            /// in a non-directional Entry Link.
11737            Unspecified,
11738            /// The Entry is referenced as the source of the directional Entry Link.
11739            Source,
11740            /// The Entry is referenced as the target of the directional Entry Link.
11741            Target,
11742            /// If set, the enum was initialized with an unknown value.
11743            ///
11744            /// Applications can examine the value using [Type::value] or
11745            /// [Type::name].
11746            UnknownValue(r#type::UnknownValue),
11747        }
11748
11749        #[doc(hidden)]
11750        pub mod r#type {
11751            #[allow(unused_imports)]
11752            use super::*;
11753            #[derive(Clone, Debug, PartialEq)]
11754            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11755        }
11756
11757        impl Type {
11758            /// Gets the enum value.
11759            ///
11760            /// Returns `None` if the enum contains an unknown value deserialized from
11761            /// the string representation of enums.
11762            pub fn value(&self) -> std::option::Option<i32> {
11763                match self {
11764                    Self::Unspecified => std::option::Option::Some(0),
11765                    Self::Source => std::option::Option::Some(2),
11766                    Self::Target => std::option::Option::Some(3),
11767                    Self::UnknownValue(u) => u.0.value(),
11768                }
11769            }
11770
11771            /// Gets the enum value as a string.
11772            ///
11773            /// Returns `None` if the enum contains an unknown value deserialized from
11774            /// the integer representation of enums.
11775            pub fn name(&self) -> std::option::Option<&str> {
11776                match self {
11777                    Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
11778                    Self::Source => std::option::Option::Some("SOURCE"),
11779                    Self::Target => std::option::Option::Some("TARGET"),
11780                    Self::UnknownValue(u) => u.0.name(),
11781                }
11782            }
11783        }
11784
11785        impl std::default::Default for Type {
11786            fn default() -> Self {
11787                use std::convert::From;
11788                Self::from(0)
11789            }
11790        }
11791
11792        impl std::fmt::Display for Type {
11793            fn fmt(
11794                &self,
11795                f: &mut std::fmt::Formatter<'_>,
11796            ) -> std::result::Result<(), std::fmt::Error> {
11797                wkt::internal::display_enum(f, self.name(), self.value())
11798            }
11799        }
11800
11801        impl std::convert::From<i32> for Type {
11802            fn from(value: i32) -> Self {
11803                match value {
11804                    0 => Self::Unspecified,
11805                    2 => Self::Source,
11806                    3 => Self::Target,
11807                    _ => Self::UnknownValue(r#type::UnknownValue(
11808                        wkt::internal::UnknownEnumValue::Integer(value),
11809                    )),
11810                }
11811            }
11812        }
11813
11814        impl std::convert::From<&str> for Type {
11815            fn from(value: &str) -> Self {
11816                use std::string::ToString;
11817                match value {
11818                    "UNSPECIFIED" => Self::Unspecified,
11819                    "SOURCE" => Self::Source,
11820                    "TARGET" => Self::Target,
11821                    _ => Self::UnknownValue(r#type::UnknownValue(
11822                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11823                    )),
11824                }
11825            }
11826        }
11827
11828        impl serde::ser::Serialize for Type {
11829            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11830            where
11831                S: serde::Serializer,
11832            {
11833                match self {
11834                    Self::Unspecified => serializer.serialize_i32(0),
11835                    Self::Source => serializer.serialize_i32(2),
11836                    Self::Target => serializer.serialize_i32(3),
11837                    Self::UnknownValue(u) => u.0.serialize(serializer),
11838                }
11839            }
11840        }
11841
11842        impl<'de> serde::de::Deserialize<'de> for Type {
11843            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11844            where
11845                D: serde::Deserializer<'de>,
11846            {
11847                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
11848                    ".google.cloud.dataplex.v1.EntryLink.EntryReference.Type",
11849                ))
11850            }
11851        }
11852    }
11853}
11854
11855/// Request message for CreateEntryLink.
11856#[derive(Clone, Default, PartialEq)]
11857#[non_exhaustive]
11858pub struct CreateEntryLinkRequest {
11859    /// Required. The resource name of the parent Entry Group:
11860    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
11861    pub parent: std::string::String,
11862
11863    /// Required. Entry Link identifier
11864    ///
11865    /// * Must contain only lowercase letters, numbers and hyphens.
11866    /// * Must start with a letter.
11867    /// * Must be between 1-63 characters.
11868    /// * Must end with a number or a letter.
11869    /// * Must be unique within the EntryGroup.
11870    pub entry_link_id: std::string::String,
11871
11872    /// Required. Entry Link resource.
11873    pub entry_link: std::option::Option<crate::model::EntryLink>,
11874
11875    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11876}
11877
11878impl CreateEntryLinkRequest {
11879    pub fn new() -> Self {
11880        std::default::Default::default()
11881    }
11882
11883    /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
11884    ///
11885    /// # Example
11886    /// ```ignore,no_run
11887    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11888    /// let x = CreateEntryLinkRequest::new().set_parent("example");
11889    /// ```
11890    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11891        self.parent = v.into();
11892        self
11893    }
11894
11895    /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
11896    ///
11897    /// # Example
11898    /// ```ignore,no_run
11899    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11900    /// let x = CreateEntryLinkRequest::new().set_entry_link_id("example");
11901    /// ```
11902    pub fn set_entry_link_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11903        self.entry_link_id = v.into();
11904        self
11905    }
11906
11907    /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
11908    ///
11909    /// # Example
11910    /// ```ignore,no_run
11911    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11912    /// use google_cloud_dataplex_v1::model::EntryLink;
11913    /// let x = CreateEntryLinkRequest::new().set_entry_link(EntryLink::default()/* use setters */);
11914    /// ```
11915    pub fn set_entry_link<T>(mut self, v: T) -> Self
11916    where
11917        T: std::convert::Into<crate::model::EntryLink>,
11918    {
11919        self.entry_link = std::option::Option::Some(v.into());
11920        self
11921    }
11922
11923    /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
11924    ///
11925    /// # Example
11926    /// ```ignore,no_run
11927    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11928    /// use google_cloud_dataplex_v1::model::EntryLink;
11929    /// let x = CreateEntryLinkRequest::new().set_or_clear_entry_link(Some(EntryLink::default()/* use setters */));
11930    /// let x = CreateEntryLinkRequest::new().set_or_clear_entry_link(None::<EntryLink>);
11931    /// ```
11932    pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
11933    where
11934        T: std::convert::Into<crate::model::EntryLink>,
11935    {
11936        self.entry_link = v.map(|x| x.into());
11937        self
11938    }
11939}
11940
11941impl wkt::message::Message for CreateEntryLinkRequest {
11942    fn typename() -> &'static str {
11943        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryLinkRequest"
11944    }
11945}
11946
11947/// Request message for DeleteEntryLink.
11948#[derive(Clone, Default, PartialEq)]
11949#[non_exhaustive]
11950pub struct DeleteEntryLinkRequest {
11951    /// Required. The resource name of the Entry Link:
11952    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
11953    pub name: std::string::String,
11954
11955    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11956}
11957
11958impl DeleteEntryLinkRequest {
11959    pub fn new() -> Self {
11960        std::default::Default::default()
11961    }
11962
11963    /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
11964    ///
11965    /// # Example
11966    /// ```ignore,no_run
11967    /// # use google_cloud_dataplex_v1::model::DeleteEntryLinkRequest;
11968    /// let x = DeleteEntryLinkRequest::new().set_name("example");
11969    /// ```
11970    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11971        self.name = v.into();
11972        self
11973    }
11974}
11975
11976impl wkt::message::Message for DeleteEntryLinkRequest {
11977    fn typename() -> &'static str {
11978        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryLinkRequest"
11979    }
11980}
11981
11982/// Request message for GetEntryLink.
11983#[derive(Clone, Default, PartialEq)]
11984#[non_exhaustive]
11985pub struct GetEntryLinkRequest {
11986    /// Required. The resource name of the Entry Link:
11987    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
11988    pub name: std::string::String,
11989
11990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11991}
11992
11993impl GetEntryLinkRequest {
11994    pub fn new() -> Self {
11995        std::default::Default::default()
11996    }
11997
11998    /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
11999    ///
12000    /// # Example
12001    /// ```ignore,no_run
12002    /// # use google_cloud_dataplex_v1::model::GetEntryLinkRequest;
12003    /// let x = GetEntryLinkRequest::new().set_name("example");
12004    /// ```
12005    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12006        self.name = v.into();
12007        self
12008    }
12009}
12010
12011impl wkt::message::Message for GetEntryLinkRequest {
12012    fn typename() -> &'static str {
12013        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryLinkRequest"
12014    }
12015}
12016
12017/// A Resource designed to manage encryption configurations for customers to
12018/// support Customer Managed Encryption Keys (CMEK).
12019#[derive(Clone, Default, PartialEq)]
12020#[non_exhaustive]
12021pub struct EncryptionConfig {
12022    /// Identifier. The resource name of the EncryptionConfig.
12023    /// Format:
12024    /// organizations/{organization}/locations/{location}/encryptionConfigs/{encryption_config}
12025    /// Global location is not supported.
12026    pub name: std::string::String,
12027
12028    /// Optional. If a key is chosen, it means that the customer is using CMEK.
12029    /// If a key is not chosen, it means that the customer is using Google managed
12030    /// encryption.
12031    pub key: std::string::String,
12032
12033    /// Output only. The time when the Encryption configuration was created.
12034    pub create_time: std::option::Option<wkt::Timestamp>,
12035
12036    /// Output only. The time when the Encryption configuration was last updated.
12037    pub update_time: std::option::Option<wkt::Timestamp>,
12038
12039    /// Output only. The state of encryption of the databases.
12040    pub encryption_state: crate::model::encryption_config::EncryptionState,
12041
12042    /// Etag of the EncryptionConfig. This is a strong etag.
12043    pub etag: std::string::String,
12044
12045    /// Output only. Details of the failure if anything related to Cmek db fails.
12046    pub failure_details: std::option::Option<crate::model::encryption_config::FailureDetails>,
12047
12048    /// Optional. Represent the state of CMEK opt-in for metastore.
12049    pub enable_metastore_encryption: bool,
12050
12051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12052}
12053
12054impl EncryptionConfig {
12055    pub fn new() -> Self {
12056        std::default::Default::default()
12057    }
12058
12059    /// Sets the value of [name][crate::model::EncryptionConfig::name].
12060    ///
12061    /// # Example
12062    /// ```ignore,no_run
12063    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12064    /// let x = EncryptionConfig::new().set_name("example");
12065    /// ```
12066    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12067        self.name = v.into();
12068        self
12069    }
12070
12071    /// Sets the value of [key][crate::model::EncryptionConfig::key].
12072    ///
12073    /// # Example
12074    /// ```ignore,no_run
12075    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12076    /// let x = EncryptionConfig::new().set_key("example");
12077    /// ```
12078    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12079        self.key = v.into();
12080        self
12081    }
12082
12083    /// Sets the value of [create_time][crate::model::EncryptionConfig::create_time].
12084    ///
12085    /// # Example
12086    /// ```ignore,no_run
12087    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12088    /// use wkt::Timestamp;
12089    /// let x = EncryptionConfig::new().set_create_time(Timestamp::default()/* use setters */);
12090    /// ```
12091    pub fn set_create_time<T>(mut self, v: T) -> Self
12092    where
12093        T: std::convert::Into<wkt::Timestamp>,
12094    {
12095        self.create_time = std::option::Option::Some(v.into());
12096        self
12097    }
12098
12099    /// Sets or clears the value of [create_time][crate::model::EncryptionConfig::create_time].
12100    ///
12101    /// # Example
12102    /// ```ignore,no_run
12103    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12104    /// use wkt::Timestamp;
12105    /// let x = EncryptionConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
12106    /// let x = EncryptionConfig::new().set_or_clear_create_time(None::<Timestamp>);
12107    /// ```
12108    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
12109    where
12110        T: std::convert::Into<wkt::Timestamp>,
12111    {
12112        self.create_time = v.map(|x| x.into());
12113        self
12114    }
12115
12116    /// Sets the value of [update_time][crate::model::EncryptionConfig::update_time].
12117    ///
12118    /// # Example
12119    /// ```ignore,no_run
12120    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12121    /// use wkt::Timestamp;
12122    /// let x = EncryptionConfig::new().set_update_time(Timestamp::default()/* use setters */);
12123    /// ```
12124    pub fn set_update_time<T>(mut self, v: T) -> Self
12125    where
12126        T: std::convert::Into<wkt::Timestamp>,
12127    {
12128        self.update_time = std::option::Option::Some(v.into());
12129        self
12130    }
12131
12132    /// Sets or clears the value of [update_time][crate::model::EncryptionConfig::update_time].
12133    ///
12134    /// # Example
12135    /// ```ignore,no_run
12136    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12137    /// use wkt::Timestamp;
12138    /// let x = EncryptionConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
12139    /// let x = EncryptionConfig::new().set_or_clear_update_time(None::<Timestamp>);
12140    /// ```
12141    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
12142    where
12143        T: std::convert::Into<wkt::Timestamp>,
12144    {
12145        self.update_time = v.map(|x| x.into());
12146        self
12147    }
12148
12149    /// Sets the value of [encryption_state][crate::model::EncryptionConfig::encryption_state].
12150    ///
12151    /// # Example
12152    /// ```ignore,no_run
12153    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12154    /// use google_cloud_dataplex_v1::model::encryption_config::EncryptionState;
12155    /// let x0 = EncryptionConfig::new().set_encryption_state(EncryptionState::Encrypting);
12156    /// let x1 = EncryptionConfig::new().set_encryption_state(EncryptionState::Completed);
12157    /// let x2 = EncryptionConfig::new().set_encryption_state(EncryptionState::Failed);
12158    /// ```
12159    pub fn set_encryption_state<
12160        T: std::convert::Into<crate::model::encryption_config::EncryptionState>,
12161    >(
12162        mut self,
12163        v: T,
12164    ) -> Self {
12165        self.encryption_state = v.into();
12166        self
12167    }
12168
12169    /// Sets the value of [etag][crate::model::EncryptionConfig::etag].
12170    ///
12171    /// # Example
12172    /// ```ignore,no_run
12173    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12174    /// let x = EncryptionConfig::new().set_etag("example");
12175    /// ```
12176    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12177        self.etag = v.into();
12178        self
12179    }
12180
12181    /// Sets the value of [failure_details][crate::model::EncryptionConfig::failure_details].
12182    ///
12183    /// # Example
12184    /// ```ignore,no_run
12185    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12186    /// use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12187    /// let x = EncryptionConfig::new().set_failure_details(FailureDetails::default()/* use setters */);
12188    /// ```
12189    pub fn set_failure_details<T>(mut self, v: T) -> Self
12190    where
12191        T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
12192    {
12193        self.failure_details = std::option::Option::Some(v.into());
12194        self
12195    }
12196
12197    /// Sets or clears the value of [failure_details][crate::model::EncryptionConfig::failure_details].
12198    ///
12199    /// # Example
12200    /// ```ignore,no_run
12201    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12202    /// use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12203    /// let x = EncryptionConfig::new().set_or_clear_failure_details(Some(FailureDetails::default()/* use setters */));
12204    /// let x = EncryptionConfig::new().set_or_clear_failure_details(None::<FailureDetails>);
12205    /// ```
12206    pub fn set_or_clear_failure_details<T>(mut self, v: std::option::Option<T>) -> Self
12207    where
12208        T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
12209    {
12210        self.failure_details = v.map(|x| x.into());
12211        self
12212    }
12213
12214    /// Sets the value of [enable_metastore_encryption][crate::model::EncryptionConfig::enable_metastore_encryption].
12215    ///
12216    /// # Example
12217    /// ```ignore,no_run
12218    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12219    /// let x = EncryptionConfig::new().set_enable_metastore_encryption(true);
12220    /// ```
12221    pub fn set_enable_metastore_encryption<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12222        self.enable_metastore_encryption = v.into();
12223        self
12224    }
12225}
12226
12227impl wkt::message::Message for EncryptionConfig {
12228    fn typename() -> &'static str {
12229        "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig"
12230    }
12231}
12232
12233/// Defines additional types related to [EncryptionConfig].
12234pub mod encryption_config {
12235    #[allow(unused_imports)]
12236    use super::*;
12237
12238    /// Details of the failure if anything related to Cmek db fails.
12239    #[derive(Clone, Default, PartialEq)]
12240    #[non_exhaustive]
12241    pub struct FailureDetails {
12242        /// Output only. The error code for the failure.
12243        pub error_code: crate::model::encryption_config::failure_details::ErrorCode,
12244
12245        /// Output only. The error message will be shown to the user. Set only if the
12246        /// error code is REQUIRE_USER_ACTION.
12247        pub error_message: std::string::String,
12248
12249        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12250    }
12251
12252    impl FailureDetails {
12253        pub fn new() -> Self {
12254            std::default::Default::default()
12255        }
12256
12257        /// Sets the value of [error_code][crate::model::encryption_config::FailureDetails::error_code].
12258        ///
12259        /// # Example
12260        /// ```ignore,no_run
12261        /// # use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12262        /// use google_cloud_dataplex_v1::model::encryption_config::failure_details::ErrorCode;
12263        /// let x0 = FailureDetails::new().set_error_code(ErrorCode::InternalError);
12264        /// let x1 = FailureDetails::new().set_error_code(ErrorCode::RequireUserAction);
12265        /// ```
12266        pub fn set_error_code<
12267            T: std::convert::Into<crate::model::encryption_config::failure_details::ErrorCode>,
12268        >(
12269            mut self,
12270            v: T,
12271        ) -> Self {
12272            self.error_code = v.into();
12273            self
12274        }
12275
12276        /// Sets the value of [error_message][crate::model::encryption_config::FailureDetails::error_message].
12277        ///
12278        /// # Example
12279        /// ```ignore,no_run
12280        /// # use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12281        /// let x = FailureDetails::new().set_error_message("example");
12282        /// ```
12283        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
12284            mut self,
12285            v: T,
12286        ) -> Self {
12287            self.error_message = v.into();
12288            self
12289        }
12290    }
12291
12292    impl wkt::message::Message for FailureDetails {
12293        fn typename() -> &'static str {
12294            "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig.FailureDetails"
12295        }
12296    }
12297
12298    /// Defines additional types related to [FailureDetails].
12299    pub mod failure_details {
12300        #[allow(unused_imports)]
12301        use super::*;
12302
12303        /// Error code for the failure if anything related to Cmek db fails.
12304        ///
12305        /// # Working with unknown values
12306        ///
12307        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12308        /// additional enum variants at any time. Adding new variants is not considered
12309        /// a breaking change. Applications should write their code in anticipation of:
12310        ///
12311        /// - New values appearing in future releases of the client library, **and**
12312        /// - New values received dynamically, without application changes.
12313        ///
12314        /// Please consult the [Working with enums] section in the user guide for some
12315        /// guidelines.
12316        ///
12317        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12318        #[derive(Clone, Debug, PartialEq)]
12319        #[non_exhaustive]
12320        pub enum ErrorCode {
12321            /// The error code is not specified
12322            Unknown,
12323            /// Error because of internal server error, will be retried automatically.
12324            InternalError,
12325            /// User action is required to resolve the error.
12326            RequireUserAction,
12327            /// If set, the enum was initialized with an unknown value.
12328            ///
12329            /// Applications can examine the value using [ErrorCode::value] or
12330            /// [ErrorCode::name].
12331            UnknownValue(error_code::UnknownValue),
12332        }
12333
12334        #[doc(hidden)]
12335        pub mod error_code {
12336            #[allow(unused_imports)]
12337            use super::*;
12338            #[derive(Clone, Debug, PartialEq)]
12339            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12340        }
12341
12342        impl ErrorCode {
12343            /// Gets the enum value.
12344            ///
12345            /// Returns `None` if the enum contains an unknown value deserialized from
12346            /// the string representation of enums.
12347            pub fn value(&self) -> std::option::Option<i32> {
12348                match self {
12349                    Self::Unknown => std::option::Option::Some(0),
12350                    Self::InternalError => std::option::Option::Some(1),
12351                    Self::RequireUserAction => std::option::Option::Some(2),
12352                    Self::UnknownValue(u) => u.0.value(),
12353                }
12354            }
12355
12356            /// Gets the enum value as a string.
12357            ///
12358            /// Returns `None` if the enum contains an unknown value deserialized from
12359            /// the integer representation of enums.
12360            pub fn name(&self) -> std::option::Option<&str> {
12361                match self {
12362                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
12363                    Self::InternalError => std::option::Option::Some("INTERNAL_ERROR"),
12364                    Self::RequireUserAction => std::option::Option::Some("REQUIRE_USER_ACTION"),
12365                    Self::UnknownValue(u) => u.0.name(),
12366                }
12367            }
12368        }
12369
12370        impl std::default::Default for ErrorCode {
12371            fn default() -> Self {
12372                use std::convert::From;
12373                Self::from(0)
12374            }
12375        }
12376
12377        impl std::fmt::Display for ErrorCode {
12378            fn fmt(
12379                &self,
12380                f: &mut std::fmt::Formatter<'_>,
12381            ) -> std::result::Result<(), std::fmt::Error> {
12382                wkt::internal::display_enum(f, self.name(), self.value())
12383            }
12384        }
12385
12386        impl std::convert::From<i32> for ErrorCode {
12387            fn from(value: i32) -> Self {
12388                match value {
12389                    0 => Self::Unknown,
12390                    1 => Self::InternalError,
12391                    2 => Self::RequireUserAction,
12392                    _ => Self::UnknownValue(error_code::UnknownValue(
12393                        wkt::internal::UnknownEnumValue::Integer(value),
12394                    )),
12395                }
12396            }
12397        }
12398
12399        impl std::convert::From<&str> for ErrorCode {
12400            fn from(value: &str) -> Self {
12401                use std::string::ToString;
12402                match value {
12403                    "UNKNOWN" => Self::Unknown,
12404                    "INTERNAL_ERROR" => Self::InternalError,
12405                    "REQUIRE_USER_ACTION" => Self::RequireUserAction,
12406                    _ => Self::UnknownValue(error_code::UnknownValue(
12407                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12408                    )),
12409                }
12410            }
12411        }
12412
12413        impl serde::ser::Serialize for ErrorCode {
12414            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12415            where
12416                S: serde::Serializer,
12417            {
12418                match self {
12419                    Self::Unknown => serializer.serialize_i32(0),
12420                    Self::InternalError => serializer.serialize_i32(1),
12421                    Self::RequireUserAction => serializer.serialize_i32(2),
12422                    Self::UnknownValue(u) => u.0.serialize(serializer),
12423                }
12424            }
12425        }
12426
12427        impl<'de> serde::de::Deserialize<'de> for ErrorCode {
12428            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12429            where
12430                D: serde::Deserializer<'de>,
12431            {
12432                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
12433                    ".google.cloud.dataplex.v1.EncryptionConfig.FailureDetails.ErrorCode",
12434                ))
12435            }
12436        }
12437    }
12438
12439    /// State of encryption of the databases when EncryptionConfig is created or
12440    /// updated.
12441    ///
12442    /// # Working with unknown values
12443    ///
12444    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12445    /// additional enum variants at any time. Adding new variants is not considered
12446    /// a breaking change. Applications should write their code in anticipation of:
12447    ///
12448    /// - New values appearing in future releases of the client library, **and**
12449    /// - New values received dynamically, without application changes.
12450    ///
12451    /// Please consult the [Working with enums] section in the user guide for some
12452    /// guidelines.
12453    ///
12454    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12455    #[derive(Clone, Debug, PartialEq)]
12456    #[non_exhaustive]
12457    pub enum EncryptionState {
12458        /// State is not specified.
12459        Unspecified,
12460        /// The encryption state of the database when the EncryptionConfig is created
12461        /// or updated. If the encryption fails, it is retried indefinitely and the
12462        /// state is shown as ENCRYPTING.
12463        Encrypting,
12464        /// The encryption of data has completed successfully.
12465        Completed,
12466        /// The encryption of data has failed.
12467        /// The state is set to FAILED when the encryption fails due to reasons like
12468        /// permission issues, invalid key etc.
12469        Failed,
12470        /// If set, the enum was initialized with an unknown value.
12471        ///
12472        /// Applications can examine the value using [EncryptionState::value] or
12473        /// [EncryptionState::name].
12474        UnknownValue(encryption_state::UnknownValue),
12475    }
12476
12477    #[doc(hidden)]
12478    pub mod encryption_state {
12479        #[allow(unused_imports)]
12480        use super::*;
12481        #[derive(Clone, Debug, PartialEq)]
12482        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12483    }
12484
12485    impl EncryptionState {
12486        /// Gets the enum value.
12487        ///
12488        /// Returns `None` if the enum contains an unknown value deserialized from
12489        /// the string representation of enums.
12490        pub fn value(&self) -> std::option::Option<i32> {
12491            match self {
12492                Self::Unspecified => std::option::Option::Some(0),
12493                Self::Encrypting => std::option::Option::Some(1),
12494                Self::Completed => std::option::Option::Some(2),
12495                Self::Failed => std::option::Option::Some(3),
12496                Self::UnknownValue(u) => u.0.value(),
12497            }
12498        }
12499
12500        /// Gets the enum value as a string.
12501        ///
12502        /// Returns `None` if the enum contains an unknown value deserialized from
12503        /// the integer representation of enums.
12504        pub fn name(&self) -> std::option::Option<&str> {
12505            match self {
12506                Self::Unspecified => std::option::Option::Some("ENCRYPTION_STATE_UNSPECIFIED"),
12507                Self::Encrypting => std::option::Option::Some("ENCRYPTING"),
12508                Self::Completed => std::option::Option::Some("COMPLETED"),
12509                Self::Failed => std::option::Option::Some("FAILED"),
12510                Self::UnknownValue(u) => u.0.name(),
12511            }
12512        }
12513    }
12514
12515    impl std::default::Default for EncryptionState {
12516        fn default() -> Self {
12517            use std::convert::From;
12518            Self::from(0)
12519        }
12520    }
12521
12522    impl std::fmt::Display for EncryptionState {
12523        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12524            wkt::internal::display_enum(f, self.name(), self.value())
12525        }
12526    }
12527
12528    impl std::convert::From<i32> for EncryptionState {
12529        fn from(value: i32) -> Self {
12530            match value {
12531                0 => Self::Unspecified,
12532                1 => Self::Encrypting,
12533                2 => Self::Completed,
12534                3 => Self::Failed,
12535                _ => Self::UnknownValue(encryption_state::UnknownValue(
12536                    wkt::internal::UnknownEnumValue::Integer(value),
12537                )),
12538            }
12539        }
12540    }
12541
12542    impl std::convert::From<&str> for EncryptionState {
12543        fn from(value: &str) -> Self {
12544            use std::string::ToString;
12545            match value {
12546                "ENCRYPTION_STATE_UNSPECIFIED" => Self::Unspecified,
12547                "ENCRYPTING" => Self::Encrypting,
12548                "COMPLETED" => Self::Completed,
12549                "FAILED" => Self::Failed,
12550                _ => Self::UnknownValue(encryption_state::UnknownValue(
12551                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12552                )),
12553            }
12554        }
12555    }
12556
12557    impl serde::ser::Serialize for EncryptionState {
12558        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12559        where
12560            S: serde::Serializer,
12561        {
12562            match self {
12563                Self::Unspecified => serializer.serialize_i32(0),
12564                Self::Encrypting => serializer.serialize_i32(1),
12565                Self::Completed => serializer.serialize_i32(2),
12566                Self::Failed => serializer.serialize_i32(3),
12567                Self::UnknownValue(u) => u.0.serialize(serializer),
12568            }
12569        }
12570    }
12571
12572    impl<'de> serde::de::Deserialize<'de> for EncryptionState {
12573        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12574        where
12575            D: serde::Deserializer<'de>,
12576        {
12577            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionState>::new(
12578                ".google.cloud.dataplex.v1.EncryptionConfig.EncryptionState",
12579            ))
12580        }
12581    }
12582}
12583
12584/// Create EncryptionConfig Request
12585#[derive(Clone, Default, PartialEq)]
12586#[non_exhaustive]
12587pub struct CreateEncryptionConfigRequest {
12588    /// Required. The location at which the EncryptionConfig is to be created.
12589    pub parent: std::string::String,
12590
12591    /// Required. The ID of the
12592    /// [EncryptionConfig][google.cloud.dataplex.v1.EncryptionConfig] to create.
12593    /// Currently, only a value of "default" is supported.
12594    ///
12595    /// [google.cloud.dataplex.v1.EncryptionConfig]: crate::model::EncryptionConfig
12596    pub encryption_config_id: std::string::String,
12597
12598    /// Required. The EncryptionConfig to create.
12599    pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
12600
12601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12602}
12603
12604impl CreateEncryptionConfigRequest {
12605    pub fn new() -> Self {
12606        std::default::Default::default()
12607    }
12608
12609    /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
12610    ///
12611    /// # Example
12612    /// ```ignore,no_run
12613    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12614    /// let x = CreateEncryptionConfigRequest::new().set_parent("example");
12615    /// ```
12616    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12617        self.parent = v.into();
12618        self
12619    }
12620
12621    /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
12622    ///
12623    /// # Example
12624    /// ```ignore,no_run
12625    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12626    /// let x = CreateEncryptionConfigRequest::new().set_encryption_config_id("example");
12627    /// ```
12628    pub fn set_encryption_config_id<T: std::convert::Into<std::string::String>>(
12629        mut self,
12630        v: T,
12631    ) -> Self {
12632        self.encryption_config_id = v.into();
12633        self
12634    }
12635
12636    /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
12637    ///
12638    /// # Example
12639    /// ```ignore,no_run
12640    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12641    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12642    /// let x = CreateEncryptionConfigRequest::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
12643    /// ```
12644    pub fn set_encryption_config<T>(mut self, v: T) -> Self
12645    where
12646        T: std::convert::Into<crate::model::EncryptionConfig>,
12647    {
12648        self.encryption_config = std::option::Option::Some(v.into());
12649        self
12650    }
12651
12652    /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
12653    ///
12654    /// # Example
12655    /// ```ignore,no_run
12656    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12657    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12658    /// let x = CreateEncryptionConfigRequest::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
12659    /// let x = CreateEncryptionConfigRequest::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
12660    /// ```
12661    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
12662    where
12663        T: std::convert::Into<crate::model::EncryptionConfig>,
12664    {
12665        self.encryption_config = v.map(|x| x.into());
12666        self
12667    }
12668}
12669
12670impl wkt::message::Message for CreateEncryptionConfigRequest {
12671    fn typename() -> &'static str {
12672        "type.googleapis.com/google.cloud.dataplex.v1.CreateEncryptionConfigRequest"
12673    }
12674}
12675
12676/// Get EncryptionConfig Request
12677#[derive(Clone, Default, PartialEq)]
12678#[non_exhaustive]
12679pub struct GetEncryptionConfigRequest {
12680    /// Required. The name of the EncryptionConfig to fetch.
12681    pub name: std::string::String,
12682
12683    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12684}
12685
12686impl GetEncryptionConfigRequest {
12687    pub fn new() -> Self {
12688        std::default::Default::default()
12689    }
12690
12691    /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
12692    ///
12693    /// # Example
12694    /// ```ignore,no_run
12695    /// # use google_cloud_dataplex_v1::model::GetEncryptionConfigRequest;
12696    /// let x = GetEncryptionConfigRequest::new().set_name("example");
12697    /// ```
12698    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12699        self.name = v.into();
12700        self
12701    }
12702}
12703
12704impl wkt::message::Message for GetEncryptionConfigRequest {
12705    fn typename() -> &'static str {
12706        "type.googleapis.com/google.cloud.dataplex.v1.GetEncryptionConfigRequest"
12707    }
12708}
12709
12710/// Update EncryptionConfig Request
12711#[derive(Clone, Default, PartialEq)]
12712#[non_exhaustive]
12713pub struct UpdateEncryptionConfigRequest {
12714    /// Required. The EncryptionConfig to update.
12715    pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
12716
12717    /// Optional. Mask of fields to update.
12718    /// The service treats an omitted field mask as an implied field mask
12719    /// equivalent to all fields that are populated (have a non-empty value).
12720    pub update_mask: std::option::Option<wkt::FieldMask>,
12721
12722    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12723}
12724
12725impl UpdateEncryptionConfigRequest {
12726    pub fn new() -> Self {
12727        std::default::Default::default()
12728    }
12729
12730    /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
12731    ///
12732    /// # Example
12733    /// ```ignore,no_run
12734    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12735    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12736    /// let x = UpdateEncryptionConfigRequest::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
12737    /// ```
12738    pub fn set_encryption_config<T>(mut self, v: T) -> Self
12739    where
12740        T: std::convert::Into<crate::model::EncryptionConfig>,
12741    {
12742        self.encryption_config = std::option::Option::Some(v.into());
12743        self
12744    }
12745
12746    /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
12747    ///
12748    /// # Example
12749    /// ```ignore,no_run
12750    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12751    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12752    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
12753    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
12754    /// ```
12755    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
12756    where
12757        T: std::convert::Into<crate::model::EncryptionConfig>,
12758    {
12759        self.encryption_config = v.map(|x| x.into());
12760        self
12761    }
12762
12763    /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
12764    ///
12765    /// # Example
12766    /// ```ignore,no_run
12767    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12768    /// use wkt::FieldMask;
12769    /// let x = UpdateEncryptionConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
12770    /// ```
12771    pub fn set_update_mask<T>(mut self, v: T) -> Self
12772    where
12773        T: std::convert::Into<wkt::FieldMask>,
12774    {
12775        self.update_mask = std::option::Option::Some(v.into());
12776        self
12777    }
12778
12779    /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
12780    ///
12781    /// # Example
12782    /// ```ignore,no_run
12783    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12784    /// use wkt::FieldMask;
12785    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
12786    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
12787    /// ```
12788    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12789    where
12790        T: std::convert::Into<wkt::FieldMask>,
12791    {
12792        self.update_mask = v.map(|x| x.into());
12793        self
12794    }
12795}
12796
12797impl wkt::message::Message for UpdateEncryptionConfigRequest {
12798    fn typename() -> &'static str {
12799        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEncryptionConfigRequest"
12800    }
12801}
12802
12803/// Delete EncryptionConfig Request
12804#[derive(Clone, Default, PartialEq)]
12805#[non_exhaustive]
12806pub struct DeleteEncryptionConfigRequest {
12807    /// Required. The name of the EncryptionConfig to delete.
12808    pub name: std::string::String,
12809
12810    /// Optional. Etag of the EncryptionConfig. This is a strong etag.
12811    pub etag: std::string::String,
12812
12813    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12814}
12815
12816impl DeleteEncryptionConfigRequest {
12817    pub fn new() -> Self {
12818        std::default::Default::default()
12819    }
12820
12821    /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
12822    ///
12823    /// # Example
12824    /// ```ignore,no_run
12825    /// # use google_cloud_dataplex_v1::model::DeleteEncryptionConfigRequest;
12826    /// let x = DeleteEncryptionConfigRequest::new().set_name("example");
12827    /// ```
12828    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12829        self.name = v.into();
12830        self
12831    }
12832
12833    /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
12834    ///
12835    /// # Example
12836    /// ```ignore,no_run
12837    /// # use google_cloud_dataplex_v1::model::DeleteEncryptionConfigRequest;
12838    /// let x = DeleteEncryptionConfigRequest::new().set_etag("example");
12839    /// ```
12840    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12841        self.etag = v.into();
12842        self
12843    }
12844}
12845
12846impl wkt::message::Message for DeleteEncryptionConfigRequest {
12847    fn typename() -> &'static str {
12848        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEncryptionConfigRequest"
12849    }
12850}
12851
12852/// List EncryptionConfigs Request
12853#[derive(Clone, Default, PartialEq)]
12854#[non_exhaustive]
12855pub struct ListEncryptionConfigsRequest {
12856    /// Required. The location for which the EncryptionConfig is to be listed.
12857    pub parent: std::string::String,
12858
12859    /// Optional. Maximum number of EncryptionConfigs to return. The service may
12860    /// return fewer than this value. If unspecified, at most 10 EncryptionConfigs
12861    /// will be returned. The maximum value is 1000; values above 1000 will be
12862    /// coerced to 1000.
12863    pub page_size: i32,
12864
12865    /// Optional. Page token received from a previous `ListEncryptionConfigs` call.
12866    /// Provide this to retrieve the subsequent page. When paginating, the
12867    /// parameters - filter and order_by provided to `ListEncryptionConfigs` must
12868    /// match the call that provided the page token.
12869    pub page_token: std::string::String,
12870
12871    /// Optional. Filter the EncryptionConfigs to be returned.
12872    /// Using bare literals: (These values will be matched anywhere it may appear
12873    /// in the object's field values)
12874    ///
12875    /// * filter=some_value
12876    ///   Using fields: (These values will be matched only in the specified field)
12877    /// * filter=some_field=some_value
12878    ///   Supported fields:
12879    /// * name, key, create_time, update_time, encryption_state
12880    ///   Example:
12881    /// * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config
12882    ///   conjunctions: (AND, OR, NOT)
12883    /// * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config
12884    ///   AND mode=CMEK
12885    ///   logical operators: (>, <, >=, <=, !=, =, :),
12886    /// * filter=create_time>2024-05-01T00:00:00.000Z
12887    pub filter: std::string::String,
12888
12889    /// Optional. Order by fields for the result.
12890    pub order_by: std::string::String,
12891
12892    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12893}
12894
12895impl ListEncryptionConfigsRequest {
12896    pub fn new() -> Self {
12897        std::default::Default::default()
12898    }
12899
12900    /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
12901    ///
12902    /// # Example
12903    /// ```ignore,no_run
12904    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12905    /// let x = ListEncryptionConfigsRequest::new().set_parent("example");
12906    /// ```
12907    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12908        self.parent = v.into();
12909        self
12910    }
12911
12912    /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
12913    ///
12914    /// # Example
12915    /// ```ignore,no_run
12916    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12917    /// let x = ListEncryptionConfigsRequest::new().set_page_size(42);
12918    /// ```
12919    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12920        self.page_size = v.into();
12921        self
12922    }
12923
12924    /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
12925    ///
12926    /// # Example
12927    /// ```ignore,no_run
12928    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12929    /// let x = ListEncryptionConfigsRequest::new().set_page_token("example");
12930    /// ```
12931    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12932        self.page_token = v.into();
12933        self
12934    }
12935
12936    /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
12937    ///
12938    /// # Example
12939    /// ```ignore,no_run
12940    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12941    /// let x = ListEncryptionConfigsRequest::new().set_filter("example");
12942    /// ```
12943    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12944        self.filter = v.into();
12945        self
12946    }
12947
12948    /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
12949    ///
12950    /// # Example
12951    /// ```ignore,no_run
12952    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12953    /// let x = ListEncryptionConfigsRequest::new().set_order_by("example");
12954    /// ```
12955    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12956        self.order_by = v.into();
12957        self
12958    }
12959}
12960
12961impl wkt::message::Message for ListEncryptionConfigsRequest {
12962    fn typename() -> &'static str {
12963        "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsRequest"
12964    }
12965}
12966
12967/// List EncryptionConfigs Response
12968#[derive(Clone, Default, PartialEq)]
12969#[non_exhaustive]
12970pub struct ListEncryptionConfigsResponse {
12971    /// The list of EncryptionConfigs under the given parent location.
12972    pub encryption_configs: std::vec::Vec<crate::model::EncryptionConfig>,
12973
12974    /// Token to retrieve the next page of results, or empty if there are no more
12975    /// results in the list.
12976    pub next_page_token: std::string::String,
12977
12978    /// Locations that could not be reached.
12979    pub unreachable_locations: std::vec::Vec<std::string::String>,
12980
12981    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12982}
12983
12984impl ListEncryptionConfigsResponse {
12985    pub fn new() -> Self {
12986        std::default::Default::default()
12987    }
12988
12989    /// Sets the value of [encryption_configs][crate::model::ListEncryptionConfigsResponse::encryption_configs].
12990    ///
12991    /// # Example
12992    /// ```ignore,no_run
12993    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsResponse;
12994    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12995    /// let x = ListEncryptionConfigsResponse::new()
12996    ///     .set_encryption_configs([
12997    ///         EncryptionConfig::default()/* use setters */,
12998    ///         EncryptionConfig::default()/* use (different) setters */,
12999    ///     ]);
13000    /// ```
13001    pub fn set_encryption_configs<T, V>(mut self, v: T) -> Self
13002    where
13003        T: std::iter::IntoIterator<Item = V>,
13004        V: std::convert::Into<crate::model::EncryptionConfig>,
13005    {
13006        use std::iter::Iterator;
13007        self.encryption_configs = v.into_iter().map(|i| i.into()).collect();
13008        self
13009    }
13010
13011    /// Sets the value of [next_page_token][crate::model::ListEncryptionConfigsResponse::next_page_token].
13012    ///
13013    /// # Example
13014    /// ```ignore,no_run
13015    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsResponse;
13016    /// let x = ListEncryptionConfigsResponse::new().set_next_page_token("example");
13017    /// ```
13018    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13019        self.next_page_token = v.into();
13020        self
13021    }
13022
13023    /// Sets the value of [unreachable_locations][crate::model::ListEncryptionConfigsResponse::unreachable_locations].
13024    ///
13025    /// # Example
13026    /// ```ignore,no_run
13027    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsResponse;
13028    /// let x = ListEncryptionConfigsResponse::new().set_unreachable_locations(["a", "b", "c"]);
13029    /// ```
13030    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
13031    where
13032        T: std::iter::IntoIterator<Item = V>,
13033        V: std::convert::Into<std::string::String>,
13034    {
13035        use std::iter::Iterator;
13036        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
13037        self
13038    }
13039}
13040
13041impl wkt::message::Message for ListEncryptionConfigsResponse {
13042    fn typename() -> &'static str {
13043        "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsResponse"
13044    }
13045}
13046
13047#[doc(hidden)]
13048impl gax::paginator::internal::PageableResponse for ListEncryptionConfigsResponse {
13049    type PageItem = crate::model::EncryptionConfig;
13050
13051    fn items(self) -> std::vec::Vec<Self::PageItem> {
13052        self.encryption_configs
13053    }
13054
13055    fn next_page_token(&self) -> std::string::String {
13056        use std::clone::Clone;
13057        self.next_page_token.clone()
13058    }
13059}
13060
13061/// Create content request.
13062#[derive(Clone, Default, PartialEq)]
13063#[non_exhaustive]
13064pub struct CreateContentRequest {
13065    /// Required. The resource name of the parent lake:
13066    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
13067    pub parent: std::string::String,
13068
13069    /// Required. Content resource.
13070    pub content: std::option::Option<crate::model::Content>,
13071
13072    /// Optional. Only validate the request, but do not perform mutations.
13073    /// The default is false.
13074    pub validate_only: bool,
13075
13076    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13077}
13078
13079impl CreateContentRequest {
13080    pub fn new() -> Self {
13081        std::default::Default::default()
13082    }
13083
13084    /// Sets the value of [parent][crate::model::CreateContentRequest::parent].
13085    ///
13086    /// # Example
13087    /// ```ignore,no_run
13088    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13089    /// let x = CreateContentRequest::new().set_parent("example");
13090    /// ```
13091    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13092        self.parent = v.into();
13093        self
13094    }
13095
13096    /// Sets the value of [content][crate::model::CreateContentRequest::content].
13097    ///
13098    /// # Example
13099    /// ```ignore,no_run
13100    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13101    /// use google_cloud_dataplex_v1::model::Content;
13102    /// let x = CreateContentRequest::new().set_content(Content::default()/* use setters */);
13103    /// ```
13104    pub fn set_content<T>(mut self, v: T) -> Self
13105    where
13106        T: std::convert::Into<crate::model::Content>,
13107    {
13108        self.content = std::option::Option::Some(v.into());
13109        self
13110    }
13111
13112    /// Sets or clears the value of [content][crate::model::CreateContentRequest::content].
13113    ///
13114    /// # Example
13115    /// ```ignore,no_run
13116    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13117    /// use google_cloud_dataplex_v1::model::Content;
13118    /// let x = CreateContentRequest::new().set_or_clear_content(Some(Content::default()/* use setters */));
13119    /// let x = CreateContentRequest::new().set_or_clear_content(None::<Content>);
13120    /// ```
13121    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
13122    where
13123        T: std::convert::Into<crate::model::Content>,
13124    {
13125        self.content = v.map(|x| x.into());
13126        self
13127    }
13128
13129    /// Sets the value of [validate_only][crate::model::CreateContentRequest::validate_only].
13130    ///
13131    /// # Example
13132    /// ```ignore,no_run
13133    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13134    /// let x = CreateContentRequest::new().set_validate_only(true);
13135    /// ```
13136    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13137        self.validate_only = v.into();
13138        self
13139    }
13140}
13141
13142impl wkt::message::Message for CreateContentRequest {
13143    fn typename() -> &'static str {
13144        "type.googleapis.com/google.cloud.dataplex.v1.CreateContentRequest"
13145    }
13146}
13147
13148/// Update content request.
13149#[derive(Clone, Default, PartialEq)]
13150#[non_exhaustive]
13151pub struct UpdateContentRequest {
13152    /// Required. Mask of fields to update.
13153    pub update_mask: std::option::Option<wkt::FieldMask>,
13154
13155    /// Required. Update description.
13156    /// Only fields specified in `update_mask` are updated.
13157    pub content: std::option::Option<crate::model::Content>,
13158
13159    /// Optional. Only validate the request, but do not perform mutations.
13160    /// The default is false.
13161    pub validate_only: bool,
13162
13163    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13164}
13165
13166impl UpdateContentRequest {
13167    pub fn new() -> Self {
13168        std::default::Default::default()
13169    }
13170
13171    /// Sets the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
13172    ///
13173    /// # Example
13174    /// ```ignore,no_run
13175    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13176    /// use wkt::FieldMask;
13177    /// let x = UpdateContentRequest::new().set_update_mask(FieldMask::default()/* use setters */);
13178    /// ```
13179    pub fn set_update_mask<T>(mut self, v: T) -> Self
13180    where
13181        T: std::convert::Into<wkt::FieldMask>,
13182    {
13183        self.update_mask = std::option::Option::Some(v.into());
13184        self
13185    }
13186
13187    /// Sets or clears the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
13188    ///
13189    /// # Example
13190    /// ```ignore,no_run
13191    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13192    /// use wkt::FieldMask;
13193    /// let x = UpdateContentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
13194    /// let x = UpdateContentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
13195    /// ```
13196    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13197    where
13198        T: std::convert::Into<wkt::FieldMask>,
13199    {
13200        self.update_mask = v.map(|x| x.into());
13201        self
13202    }
13203
13204    /// Sets the value of [content][crate::model::UpdateContentRequest::content].
13205    ///
13206    /// # Example
13207    /// ```ignore,no_run
13208    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13209    /// use google_cloud_dataplex_v1::model::Content;
13210    /// let x = UpdateContentRequest::new().set_content(Content::default()/* use setters */);
13211    /// ```
13212    pub fn set_content<T>(mut self, v: T) -> Self
13213    where
13214        T: std::convert::Into<crate::model::Content>,
13215    {
13216        self.content = std::option::Option::Some(v.into());
13217        self
13218    }
13219
13220    /// Sets or clears the value of [content][crate::model::UpdateContentRequest::content].
13221    ///
13222    /// # Example
13223    /// ```ignore,no_run
13224    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13225    /// use google_cloud_dataplex_v1::model::Content;
13226    /// let x = UpdateContentRequest::new().set_or_clear_content(Some(Content::default()/* use setters */));
13227    /// let x = UpdateContentRequest::new().set_or_clear_content(None::<Content>);
13228    /// ```
13229    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
13230    where
13231        T: std::convert::Into<crate::model::Content>,
13232    {
13233        self.content = v.map(|x| x.into());
13234        self
13235    }
13236
13237    /// Sets the value of [validate_only][crate::model::UpdateContentRequest::validate_only].
13238    ///
13239    /// # Example
13240    /// ```ignore,no_run
13241    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13242    /// let x = UpdateContentRequest::new().set_validate_only(true);
13243    /// ```
13244    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13245        self.validate_only = v.into();
13246        self
13247    }
13248}
13249
13250impl wkt::message::Message for UpdateContentRequest {
13251    fn typename() -> &'static str {
13252        "type.googleapis.com/google.cloud.dataplex.v1.UpdateContentRequest"
13253    }
13254}
13255
13256/// Delete content request.
13257#[derive(Clone, Default, PartialEq)]
13258#[non_exhaustive]
13259pub struct DeleteContentRequest {
13260    /// Required. The resource name of the content:
13261    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
13262    pub name: std::string::String,
13263
13264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13265}
13266
13267impl DeleteContentRequest {
13268    pub fn new() -> Self {
13269        std::default::Default::default()
13270    }
13271
13272    /// Sets the value of [name][crate::model::DeleteContentRequest::name].
13273    ///
13274    /// # Example
13275    /// ```ignore,no_run
13276    /// # use google_cloud_dataplex_v1::model::DeleteContentRequest;
13277    /// let x = DeleteContentRequest::new().set_name("example");
13278    /// ```
13279    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13280        self.name = v.into();
13281        self
13282    }
13283}
13284
13285impl wkt::message::Message for DeleteContentRequest {
13286    fn typename() -> &'static str {
13287        "type.googleapis.com/google.cloud.dataplex.v1.DeleteContentRequest"
13288    }
13289}
13290
13291/// List content request. Returns the BASIC Content view.
13292#[derive(Clone, Default, PartialEq)]
13293#[non_exhaustive]
13294pub struct ListContentRequest {
13295    /// Required. The resource name of the parent lake:
13296    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
13297    pub parent: std::string::String,
13298
13299    /// Optional. Maximum number of content to return. The service may return fewer
13300    /// than this value. If unspecified, at most 10 content will be returned. The
13301    /// maximum value is 1000; values above 1000 will be coerced to 1000.
13302    pub page_size: i32,
13303
13304    /// Optional. Page token received from a previous `ListContent` call. Provide
13305    /// this to retrieve the subsequent page. When paginating, all other parameters
13306    /// provided to `ListContent` must match the call that provided the page
13307    /// token.
13308    pub page_token: std::string::String,
13309
13310    /// Optional. Filter request. Filters are case-sensitive.
13311    /// The following formats are supported:
13312    ///
13313    /// labels.key1 = "value1"
13314    /// labels:key1
13315    /// type = "NOTEBOOK"
13316    /// type = "SQL_SCRIPT"
13317    ///
13318    /// These restrictions can be coinjoined with AND, OR and NOT conjunctions.
13319    pub filter: std::string::String,
13320
13321    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13322}
13323
13324impl ListContentRequest {
13325    pub fn new() -> Self {
13326        std::default::Default::default()
13327    }
13328
13329    /// Sets the value of [parent][crate::model::ListContentRequest::parent].
13330    ///
13331    /// # Example
13332    /// ```ignore,no_run
13333    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13334    /// let x = ListContentRequest::new().set_parent("example");
13335    /// ```
13336    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13337        self.parent = v.into();
13338        self
13339    }
13340
13341    /// Sets the value of [page_size][crate::model::ListContentRequest::page_size].
13342    ///
13343    /// # Example
13344    /// ```ignore,no_run
13345    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13346    /// let x = ListContentRequest::new().set_page_size(42);
13347    /// ```
13348    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13349        self.page_size = v.into();
13350        self
13351    }
13352
13353    /// Sets the value of [page_token][crate::model::ListContentRequest::page_token].
13354    ///
13355    /// # Example
13356    /// ```ignore,no_run
13357    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13358    /// let x = ListContentRequest::new().set_page_token("example");
13359    /// ```
13360    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13361        self.page_token = v.into();
13362        self
13363    }
13364
13365    /// Sets the value of [filter][crate::model::ListContentRequest::filter].
13366    ///
13367    /// # Example
13368    /// ```ignore,no_run
13369    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13370    /// let x = ListContentRequest::new().set_filter("example");
13371    /// ```
13372    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13373        self.filter = v.into();
13374        self
13375    }
13376}
13377
13378impl wkt::message::Message for ListContentRequest {
13379    fn typename() -> &'static str {
13380        "type.googleapis.com/google.cloud.dataplex.v1.ListContentRequest"
13381    }
13382}
13383
13384/// List content response.
13385#[derive(Clone, Default, PartialEq)]
13386#[non_exhaustive]
13387pub struct ListContentResponse {
13388    /// Content under the given parent lake.
13389    pub content: std::vec::Vec<crate::model::Content>,
13390
13391    /// Token to retrieve the next page of results, or empty if there are no more
13392    /// results in the list.
13393    pub next_page_token: std::string::String,
13394
13395    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13396}
13397
13398impl ListContentResponse {
13399    pub fn new() -> Self {
13400        std::default::Default::default()
13401    }
13402
13403    /// Sets the value of [content][crate::model::ListContentResponse::content].
13404    ///
13405    /// # Example
13406    /// ```ignore,no_run
13407    /// # use google_cloud_dataplex_v1::model::ListContentResponse;
13408    /// use google_cloud_dataplex_v1::model::Content;
13409    /// let x = ListContentResponse::new()
13410    ///     .set_content([
13411    ///         Content::default()/* use setters */,
13412    ///         Content::default()/* use (different) setters */,
13413    ///     ]);
13414    /// ```
13415    pub fn set_content<T, V>(mut self, v: T) -> Self
13416    where
13417        T: std::iter::IntoIterator<Item = V>,
13418        V: std::convert::Into<crate::model::Content>,
13419    {
13420        use std::iter::Iterator;
13421        self.content = v.into_iter().map(|i| i.into()).collect();
13422        self
13423    }
13424
13425    /// Sets the value of [next_page_token][crate::model::ListContentResponse::next_page_token].
13426    ///
13427    /// # Example
13428    /// ```ignore,no_run
13429    /// # use google_cloud_dataplex_v1::model::ListContentResponse;
13430    /// let x = ListContentResponse::new().set_next_page_token("example");
13431    /// ```
13432    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13433        self.next_page_token = v.into();
13434        self
13435    }
13436}
13437
13438impl wkt::message::Message for ListContentResponse {
13439    fn typename() -> &'static str {
13440        "type.googleapis.com/google.cloud.dataplex.v1.ListContentResponse"
13441    }
13442}
13443
13444#[doc(hidden)]
13445impl gax::paginator::internal::PageableResponse for ListContentResponse {
13446    type PageItem = crate::model::Content;
13447
13448    fn items(self) -> std::vec::Vec<Self::PageItem> {
13449        self.content
13450    }
13451
13452    fn next_page_token(&self) -> std::string::String {
13453        use std::clone::Clone;
13454        self.next_page_token.clone()
13455    }
13456}
13457
13458/// Get content request.
13459#[derive(Clone, Default, PartialEq)]
13460#[non_exhaustive]
13461pub struct GetContentRequest {
13462    /// Required. The resource name of the content:
13463    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
13464    pub name: std::string::String,
13465
13466    /// Optional. Specify content view to make a partial request.
13467    pub view: crate::model::get_content_request::ContentView,
13468
13469    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13470}
13471
13472impl GetContentRequest {
13473    pub fn new() -> Self {
13474        std::default::Default::default()
13475    }
13476
13477    /// Sets the value of [name][crate::model::GetContentRequest::name].
13478    ///
13479    /// # Example
13480    /// ```ignore,no_run
13481    /// # use google_cloud_dataplex_v1::model::GetContentRequest;
13482    /// let x = GetContentRequest::new().set_name("example");
13483    /// ```
13484    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13485        self.name = v.into();
13486        self
13487    }
13488
13489    /// Sets the value of [view][crate::model::GetContentRequest::view].
13490    ///
13491    /// # Example
13492    /// ```ignore,no_run
13493    /// # use google_cloud_dataplex_v1::model::GetContentRequest;
13494    /// use google_cloud_dataplex_v1::model::get_content_request::ContentView;
13495    /// let x0 = GetContentRequest::new().set_view(ContentView::Basic);
13496    /// let x1 = GetContentRequest::new().set_view(ContentView::Full);
13497    /// ```
13498    pub fn set_view<T: std::convert::Into<crate::model::get_content_request::ContentView>>(
13499        mut self,
13500        v: T,
13501    ) -> Self {
13502        self.view = v.into();
13503        self
13504    }
13505}
13506
13507impl wkt::message::Message for GetContentRequest {
13508    fn typename() -> &'static str {
13509        "type.googleapis.com/google.cloud.dataplex.v1.GetContentRequest"
13510    }
13511}
13512
13513/// Defines additional types related to [GetContentRequest].
13514pub mod get_content_request {
13515    #[allow(unused_imports)]
13516    use super::*;
13517
13518    /// Specifies whether the request should return the full or the partial
13519    /// representation.
13520    ///
13521    /// # Working with unknown values
13522    ///
13523    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13524    /// additional enum variants at any time. Adding new variants is not considered
13525    /// a breaking change. Applications should write their code in anticipation of:
13526    ///
13527    /// - New values appearing in future releases of the client library, **and**
13528    /// - New values received dynamically, without application changes.
13529    ///
13530    /// Please consult the [Working with enums] section in the user guide for some
13531    /// guidelines.
13532    ///
13533    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13534    #[derive(Clone, Debug, PartialEq)]
13535    #[non_exhaustive]
13536    pub enum ContentView {
13537        /// Content view not specified. Defaults to BASIC.
13538        /// The API will default to the BASIC view.
13539        Unspecified,
13540        /// Will not return the `data_text` field.
13541        Basic,
13542        /// Returns the complete proto.
13543        Full,
13544        /// If set, the enum was initialized with an unknown value.
13545        ///
13546        /// Applications can examine the value using [ContentView::value] or
13547        /// [ContentView::name].
13548        UnknownValue(content_view::UnknownValue),
13549    }
13550
13551    #[doc(hidden)]
13552    pub mod content_view {
13553        #[allow(unused_imports)]
13554        use super::*;
13555        #[derive(Clone, Debug, PartialEq)]
13556        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13557    }
13558
13559    impl ContentView {
13560        /// Gets the enum value.
13561        ///
13562        /// Returns `None` if the enum contains an unknown value deserialized from
13563        /// the string representation of enums.
13564        pub fn value(&self) -> std::option::Option<i32> {
13565            match self {
13566                Self::Unspecified => std::option::Option::Some(0),
13567                Self::Basic => std::option::Option::Some(1),
13568                Self::Full => std::option::Option::Some(2),
13569                Self::UnknownValue(u) => u.0.value(),
13570            }
13571        }
13572
13573        /// Gets the enum value as a string.
13574        ///
13575        /// Returns `None` if the enum contains an unknown value deserialized from
13576        /// the integer representation of enums.
13577        pub fn name(&self) -> std::option::Option<&str> {
13578            match self {
13579                Self::Unspecified => std::option::Option::Some("CONTENT_VIEW_UNSPECIFIED"),
13580                Self::Basic => std::option::Option::Some("BASIC"),
13581                Self::Full => std::option::Option::Some("FULL"),
13582                Self::UnknownValue(u) => u.0.name(),
13583            }
13584        }
13585    }
13586
13587    impl std::default::Default for ContentView {
13588        fn default() -> Self {
13589            use std::convert::From;
13590            Self::from(0)
13591        }
13592    }
13593
13594    impl std::fmt::Display for ContentView {
13595        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13596            wkt::internal::display_enum(f, self.name(), self.value())
13597        }
13598    }
13599
13600    impl std::convert::From<i32> for ContentView {
13601        fn from(value: i32) -> Self {
13602            match value {
13603                0 => Self::Unspecified,
13604                1 => Self::Basic,
13605                2 => Self::Full,
13606                _ => Self::UnknownValue(content_view::UnknownValue(
13607                    wkt::internal::UnknownEnumValue::Integer(value),
13608                )),
13609            }
13610        }
13611    }
13612
13613    impl std::convert::From<&str> for ContentView {
13614        fn from(value: &str) -> Self {
13615            use std::string::ToString;
13616            match value {
13617                "CONTENT_VIEW_UNSPECIFIED" => Self::Unspecified,
13618                "BASIC" => Self::Basic,
13619                "FULL" => Self::Full,
13620                _ => Self::UnknownValue(content_view::UnknownValue(
13621                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13622                )),
13623            }
13624        }
13625    }
13626
13627    impl serde::ser::Serialize for ContentView {
13628        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13629        where
13630            S: serde::Serializer,
13631        {
13632            match self {
13633                Self::Unspecified => serializer.serialize_i32(0),
13634                Self::Basic => serializer.serialize_i32(1),
13635                Self::Full => serializer.serialize_i32(2),
13636                Self::UnknownValue(u) => u.0.serialize(serializer),
13637            }
13638        }
13639    }
13640
13641    impl<'de> serde::de::Deserialize<'de> for ContentView {
13642        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13643        where
13644            D: serde::Deserializer<'de>,
13645        {
13646            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ContentView>::new(
13647                ".google.cloud.dataplex.v1.GetContentRequest.ContentView",
13648            ))
13649        }
13650    }
13651}
13652
13653/// Spec for a data discovery scan.
13654#[derive(Clone, Default, PartialEq)]
13655#[non_exhaustive]
13656pub struct DataDiscoverySpec {
13657    /// Optional. Configuration for metadata publishing.
13658    pub bigquery_publishing_config:
13659        std::option::Option<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
13660
13661    /// The configurations of the data discovery scan resource.
13662    pub resource_config: std::option::Option<crate::model::data_discovery_spec::ResourceConfig>,
13663
13664    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13665}
13666
13667impl DataDiscoverySpec {
13668    pub fn new() -> Self {
13669        std::default::Default::default()
13670    }
13671
13672    /// Sets the value of [bigquery_publishing_config][crate::model::DataDiscoverySpec::bigquery_publishing_config].
13673    ///
13674    /// # Example
13675    /// ```ignore,no_run
13676    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13677    /// use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13678    /// let x = DataDiscoverySpec::new().set_bigquery_publishing_config(BigQueryPublishingConfig::default()/* use setters */);
13679    /// ```
13680    pub fn set_bigquery_publishing_config<T>(mut self, v: T) -> Self
13681    where
13682        T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
13683    {
13684        self.bigquery_publishing_config = std::option::Option::Some(v.into());
13685        self
13686    }
13687
13688    /// Sets or clears the value of [bigquery_publishing_config][crate::model::DataDiscoverySpec::bigquery_publishing_config].
13689    ///
13690    /// # Example
13691    /// ```ignore,no_run
13692    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13693    /// use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13694    /// let x = DataDiscoverySpec::new().set_or_clear_bigquery_publishing_config(Some(BigQueryPublishingConfig::default()/* use setters */));
13695    /// let x = DataDiscoverySpec::new().set_or_clear_bigquery_publishing_config(None::<BigQueryPublishingConfig>);
13696    /// ```
13697    pub fn set_or_clear_bigquery_publishing_config<T>(mut self, v: std::option::Option<T>) -> Self
13698    where
13699        T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
13700    {
13701        self.bigquery_publishing_config = v.map(|x| x.into());
13702        self
13703    }
13704
13705    /// Sets the value of [resource_config][crate::model::DataDiscoverySpec::resource_config].
13706    ///
13707    /// Note that all the setters affecting `resource_config` are mutually
13708    /// exclusive.
13709    ///
13710    /// # Example
13711    /// ```ignore,no_run
13712    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13713    /// use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
13714    /// let x = DataDiscoverySpec::new().set_resource_config(Some(
13715    ///     google_cloud_dataplex_v1::model::data_discovery_spec::ResourceConfig::StorageConfig(StorageConfig::default().into())));
13716    /// ```
13717    pub fn set_resource_config<
13718        T: std::convert::Into<std::option::Option<crate::model::data_discovery_spec::ResourceConfig>>,
13719    >(
13720        mut self,
13721        v: T,
13722    ) -> Self {
13723        self.resource_config = v.into();
13724        self
13725    }
13726
13727    /// The value of [resource_config][crate::model::DataDiscoverySpec::resource_config]
13728    /// if it holds a `StorageConfig`, `None` if the field is not set or
13729    /// holds a different branch.
13730    pub fn storage_config(
13731        &self,
13732    ) -> std::option::Option<&std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>
13733    {
13734        #[allow(unreachable_patterns)]
13735        self.resource_config.as_ref().and_then(|v| match v {
13736            crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v) => {
13737                std::option::Option::Some(v)
13738            }
13739            _ => std::option::Option::None,
13740        })
13741    }
13742
13743    /// Sets the value of [resource_config][crate::model::DataDiscoverySpec::resource_config]
13744    /// to hold a `StorageConfig`.
13745    ///
13746    /// Note that all the setters affecting `resource_config` are
13747    /// mutually exclusive.
13748    ///
13749    /// # Example
13750    /// ```ignore,no_run
13751    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13752    /// use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
13753    /// let x = DataDiscoverySpec::new().set_storage_config(StorageConfig::default()/* use setters */);
13754    /// assert!(x.storage_config().is_some());
13755    /// ```
13756    pub fn set_storage_config<
13757        T: std::convert::Into<std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>,
13758    >(
13759        mut self,
13760        v: T,
13761    ) -> Self {
13762        self.resource_config = std::option::Option::Some(
13763            crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v.into()),
13764        );
13765        self
13766    }
13767}
13768
13769impl wkt::message::Message for DataDiscoverySpec {
13770    fn typename() -> &'static str {
13771        "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec"
13772    }
13773}
13774
13775/// Defines additional types related to [DataDiscoverySpec].
13776pub mod data_discovery_spec {
13777    #[allow(unused_imports)]
13778    use super::*;
13779
13780    /// Describes BigQuery publishing configurations.
13781    #[derive(Clone, Default, PartialEq)]
13782    #[non_exhaustive]
13783    pub struct BigQueryPublishingConfig {
13784        /// Optional. Determines whether to  publish discovered tables as BigLake
13785        /// external tables or non-BigLake external tables.
13786        pub table_type: crate::model::data_discovery_spec::big_query_publishing_config::TableType,
13787
13788        /// Optional. The BigQuery connection used to create BigLake tables.
13789        /// Must be in the form
13790        /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
13791        pub connection: std::string::String,
13792
13793        /// Optional. The location of the BigQuery dataset to publish BigLake
13794        /// external or non-BigLake external tables to.
13795        ///
13796        /// 1. If the Cloud Storage bucket is located in a multi-region bucket, then
13797        ///    BigQuery dataset can be in the same multi-region bucket or any single
13798        ///    region that is included in the same multi-region bucket. The datascan can
13799        ///    be created in any single region that is included in the same multi-region
13800        ///    bucket
13801        /// 1. If the Cloud Storage bucket is located in a dual-region bucket, then
13802        ///    BigQuery dataset can be located in regions that are included in the
13803        ///    dual-region bucket, or in a multi-region that includes the dual-region.
13804        ///    The datascan can be created in any single region that is included in the
13805        ///    same dual-region bucket.
13806        /// 1. If the Cloud Storage bucket is located in a single region, then
13807        ///    BigQuery dataset can be in the same single region or any multi-region
13808        ///    bucket that includes the same single region. The datascan will be created
13809        ///    in the same single region as the bucket.
13810        /// 1. If the BigQuery dataset is in single region, it must be in the same
13811        ///    single region as the datascan.
13812        ///
13813        /// For supported values, refer to
13814        /// <https://cloud.google.com/bigquery/docs/locations#supported_locations>.
13815        pub location: std::string::String,
13816
13817        /// Optional. The project of the BigQuery dataset to publish BigLake external
13818        /// or non-BigLake external tables to. If not specified, the project of the
13819        /// Cloud Storage bucket will be used. The format is
13820        /// "projects/{project_id_or_number}".
13821        pub project: std::string::String,
13822
13823        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13824    }
13825
13826    impl BigQueryPublishingConfig {
13827        pub fn new() -> Self {
13828            std::default::Default::default()
13829        }
13830
13831        /// Sets the value of [table_type][crate::model::data_discovery_spec::BigQueryPublishingConfig::table_type].
13832        ///
13833        /// # Example
13834        /// ```ignore,no_run
13835        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13836        /// use google_cloud_dataplex_v1::model::data_discovery_spec::big_query_publishing_config::TableType;
13837        /// let x0 = BigQueryPublishingConfig::new().set_table_type(TableType::External);
13838        /// let x1 = BigQueryPublishingConfig::new().set_table_type(TableType::Biglake);
13839        /// ```
13840        pub fn set_table_type<
13841            T: std::convert::Into<
13842                    crate::model::data_discovery_spec::big_query_publishing_config::TableType,
13843                >,
13844        >(
13845            mut self,
13846            v: T,
13847        ) -> Self {
13848            self.table_type = v.into();
13849            self
13850        }
13851
13852        /// Sets the value of [connection][crate::model::data_discovery_spec::BigQueryPublishingConfig::connection].
13853        ///
13854        /// # Example
13855        /// ```ignore,no_run
13856        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13857        /// let x = BigQueryPublishingConfig::new().set_connection("example");
13858        /// ```
13859        pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13860            self.connection = v.into();
13861            self
13862        }
13863
13864        /// Sets the value of [location][crate::model::data_discovery_spec::BigQueryPublishingConfig::location].
13865        ///
13866        /// # Example
13867        /// ```ignore,no_run
13868        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13869        /// let x = BigQueryPublishingConfig::new().set_location("example");
13870        /// ```
13871        pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13872            self.location = v.into();
13873            self
13874        }
13875
13876        /// Sets the value of [project][crate::model::data_discovery_spec::BigQueryPublishingConfig::project].
13877        ///
13878        /// # Example
13879        /// ```ignore,no_run
13880        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13881        /// let x = BigQueryPublishingConfig::new().set_project("example");
13882        /// ```
13883        pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13884            self.project = v.into();
13885            self
13886        }
13887    }
13888
13889    impl wkt::message::Message for BigQueryPublishingConfig {
13890        fn typename() -> &'static str {
13891            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig"
13892        }
13893    }
13894
13895    /// Defines additional types related to [BigQueryPublishingConfig].
13896    pub mod big_query_publishing_config {
13897        #[allow(unused_imports)]
13898        use super::*;
13899
13900        /// Determines how discovered tables are published.
13901        ///
13902        /// # Working with unknown values
13903        ///
13904        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13905        /// additional enum variants at any time. Adding new variants is not considered
13906        /// a breaking change. Applications should write their code in anticipation of:
13907        ///
13908        /// - New values appearing in future releases of the client library, **and**
13909        /// - New values received dynamically, without application changes.
13910        ///
13911        /// Please consult the [Working with enums] section in the user guide for some
13912        /// guidelines.
13913        ///
13914        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13915        #[derive(Clone, Debug, PartialEq)]
13916        #[non_exhaustive]
13917        pub enum TableType {
13918            /// Table type unspecified.
13919            Unspecified,
13920            /// Default. Discovered tables are published as BigQuery external tables
13921            /// whose data is accessed using the credentials of the user querying the
13922            /// table.
13923            External,
13924            /// Discovered tables are published as BigLake external tables whose data
13925            /// is accessed using the credentials of the associated BigQuery
13926            /// connection.
13927            Biglake,
13928            /// If set, the enum was initialized with an unknown value.
13929            ///
13930            /// Applications can examine the value using [TableType::value] or
13931            /// [TableType::name].
13932            UnknownValue(table_type::UnknownValue),
13933        }
13934
13935        #[doc(hidden)]
13936        pub mod table_type {
13937            #[allow(unused_imports)]
13938            use super::*;
13939            #[derive(Clone, Debug, PartialEq)]
13940            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13941        }
13942
13943        impl TableType {
13944            /// Gets the enum value.
13945            ///
13946            /// Returns `None` if the enum contains an unknown value deserialized from
13947            /// the string representation of enums.
13948            pub fn value(&self) -> std::option::Option<i32> {
13949                match self {
13950                    Self::Unspecified => std::option::Option::Some(0),
13951                    Self::External => std::option::Option::Some(1),
13952                    Self::Biglake => std::option::Option::Some(2),
13953                    Self::UnknownValue(u) => u.0.value(),
13954                }
13955            }
13956
13957            /// Gets the enum value as a string.
13958            ///
13959            /// Returns `None` if the enum contains an unknown value deserialized from
13960            /// the integer representation of enums.
13961            pub fn name(&self) -> std::option::Option<&str> {
13962                match self {
13963                    Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
13964                    Self::External => std::option::Option::Some("EXTERNAL"),
13965                    Self::Biglake => std::option::Option::Some("BIGLAKE"),
13966                    Self::UnknownValue(u) => u.0.name(),
13967                }
13968            }
13969        }
13970
13971        impl std::default::Default for TableType {
13972            fn default() -> Self {
13973                use std::convert::From;
13974                Self::from(0)
13975            }
13976        }
13977
13978        impl std::fmt::Display for TableType {
13979            fn fmt(
13980                &self,
13981                f: &mut std::fmt::Formatter<'_>,
13982            ) -> std::result::Result<(), std::fmt::Error> {
13983                wkt::internal::display_enum(f, self.name(), self.value())
13984            }
13985        }
13986
13987        impl std::convert::From<i32> for TableType {
13988            fn from(value: i32) -> Self {
13989                match value {
13990                    0 => Self::Unspecified,
13991                    1 => Self::External,
13992                    2 => Self::Biglake,
13993                    _ => Self::UnknownValue(table_type::UnknownValue(
13994                        wkt::internal::UnknownEnumValue::Integer(value),
13995                    )),
13996                }
13997            }
13998        }
13999
14000        impl std::convert::From<&str> for TableType {
14001            fn from(value: &str) -> Self {
14002                use std::string::ToString;
14003                match value {
14004                    "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
14005                    "EXTERNAL" => Self::External,
14006                    "BIGLAKE" => Self::Biglake,
14007                    _ => Self::UnknownValue(table_type::UnknownValue(
14008                        wkt::internal::UnknownEnumValue::String(value.to_string()),
14009                    )),
14010                }
14011            }
14012        }
14013
14014        impl serde::ser::Serialize for TableType {
14015            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14016            where
14017                S: serde::Serializer,
14018            {
14019                match self {
14020                    Self::Unspecified => serializer.serialize_i32(0),
14021                    Self::External => serializer.serialize_i32(1),
14022                    Self::Biglake => serializer.serialize_i32(2),
14023                    Self::UnknownValue(u) => u.0.serialize(serializer),
14024                }
14025            }
14026        }
14027
14028        impl<'de> serde::de::Deserialize<'de> for TableType {
14029            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14030            where
14031                D: serde::Deserializer<'de>,
14032            {
14033                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
14034                    ".google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType"))
14035            }
14036        }
14037    }
14038
14039    /// Configurations related to Cloud Storage as the data source.
14040    #[derive(Clone, Default, PartialEq)]
14041    #[non_exhaustive]
14042    pub struct StorageConfig {
14043        /// Optional. Defines the data to include during discovery when only a subset
14044        /// of the data should be considered. Provide a list of patterns that
14045        /// identify the data to include. For Cloud Storage bucket assets, these
14046        /// patterns are interpreted as glob patterns used to match object names. For
14047        /// BigQuery dataset assets, these patterns are interpreted as patterns to
14048        /// match table names.
14049        pub include_patterns: std::vec::Vec<std::string::String>,
14050
14051        /// Optional. Defines the data to exclude during discovery. Provide a list of
14052        /// patterns that identify the data to exclude. For Cloud Storage bucket
14053        /// assets, these patterns are interpreted as glob patterns used to match
14054        /// object names. For BigQuery dataset assets, these patterns are interpreted
14055        /// as patterns to match table names.
14056        pub exclude_patterns: std::vec::Vec<std::string::String>,
14057
14058        /// Optional. Configuration for CSV data.
14059        pub csv_options:
14060            std::option::Option<crate::model::data_discovery_spec::storage_config::CsvOptions>,
14061
14062        /// Optional. Configuration for JSON data.
14063        pub json_options:
14064            std::option::Option<crate::model::data_discovery_spec::storage_config::JsonOptions>,
14065
14066        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14067    }
14068
14069    impl StorageConfig {
14070        pub fn new() -> Self {
14071            std::default::Default::default()
14072        }
14073
14074        /// Sets the value of [include_patterns][crate::model::data_discovery_spec::StorageConfig::include_patterns].
14075        ///
14076        /// # Example
14077        /// ```ignore,no_run
14078        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14079        /// let x = StorageConfig::new().set_include_patterns(["a", "b", "c"]);
14080        /// ```
14081        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
14082        where
14083            T: std::iter::IntoIterator<Item = V>,
14084            V: std::convert::Into<std::string::String>,
14085        {
14086            use std::iter::Iterator;
14087            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
14088            self
14089        }
14090
14091        /// Sets the value of [exclude_patterns][crate::model::data_discovery_spec::StorageConfig::exclude_patterns].
14092        ///
14093        /// # Example
14094        /// ```ignore,no_run
14095        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14096        /// let x = StorageConfig::new().set_exclude_patterns(["a", "b", "c"]);
14097        /// ```
14098        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
14099        where
14100            T: std::iter::IntoIterator<Item = V>,
14101            V: std::convert::Into<std::string::String>,
14102        {
14103            use std::iter::Iterator;
14104            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
14105            self
14106        }
14107
14108        /// Sets the value of [csv_options][crate::model::data_discovery_spec::StorageConfig::csv_options].
14109        ///
14110        /// # Example
14111        /// ```ignore,no_run
14112        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14113        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14114        /// let x = StorageConfig::new().set_csv_options(CsvOptions::default()/* use setters */);
14115        /// ```
14116        pub fn set_csv_options<T>(mut self, v: T) -> Self
14117        where
14118            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
14119        {
14120            self.csv_options = std::option::Option::Some(v.into());
14121            self
14122        }
14123
14124        /// Sets or clears the value of [csv_options][crate::model::data_discovery_spec::StorageConfig::csv_options].
14125        ///
14126        /// # Example
14127        /// ```ignore,no_run
14128        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14129        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14130        /// let x = StorageConfig::new().set_or_clear_csv_options(Some(CsvOptions::default()/* use setters */));
14131        /// let x = StorageConfig::new().set_or_clear_csv_options(None::<CsvOptions>);
14132        /// ```
14133        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
14134        where
14135            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
14136        {
14137            self.csv_options = v.map(|x| x.into());
14138            self
14139        }
14140
14141        /// Sets the value of [json_options][crate::model::data_discovery_spec::StorageConfig::json_options].
14142        ///
14143        /// # Example
14144        /// ```ignore,no_run
14145        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14146        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14147        /// let x = StorageConfig::new().set_json_options(JsonOptions::default()/* use setters */);
14148        /// ```
14149        pub fn set_json_options<T>(mut self, v: T) -> Self
14150        where
14151            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
14152        {
14153            self.json_options = std::option::Option::Some(v.into());
14154            self
14155        }
14156
14157        /// Sets or clears the value of [json_options][crate::model::data_discovery_spec::StorageConfig::json_options].
14158        ///
14159        /// # Example
14160        /// ```ignore,no_run
14161        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14162        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14163        /// let x = StorageConfig::new().set_or_clear_json_options(Some(JsonOptions::default()/* use setters */));
14164        /// let x = StorageConfig::new().set_or_clear_json_options(None::<JsonOptions>);
14165        /// ```
14166        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
14167        where
14168            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
14169        {
14170            self.json_options = v.map(|x| x.into());
14171            self
14172        }
14173    }
14174
14175    impl wkt::message::Message for StorageConfig {
14176        fn typename() -> &'static str {
14177            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig"
14178        }
14179    }
14180
14181    /// Defines additional types related to [StorageConfig].
14182    pub mod storage_config {
14183        #[allow(unused_imports)]
14184        use super::*;
14185
14186        /// Describes CSV and similar semi-structured data formats.
14187        #[derive(Clone, Default, PartialEq)]
14188        #[non_exhaustive]
14189        pub struct CsvOptions {
14190            /// Optional. The number of rows to interpret as header rows that should be
14191            /// skipped when reading data rows.
14192            pub header_rows: i32,
14193
14194            /// Optional. The delimiter that is used to separate values. The default is
14195            /// `,` (comma).
14196            pub delimiter: std::string::String,
14197
14198            /// Optional. The character encoding of the data. The default is UTF-8.
14199            pub encoding: std::string::String,
14200
14201            /// Optional. Whether to disable the inference of data types for CSV data.
14202            /// If true, all columns are registered as strings.
14203            pub type_inference_disabled: bool,
14204
14205            /// Optional. The character used to quote column values. Accepts `"`
14206            /// (double quotation mark) or `'` (single quotation mark). If unspecified,
14207            /// defaults to `"` (double quotation mark).
14208            pub quote: std::string::String,
14209
14210            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14211        }
14212
14213        impl CsvOptions {
14214            pub fn new() -> Self {
14215                std::default::Default::default()
14216            }
14217
14218            /// Sets the value of [header_rows][crate::model::data_discovery_spec::storage_config::CsvOptions::header_rows].
14219            ///
14220            /// # Example
14221            /// ```ignore,no_run
14222            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14223            /// let x = CsvOptions::new().set_header_rows(42);
14224            /// ```
14225            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14226                self.header_rows = v.into();
14227                self
14228            }
14229
14230            /// Sets the value of [delimiter][crate::model::data_discovery_spec::storage_config::CsvOptions::delimiter].
14231            ///
14232            /// # Example
14233            /// ```ignore,no_run
14234            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14235            /// let x = CsvOptions::new().set_delimiter("example");
14236            /// ```
14237            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
14238                mut self,
14239                v: T,
14240            ) -> Self {
14241                self.delimiter = v.into();
14242                self
14243            }
14244
14245            /// Sets the value of [encoding][crate::model::data_discovery_spec::storage_config::CsvOptions::encoding].
14246            ///
14247            /// # Example
14248            /// ```ignore,no_run
14249            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14250            /// let x = CsvOptions::new().set_encoding("example");
14251            /// ```
14252            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
14253                mut self,
14254                v: T,
14255            ) -> Self {
14256                self.encoding = v.into();
14257                self
14258            }
14259
14260            /// Sets the value of [type_inference_disabled][crate::model::data_discovery_spec::storage_config::CsvOptions::type_inference_disabled].
14261            ///
14262            /// # Example
14263            /// ```ignore,no_run
14264            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14265            /// let x = CsvOptions::new().set_type_inference_disabled(true);
14266            /// ```
14267            pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
14268                mut self,
14269                v: T,
14270            ) -> Self {
14271                self.type_inference_disabled = v.into();
14272                self
14273            }
14274
14275            /// Sets the value of [quote][crate::model::data_discovery_spec::storage_config::CsvOptions::quote].
14276            ///
14277            /// # Example
14278            /// ```ignore,no_run
14279            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14280            /// let x = CsvOptions::new().set_quote("example");
14281            /// ```
14282            pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14283                self.quote = v.into();
14284                self
14285            }
14286        }
14287
14288        impl wkt::message::Message for CsvOptions {
14289            fn typename() -> &'static str {
14290                "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions"
14291            }
14292        }
14293
14294        /// Describes JSON data format.
14295        #[derive(Clone, Default, PartialEq)]
14296        #[non_exhaustive]
14297        pub struct JsonOptions {
14298            /// Optional. The character encoding of the data. The default is UTF-8.
14299            pub encoding: std::string::String,
14300
14301            /// Optional. Whether to disable the inference of data types for JSON data.
14302            /// If true, all columns are registered as their primitive types
14303            /// (strings, number, or boolean).
14304            pub type_inference_disabled: bool,
14305
14306            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14307        }
14308
14309        impl JsonOptions {
14310            pub fn new() -> Self {
14311                std::default::Default::default()
14312            }
14313
14314            /// Sets the value of [encoding][crate::model::data_discovery_spec::storage_config::JsonOptions::encoding].
14315            ///
14316            /// # Example
14317            /// ```ignore,no_run
14318            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14319            /// let x = JsonOptions::new().set_encoding("example");
14320            /// ```
14321            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
14322                mut self,
14323                v: T,
14324            ) -> Self {
14325                self.encoding = v.into();
14326                self
14327            }
14328
14329            /// Sets the value of [type_inference_disabled][crate::model::data_discovery_spec::storage_config::JsonOptions::type_inference_disabled].
14330            ///
14331            /// # Example
14332            /// ```ignore,no_run
14333            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14334            /// let x = JsonOptions::new().set_type_inference_disabled(true);
14335            /// ```
14336            pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
14337                mut self,
14338                v: T,
14339            ) -> Self {
14340                self.type_inference_disabled = v.into();
14341                self
14342            }
14343        }
14344
14345        impl wkt::message::Message for JsonOptions {
14346            fn typename() -> &'static str {
14347                "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions"
14348            }
14349        }
14350    }
14351
14352    /// The configurations of the data discovery scan resource.
14353    #[derive(Clone, Debug, PartialEq)]
14354    #[non_exhaustive]
14355    pub enum ResourceConfig {
14356        /// Cloud Storage related configurations.
14357        StorageConfig(std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>),
14358    }
14359}
14360
14361/// The output of a data discovery scan.
14362#[derive(Clone, Default, PartialEq)]
14363#[non_exhaustive]
14364pub struct DataDiscoveryResult {
14365    /// Output only. Configuration for metadata publishing.
14366    pub bigquery_publishing:
14367        std::option::Option<crate::model::data_discovery_result::BigQueryPublishing>,
14368
14369    /// Output only. Describes result statistics of a data scan discovery job.
14370    pub scan_statistics: std::option::Option<crate::model::data_discovery_result::ScanStatistics>,
14371
14372    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14373}
14374
14375impl DataDiscoveryResult {
14376    pub fn new() -> Self {
14377        std::default::Default::default()
14378    }
14379
14380    /// Sets the value of [bigquery_publishing][crate::model::DataDiscoveryResult::bigquery_publishing].
14381    ///
14382    /// # Example
14383    /// ```ignore,no_run
14384    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14385    /// use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14386    /// let x = DataDiscoveryResult::new().set_bigquery_publishing(BigQueryPublishing::default()/* use setters */);
14387    /// ```
14388    pub fn set_bigquery_publishing<T>(mut self, v: T) -> Self
14389    where
14390        T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
14391    {
14392        self.bigquery_publishing = std::option::Option::Some(v.into());
14393        self
14394    }
14395
14396    /// Sets or clears the value of [bigquery_publishing][crate::model::DataDiscoveryResult::bigquery_publishing].
14397    ///
14398    /// # Example
14399    /// ```ignore,no_run
14400    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14401    /// use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14402    /// let x = DataDiscoveryResult::new().set_or_clear_bigquery_publishing(Some(BigQueryPublishing::default()/* use setters */));
14403    /// let x = DataDiscoveryResult::new().set_or_clear_bigquery_publishing(None::<BigQueryPublishing>);
14404    /// ```
14405    pub fn set_or_clear_bigquery_publishing<T>(mut self, v: std::option::Option<T>) -> Self
14406    where
14407        T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
14408    {
14409        self.bigquery_publishing = v.map(|x| x.into());
14410        self
14411    }
14412
14413    /// Sets the value of [scan_statistics][crate::model::DataDiscoveryResult::scan_statistics].
14414    ///
14415    /// # Example
14416    /// ```ignore,no_run
14417    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14418    /// use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14419    /// let x = DataDiscoveryResult::new().set_scan_statistics(ScanStatistics::default()/* use setters */);
14420    /// ```
14421    pub fn set_scan_statistics<T>(mut self, v: T) -> Self
14422    where
14423        T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
14424    {
14425        self.scan_statistics = std::option::Option::Some(v.into());
14426        self
14427    }
14428
14429    /// Sets or clears the value of [scan_statistics][crate::model::DataDiscoveryResult::scan_statistics].
14430    ///
14431    /// # Example
14432    /// ```ignore,no_run
14433    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14434    /// use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14435    /// let x = DataDiscoveryResult::new().set_or_clear_scan_statistics(Some(ScanStatistics::default()/* use setters */));
14436    /// let x = DataDiscoveryResult::new().set_or_clear_scan_statistics(None::<ScanStatistics>);
14437    /// ```
14438    pub fn set_or_clear_scan_statistics<T>(mut self, v: std::option::Option<T>) -> Self
14439    where
14440        T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
14441    {
14442        self.scan_statistics = v.map(|x| x.into());
14443        self
14444    }
14445}
14446
14447impl wkt::message::Message for DataDiscoveryResult {
14448    fn typename() -> &'static str {
14449        "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult"
14450    }
14451}
14452
14453/// Defines additional types related to [DataDiscoveryResult].
14454pub mod data_discovery_result {
14455    #[allow(unused_imports)]
14456    use super::*;
14457
14458    /// Describes BigQuery publishing configurations.
14459    #[derive(Clone, Default, PartialEq)]
14460    #[non_exhaustive]
14461    pub struct BigQueryPublishing {
14462        /// Output only. The BigQuery dataset the discovered tables are published to.
14463        pub dataset: std::string::String,
14464
14465        /// Output only. The location of the BigQuery publishing dataset.
14466        pub location: std::string::String,
14467
14468        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14469    }
14470
14471    impl BigQueryPublishing {
14472        pub fn new() -> Self {
14473            std::default::Default::default()
14474        }
14475
14476        /// Sets the value of [dataset][crate::model::data_discovery_result::BigQueryPublishing::dataset].
14477        ///
14478        /// # Example
14479        /// ```ignore,no_run
14480        /// # use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14481        /// let x = BigQueryPublishing::new().set_dataset("example");
14482        /// ```
14483        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14484            self.dataset = v.into();
14485            self
14486        }
14487
14488        /// Sets the value of [location][crate::model::data_discovery_result::BigQueryPublishing::location].
14489        ///
14490        /// # Example
14491        /// ```ignore,no_run
14492        /// # use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14493        /// let x = BigQueryPublishing::new().set_location("example");
14494        /// ```
14495        pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14496            self.location = v.into();
14497            self
14498        }
14499    }
14500
14501    impl wkt::message::Message for BigQueryPublishing {
14502        fn typename() -> &'static str {
14503            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing"
14504        }
14505    }
14506
14507    /// Describes result statistics of a data scan discovery job.
14508    #[derive(Clone, Default, PartialEq)]
14509    #[non_exhaustive]
14510    pub struct ScanStatistics {
14511        /// The number of files scanned.
14512        pub scanned_file_count: i32,
14513
14514        /// The data processed in bytes.
14515        pub data_processed_bytes: i64,
14516
14517        /// The number of files excluded.
14518        pub files_excluded: i32,
14519
14520        /// The number of tables created.
14521        pub tables_created: i32,
14522
14523        /// The number of tables deleted.
14524        pub tables_deleted: i32,
14525
14526        /// The number of tables updated.
14527        pub tables_updated: i32,
14528
14529        /// The number of filesets created.
14530        pub filesets_created: i32,
14531
14532        /// The number of filesets deleted.
14533        pub filesets_deleted: i32,
14534
14535        /// The number of filesets updated.
14536        pub filesets_updated: i32,
14537
14538        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14539    }
14540
14541    impl ScanStatistics {
14542        pub fn new() -> Self {
14543            std::default::Default::default()
14544        }
14545
14546        /// Sets the value of [scanned_file_count][crate::model::data_discovery_result::ScanStatistics::scanned_file_count].
14547        ///
14548        /// # Example
14549        /// ```ignore,no_run
14550        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14551        /// let x = ScanStatistics::new().set_scanned_file_count(42);
14552        /// ```
14553        pub fn set_scanned_file_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14554            self.scanned_file_count = v.into();
14555            self
14556        }
14557
14558        /// Sets the value of [data_processed_bytes][crate::model::data_discovery_result::ScanStatistics::data_processed_bytes].
14559        ///
14560        /// # Example
14561        /// ```ignore,no_run
14562        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14563        /// let x = ScanStatistics::new().set_data_processed_bytes(42);
14564        /// ```
14565        pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14566            self.data_processed_bytes = v.into();
14567            self
14568        }
14569
14570        /// Sets the value of [files_excluded][crate::model::data_discovery_result::ScanStatistics::files_excluded].
14571        ///
14572        /// # Example
14573        /// ```ignore,no_run
14574        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14575        /// let x = ScanStatistics::new().set_files_excluded(42);
14576        /// ```
14577        pub fn set_files_excluded<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14578            self.files_excluded = v.into();
14579            self
14580        }
14581
14582        /// Sets the value of [tables_created][crate::model::data_discovery_result::ScanStatistics::tables_created].
14583        ///
14584        /// # Example
14585        /// ```ignore,no_run
14586        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14587        /// let x = ScanStatistics::new().set_tables_created(42);
14588        /// ```
14589        pub fn set_tables_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14590            self.tables_created = v.into();
14591            self
14592        }
14593
14594        /// Sets the value of [tables_deleted][crate::model::data_discovery_result::ScanStatistics::tables_deleted].
14595        ///
14596        /// # Example
14597        /// ```ignore,no_run
14598        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14599        /// let x = ScanStatistics::new().set_tables_deleted(42);
14600        /// ```
14601        pub fn set_tables_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14602            self.tables_deleted = v.into();
14603            self
14604        }
14605
14606        /// Sets the value of [tables_updated][crate::model::data_discovery_result::ScanStatistics::tables_updated].
14607        ///
14608        /// # Example
14609        /// ```ignore,no_run
14610        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14611        /// let x = ScanStatistics::new().set_tables_updated(42);
14612        /// ```
14613        pub fn set_tables_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14614            self.tables_updated = v.into();
14615            self
14616        }
14617
14618        /// Sets the value of [filesets_created][crate::model::data_discovery_result::ScanStatistics::filesets_created].
14619        ///
14620        /// # Example
14621        /// ```ignore,no_run
14622        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14623        /// let x = ScanStatistics::new().set_filesets_created(42);
14624        /// ```
14625        pub fn set_filesets_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14626            self.filesets_created = v.into();
14627            self
14628        }
14629
14630        /// Sets the value of [filesets_deleted][crate::model::data_discovery_result::ScanStatistics::filesets_deleted].
14631        ///
14632        /// # Example
14633        /// ```ignore,no_run
14634        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14635        /// let x = ScanStatistics::new().set_filesets_deleted(42);
14636        /// ```
14637        pub fn set_filesets_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14638            self.filesets_deleted = v.into();
14639            self
14640        }
14641
14642        /// Sets the value of [filesets_updated][crate::model::data_discovery_result::ScanStatistics::filesets_updated].
14643        ///
14644        /// # Example
14645        /// ```ignore,no_run
14646        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14647        /// let x = ScanStatistics::new().set_filesets_updated(42);
14648        /// ```
14649        pub fn set_filesets_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14650            self.filesets_updated = v.into();
14651            self
14652        }
14653    }
14654
14655    impl wkt::message::Message for ScanStatistics {
14656        fn typename() -> &'static str {
14657            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatistics"
14658        }
14659    }
14660}
14661
14662/// DataDocumentation scan related spec.
14663#[derive(Clone, Default, PartialEq)]
14664#[non_exhaustive]
14665pub struct DataDocumentationSpec {
14666    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14667}
14668
14669impl DataDocumentationSpec {
14670    pub fn new() -> Self {
14671        std::default::Default::default()
14672    }
14673}
14674
14675impl wkt::message::Message for DataDocumentationSpec {
14676    fn typename() -> &'static str {
14677        "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationSpec"
14678    }
14679}
14680
14681/// The output of a DataDocumentation scan.
14682#[derive(Clone, Default, PartialEq)]
14683#[non_exhaustive]
14684pub struct DataDocumentationResult {
14685    /// The result of the data documentation scan.
14686    pub result: std::option::Option<crate::model::data_documentation_result::Result>,
14687
14688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14689}
14690
14691impl DataDocumentationResult {
14692    pub fn new() -> Self {
14693        std::default::Default::default()
14694    }
14695
14696    /// Sets the value of [result][crate::model::DataDocumentationResult::result].
14697    ///
14698    /// Note that all the setters affecting `result` are mutually
14699    /// exclusive.
14700    ///
14701    /// # Example
14702    /// ```ignore,no_run
14703    /// # use google_cloud_dataplex_v1::model::DataDocumentationResult;
14704    /// use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14705    /// let x = DataDocumentationResult::new().set_result(Some(
14706    ///     google_cloud_dataplex_v1::model::data_documentation_result::Result::TableResult(TableResult::default().into())));
14707    /// ```
14708    pub fn set_result<
14709        T: std::convert::Into<std::option::Option<crate::model::data_documentation_result::Result>>,
14710    >(
14711        mut self,
14712        v: T,
14713    ) -> Self {
14714        self.result = v.into();
14715        self
14716    }
14717
14718    /// The value of [result][crate::model::DataDocumentationResult::result]
14719    /// if it holds a `TableResult`, `None` if the field is not set or
14720    /// holds a different branch.
14721    pub fn table_result(
14722        &self,
14723    ) -> std::option::Option<&std::boxed::Box<crate::model::data_documentation_result::TableResult>>
14724    {
14725        #[allow(unreachable_patterns)]
14726        self.result.as_ref().and_then(|v| match v {
14727            crate::model::data_documentation_result::Result::TableResult(v) => {
14728                std::option::Option::Some(v)
14729            }
14730            _ => std::option::Option::None,
14731        })
14732    }
14733
14734    /// Sets the value of [result][crate::model::DataDocumentationResult::result]
14735    /// to hold a `TableResult`.
14736    ///
14737    /// Note that all the setters affecting `result` are
14738    /// mutually exclusive.
14739    ///
14740    /// # Example
14741    /// ```ignore,no_run
14742    /// # use google_cloud_dataplex_v1::model::DataDocumentationResult;
14743    /// use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14744    /// let x = DataDocumentationResult::new().set_table_result(TableResult::default()/* use setters */);
14745    /// assert!(x.table_result().is_some());
14746    /// ```
14747    pub fn set_table_result<
14748        T: std::convert::Into<std::boxed::Box<crate::model::data_documentation_result::TableResult>>,
14749    >(
14750        mut self,
14751        v: T,
14752    ) -> Self {
14753        self.result = std::option::Option::Some(
14754            crate::model::data_documentation_result::Result::TableResult(v.into()),
14755        );
14756        self
14757    }
14758}
14759
14760impl wkt::message::Message for DataDocumentationResult {
14761    fn typename() -> &'static str {
14762        "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult"
14763    }
14764}
14765
14766/// Defines additional types related to [DataDocumentationResult].
14767pub mod data_documentation_result {
14768    #[allow(unused_imports)]
14769    use super::*;
14770
14771    /// Generated metadata about the table.
14772    #[derive(Clone, Default, PartialEq)]
14773    #[non_exhaustive]
14774    pub struct TableResult {
14775        /// Output only. The service-qualified full resource name of the cloud
14776        /// resource. Ex:
14777        /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
14778        pub name: std::string::String,
14779
14780        /// Output only. Generated description of the table.
14781        pub overview: std::string::String,
14782
14783        /// Output only. Schema of the table with generated metadata of the columns
14784        /// in the schema.
14785        pub schema: std::option::Option<crate::model::data_documentation_result::Schema>,
14786
14787        /// Output only. Sample SQL queries for the table.
14788        pub queries: std::vec::Vec<crate::model::data_documentation_result::Query>,
14789
14790        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14791    }
14792
14793    impl TableResult {
14794        pub fn new() -> Self {
14795            std::default::Default::default()
14796        }
14797
14798        /// Sets the value of [name][crate::model::data_documentation_result::TableResult::name].
14799        ///
14800        /// # Example
14801        /// ```ignore,no_run
14802        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14803        /// let x = TableResult::new().set_name("example");
14804        /// ```
14805        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14806            self.name = v.into();
14807            self
14808        }
14809
14810        /// Sets the value of [overview][crate::model::data_documentation_result::TableResult::overview].
14811        ///
14812        /// # Example
14813        /// ```ignore,no_run
14814        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14815        /// let x = TableResult::new().set_overview("example");
14816        /// ```
14817        pub fn set_overview<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14818            self.overview = v.into();
14819            self
14820        }
14821
14822        /// Sets the value of [schema][crate::model::data_documentation_result::TableResult::schema].
14823        ///
14824        /// # Example
14825        /// ```ignore,no_run
14826        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14827        /// use google_cloud_dataplex_v1::model::data_documentation_result::Schema;
14828        /// let x = TableResult::new().set_schema(Schema::default()/* use setters */);
14829        /// ```
14830        pub fn set_schema<T>(mut self, v: T) -> Self
14831        where
14832            T: std::convert::Into<crate::model::data_documentation_result::Schema>,
14833        {
14834            self.schema = std::option::Option::Some(v.into());
14835            self
14836        }
14837
14838        /// Sets or clears the value of [schema][crate::model::data_documentation_result::TableResult::schema].
14839        ///
14840        /// # Example
14841        /// ```ignore,no_run
14842        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14843        /// use google_cloud_dataplex_v1::model::data_documentation_result::Schema;
14844        /// let x = TableResult::new().set_or_clear_schema(Some(Schema::default()/* use setters */));
14845        /// let x = TableResult::new().set_or_clear_schema(None::<Schema>);
14846        /// ```
14847        pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
14848        where
14849            T: std::convert::Into<crate::model::data_documentation_result::Schema>,
14850        {
14851            self.schema = v.map(|x| x.into());
14852            self
14853        }
14854
14855        /// Sets the value of [queries][crate::model::data_documentation_result::TableResult::queries].
14856        ///
14857        /// # Example
14858        /// ```ignore,no_run
14859        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14860        /// use google_cloud_dataplex_v1::model::data_documentation_result::Query;
14861        /// let x = TableResult::new()
14862        ///     .set_queries([
14863        ///         Query::default()/* use setters */,
14864        ///         Query::default()/* use (different) setters */,
14865        ///     ]);
14866        /// ```
14867        pub fn set_queries<T, V>(mut self, v: T) -> Self
14868        where
14869            T: std::iter::IntoIterator<Item = V>,
14870            V: std::convert::Into<crate::model::data_documentation_result::Query>,
14871        {
14872            use std::iter::Iterator;
14873            self.queries = v.into_iter().map(|i| i.into()).collect();
14874            self
14875        }
14876    }
14877
14878    impl wkt::message::Message for TableResult {
14879        fn typename() -> &'static str {
14880            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.TableResult"
14881        }
14882    }
14883
14884    /// A sample SQL query in data documentation.
14885    #[derive(Clone, Default, PartialEq)]
14886    #[non_exhaustive]
14887    pub struct Query {
14888        /// Output only. The SQL query string which can be executed.
14889        pub sql: std::string::String,
14890
14891        /// Output only. The description for the query.
14892        pub description: std::string::String,
14893
14894        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14895    }
14896
14897    impl Query {
14898        pub fn new() -> Self {
14899            std::default::Default::default()
14900        }
14901
14902        /// Sets the value of [sql][crate::model::data_documentation_result::Query::sql].
14903        ///
14904        /// # Example
14905        /// ```ignore,no_run
14906        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Query;
14907        /// let x = Query::new().set_sql("example");
14908        /// ```
14909        pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14910            self.sql = v.into();
14911            self
14912        }
14913
14914        /// Sets the value of [description][crate::model::data_documentation_result::Query::description].
14915        ///
14916        /// # Example
14917        /// ```ignore,no_run
14918        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Query;
14919        /// let x = Query::new().set_description("example");
14920        /// ```
14921        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14922            self.description = v.into();
14923            self
14924        }
14925    }
14926
14927    impl wkt::message::Message for Query {
14928        fn typename() -> &'static str {
14929            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Query"
14930        }
14931    }
14932
14933    /// Schema of the table with generated metadata of columns.
14934    #[derive(Clone, Default, PartialEq)]
14935    #[non_exhaustive]
14936    pub struct Schema {
14937        /// Output only. The list of columns.
14938        pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
14939
14940        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14941    }
14942
14943    impl Schema {
14944        pub fn new() -> Self {
14945            std::default::Default::default()
14946        }
14947
14948        /// Sets the value of [fields][crate::model::data_documentation_result::Schema::fields].
14949        ///
14950        /// # Example
14951        /// ```ignore,no_run
14952        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Schema;
14953        /// use google_cloud_dataplex_v1::model::data_documentation_result::Field;
14954        /// let x = Schema::new()
14955        ///     .set_fields([
14956        ///         Field::default()/* use setters */,
14957        ///         Field::default()/* use (different) setters */,
14958        ///     ]);
14959        /// ```
14960        pub fn set_fields<T, V>(mut self, v: T) -> Self
14961        where
14962            T: std::iter::IntoIterator<Item = V>,
14963            V: std::convert::Into<crate::model::data_documentation_result::Field>,
14964        {
14965            use std::iter::Iterator;
14966            self.fields = v.into_iter().map(|i| i.into()).collect();
14967            self
14968        }
14969    }
14970
14971    impl wkt::message::Message for Schema {
14972        fn typename() -> &'static str {
14973            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Schema"
14974        }
14975    }
14976
14977    /// Column of a table with generated metadata and nested fields.
14978    #[derive(Clone, Default, PartialEq)]
14979    #[non_exhaustive]
14980    pub struct Field {
14981        /// Output only. The name of the column.
14982        pub name: std::string::String,
14983
14984        /// Output only. Generated description for columns and fields.
14985        pub description: std::string::String,
14986
14987        /// Output only. Nested fields.
14988        pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
14989
14990        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14991    }
14992
14993    impl Field {
14994        pub fn new() -> Self {
14995            std::default::Default::default()
14996        }
14997
14998        /// Sets the value of [name][crate::model::data_documentation_result::Field::name].
14999        ///
15000        /// # Example
15001        /// ```ignore,no_run
15002        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Field;
15003        /// let x = Field::new().set_name("example");
15004        /// ```
15005        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15006            self.name = v.into();
15007            self
15008        }
15009
15010        /// Sets the value of [description][crate::model::data_documentation_result::Field::description].
15011        ///
15012        /// # Example
15013        /// ```ignore,no_run
15014        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Field;
15015        /// let x = Field::new().set_description("example");
15016        /// ```
15017        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15018            self.description = v.into();
15019            self
15020        }
15021
15022        /// Sets the value of [fields][crate::model::data_documentation_result::Field::fields].
15023        ///
15024        /// # Example
15025        /// ```ignore,no_run
15026        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Field;
15027        /// let x = Field::new()
15028        ///     .set_fields([
15029        ///         Field::default()/* use setters */,
15030        ///         Field::default()/* use (different) setters */,
15031        ///     ]);
15032        /// ```
15033        pub fn set_fields<T, V>(mut self, v: T) -> Self
15034        where
15035            T: std::iter::IntoIterator<Item = V>,
15036            V: std::convert::Into<crate::model::data_documentation_result::Field>,
15037        {
15038            use std::iter::Iterator;
15039            self.fields = v.into_iter().map(|i| i.into()).collect();
15040            self
15041        }
15042    }
15043
15044    impl wkt::message::Message for Field {
15045        fn typename() -> &'static str {
15046            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Field"
15047        }
15048    }
15049
15050    /// The result of the data documentation scan.
15051    #[derive(Clone, Debug, PartialEq)]
15052    #[non_exhaustive]
15053    pub enum Result {
15054        /// Output only. Table result for insights.
15055        TableResult(std::boxed::Box<crate::model::data_documentation_result::TableResult>),
15056    }
15057}
15058
15059/// DataProfileScan related setting.
15060#[derive(Clone, Default, PartialEq)]
15061#[non_exhaustive]
15062pub struct DataProfileSpec {
15063    /// Optional. The percentage of the records to be selected from the dataset for
15064    /// DataScan.
15065    ///
15066    /// * Value can range between 0.0 and 100.0 with up to 3 significant decimal
15067    ///   digits.
15068    /// * Sampling is not applied if `sampling_percent` is not specified, 0 or
15069    ///
15070    pub sampling_percent: f32,
15071
15072    /// Optional. A filter applied to all rows in a single DataScan job.
15073    /// The filter needs to be a valid SQL expression for a WHERE clause in
15074    /// BigQuery standard SQL syntax.
15075    /// Example: col1 >= 0 AND col2 < 10
15076    pub row_filter: std::string::String,
15077
15078    /// Optional. Actions to take upon job completion..
15079    pub post_scan_actions: std::option::Option<crate::model::data_profile_spec::PostScanActions>,
15080
15081    /// Optional. The fields to include in data profile.
15082    ///
15083    /// If not specified, all fields at the time of profile scan job execution are
15084    /// included, except for ones listed in `exclude_fields`.
15085    pub include_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
15086
15087    /// Optional. The fields to exclude from data profile.
15088    ///
15089    /// If specified, the fields will be excluded from data profile, regardless of
15090    /// `include_fields` value.
15091    pub exclude_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
15092
15093    /// Optional. If set, the latest DataScan job result will be published as
15094    /// Dataplex Universal Catalog metadata.
15095    pub catalog_publishing_enabled: bool,
15096
15097    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15098}
15099
15100impl DataProfileSpec {
15101    pub fn new() -> Self {
15102        std::default::Default::default()
15103    }
15104
15105    /// Sets the value of [sampling_percent][crate::model::DataProfileSpec::sampling_percent].
15106    ///
15107    /// # Example
15108    /// ```ignore,no_run
15109    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15110    /// let x = DataProfileSpec::new().set_sampling_percent(42.0);
15111    /// ```
15112    pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
15113        self.sampling_percent = v.into();
15114        self
15115    }
15116
15117    /// Sets the value of [row_filter][crate::model::DataProfileSpec::row_filter].
15118    ///
15119    /// # Example
15120    /// ```ignore,no_run
15121    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15122    /// let x = DataProfileSpec::new().set_row_filter("example");
15123    /// ```
15124    pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15125        self.row_filter = v.into();
15126        self
15127    }
15128
15129    /// Sets the value of [post_scan_actions][crate::model::DataProfileSpec::post_scan_actions].
15130    ///
15131    /// # Example
15132    /// ```ignore,no_run
15133    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15134    /// use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15135    /// let x = DataProfileSpec::new().set_post_scan_actions(PostScanActions::default()/* use setters */);
15136    /// ```
15137    pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
15138    where
15139        T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
15140    {
15141        self.post_scan_actions = std::option::Option::Some(v.into());
15142        self
15143    }
15144
15145    /// Sets or clears the value of [post_scan_actions][crate::model::DataProfileSpec::post_scan_actions].
15146    ///
15147    /// # Example
15148    /// ```ignore,no_run
15149    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15150    /// use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15151    /// let x = DataProfileSpec::new().set_or_clear_post_scan_actions(Some(PostScanActions::default()/* use setters */));
15152    /// let x = DataProfileSpec::new().set_or_clear_post_scan_actions(None::<PostScanActions>);
15153    /// ```
15154    pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
15155    where
15156        T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
15157    {
15158        self.post_scan_actions = v.map(|x| x.into());
15159        self
15160    }
15161
15162    /// Sets the value of [include_fields][crate::model::DataProfileSpec::include_fields].
15163    ///
15164    /// # Example
15165    /// ```ignore,no_run
15166    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15167    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15168    /// let x = DataProfileSpec::new().set_include_fields(SelectedFields::default()/* use setters */);
15169    /// ```
15170    pub fn set_include_fields<T>(mut self, v: T) -> Self
15171    where
15172        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15173    {
15174        self.include_fields = std::option::Option::Some(v.into());
15175        self
15176    }
15177
15178    /// Sets or clears the value of [include_fields][crate::model::DataProfileSpec::include_fields].
15179    ///
15180    /// # Example
15181    /// ```ignore,no_run
15182    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15183    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15184    /// let x = DataProfileSpec::new().set_or_clear_include_fields(Some(SelectedFields::default()/* use setters */));
15185    /// let x = DataProfileSpec::new().set_or_clear_include_fields(None::<SelectedFields>);
15186    /// ```
15187    pub fn set_or_clear_include_fields<T>(mut self, v: std::option::Option<T>) -> Self
15188    where
15189        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15190    {
15191        self.include_fields = v.map(|x| x.into());
15192        self
15193    }
15194
15195    /// Sets the value of [exclude_fields][crate::model::DataProfileSpec::exclude_fields].
15196    ///
15197    /// # Example
15198    /// ```ignore,no_run
15199    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15200    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15201    /// let x = DataProfileSpec::new().set_exclude_fields(SelectedFields::default()/* use setters */);
15202    /// ```
15203    pub fn set_exclude_fields<T>(mut self, v: T) -> Self
15204    where
15205        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15206    {
15207        self.exclude_fields = std::option::Option::Some(v.into());
15208        self
15209    }
15210
15211    /// Sets or clears the value of [exclude_fields][crate::model::DataProfileSpec::exclude_fields].
15212    ///
15213    /// # Example
15214    /// ```ignore,no_run
15215    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15216    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15217    /// let x = DataProfileSpec::new().set_or_clear_exclude_fields(Some(SelectedFields::default()/* use setters */));
15218    /// let x = DataProfileSpec::new().set_or_clear_exclude_fields(None::<SelectedFields>);
15219    /// ```
15220    pub fn set_or_clear_exclude_fields<T>(mut self, v: std::option::Option<T>) -> Self
15221    where
15222        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15223    {
15224        self.exclude_fields = v.map(|x| x.into());
15225        self
15226    }
15227
15228    /// Sets the value of [catalog_publishing_enabled][crate::model::DataProfileSpec::catalog_publishing_enabled].
15229    ///
15230    /// # Example
15231    /// ```ignore,no_run
15232    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15233    /// let x = DataProfileSpec::new().set_catalog_publishing_enabled(true);
15234    /// ```
15235    pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15236        self.catalog_publishing_enabled = v.into();
15237        self
15238    }
15239}
15240
15241impl wkt::message::Message for DataProfileSpec {
15242    fn typename() -> &'static str {
15243        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec"
15244    }
15245}
15246
15247/// Defines additional types related to [DataProfileSpec].
15248pub mod data_profile_spec {
15249    #[allow(unused_imports)]
15250    use super::*;
15251
15252    /// The configuration of post scan actions of DataProfileScan job.
15253    #[derive(Clone, Default, PartialEq)]
15254    #[non_exhaustive]
15255    pub struct PostScanActions {
15256        /// Optional. If set, results will be exported to the provided BigQuery
15257        /// table.
15258        pub bigquery_export:
15259            std::option::Option<crate::model::data_profile_spec::post_scan_actions::BigQueryExport>,
15260
15261        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15262    }
15263
15264    impl PostScanActions {
15265        pub fn new() -> Self {
15266            std::default::Default::default()
15267        }
15268
15269        /// Sets the value of [bigquery_export][crate::model::data_profile_spec::PostScanActions::bigquery_export].
15270        ///
15271        /// # Example
15272        /// ```ignore,no_run
15273        /// # use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15274        /// use google_cloud_dataplex_v1::model::data_profile_spec::post_scan_actions::BigQueryExport;
15275        /// let x = PostScanActions::new().set_bigquery_export(BigQueryExport::default()/* use setters */);
15276        /// ```
15277        pub fn set_bigquery_export<T>(mut self, v: T) -> Self
15278        where
15279            T: std::convert::Into<
15280                    crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
15281                >,
15282        {
15283            self.bigquery_export = std::option::Option::Some(v.into());
15284            self
15285        }
15286
15287        /// Sets or clears the value of [bigquery_export][crate::model::data_profile_spec::PostScanActions::bigquery_export].
15288        ///
15289        /// # Example
15290        /// ```ignore,no_run
15291        /// # use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15292        /// use google_cloud_dataplex_v1::model::data_profile_spec::post_scan_actions::BigQueryExport;
15293        /// let x = PostScanActions::new().set_or_clear_bigquery_export(Some(BigQueryExport::default()/* use setters */));
15294        /// let x = PostScanActions::new().set_or_clear_bigquery_export(None::<BigQueryExport>);
15295        /// ```
15296        pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
15297        where
15298            T: std::convert::Into<
15299                    crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
15300                >,
15301        {
15302            self.bigquery_export = v.map(|x| x.into());
15303            self
15304        }
15305    }
15306
15307    impl wkt::message::Message for PostScanActions {
15308        fn typename() -> &'static str {
15309            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions"
15310        }
15311    }
15312
15313    /// Defines additional types related to [PostScanActions].
15314    pub mod post_scan_actions {
15315        #[allow(unused_imports)]
15316        use super::*;
15317
15318        /// The configuration of BigQuery export post scan action.
15319        #[derive(Clone, Default, PartialEq)]
15320        #[non_exhaustive]
15321        pub struct BigQueryExport {
15322            /// Optional. The BigQuery table to export DataProfileScan results to.
15323            /// Format:
15324            /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
15325            pub results_table: std::string::String,
15326
15327            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15328        }
15329
15330        impl BigQueryExport {
15331            pub fn new() -> Self {
15332                std::default::Default::default()
15333            }
15334
15335            /// Sets the value of [results_table][crate::model::data_profile_spec::post_scan_actions::BigQueryExport::results_table].
15336            ///
15337            /// # Example
15338            /// ```ignore,no_run
15339            /// # use google_cloud_dataplex_v1::model::data_profile_spec::post_scan_actions::BigQueryExport;
15340            /// let x = BigQueryExport::new().set_results_table("example");
15341            /// ```
15342            pub fn set_results_table<T: std::convert::Into<std::string::String>>(
15343                mut self,
15344                v: T,
15345            ) -> Self {
15346                self.results_table = v.into();
15347                self
15348            }
15349        }
15350
15351        impl wkt::message::Message for BigQueryExport {
15352            fn typename() -> &'static str {
15353                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport"
15354            }
15355        }
15356    }
15357
15358    /// The specification for fields to include or exclude in data profile scan.
15359    #[derive(Clone, Default, PartialEq)]
15360    #[non_exhaustive]
15361    pub struct SelectedFields {
15362        /// Optional. Expected input is a list of fully qualified names of fields as
15363        /// in the schema.
15364        ///
15365        /// Only top-level field names for nested fields are supported.
15366        /// For instance, if 'x' is of nested field type, listing 'x' is supported
15367        /// but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
15368        /// 'x'.
15369        pub field_names: std::vec::Vec<std::string::String>,
15370
15371        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15372    }
15373
15374    impl SelectedFields {
15375        pub fn new() -> Self {
15376            std::default::Default::default()
15377        }
15378
15379        /// Sets the value of [field_names][crate::model::data_profile_spec::SelectedFields::field_names].
15380        ///
15381        /// # Example
15382        /// ```ignore,no_run
15383        /// # use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15384        /// let x = SelectedFields::new().set_field_names(["a", "b", "c"]);
15385        /// ```
15386        pub fn set_field_names<T, V>(mut self, v: T) -> Self
15387        where
15388            T: std::iter::IntoIterator<Item = V>,
15389            V: std::convert::Into<std::string::String>,
15390        {
15391            use std::iter::Iterator;
15392            self.field_names = v.into_iter().map(|i| i.into()).collect();
15393            self
15394        }
15395    }
15396
15397    impl wkt::message::Message for SelectedFields {
15398        fn typename() -> &'static str {
15399            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.SelectedFields"
15400        }
15401    }
15402}
15403
15404/// DataProfileResult defines the output of DataProfileScan. Each field of the
15405/// table will have field type specific profile result.
15406#[derive(Clone, Default, PartialEq)]
15407#[non_exhaustive]
15408pub struct DataProfileResult {
15409    /// Output only. The count of rows scanned.
15410    pub row_count: i64,
15411
15412    /// Output only. The profile information per field.
15413    pub profile: std::option::Option<crate::model::data_profile_result::Profile>,
15414
15415    /// Output only. The data scanned for this result.
15416    pub scanned_data: std::option::Option<crate::model::ScannedData>,
15417
15418    /// Output only. The result of post scan actions.
15419    pub post_scan_actions_result:
15420        std::option::Option<crate::model::data_profile_result::PostScanActionsResult>,
15421
15422    /// Output only. The status of publishing the data scan as Dataplex Universal
15423    /// Catalog metadata.
15424    pub catalog_publishing_status:
15425        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
15426
15427    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15428}
15429
15430impl DataProfileResult {
15431    pub fn new() -> Self {
15432        std::default::Default::default()
15433    }
15434
15435    /// Sets the value of [row_count][crate::model::DataProfileResult::row_count].
15436    ///
15437    /// # Example
15438    /// ```ignore,no_run
15439    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15440    /// let x = DataProfileResult::new().set_row_count(42);
15441    /// ```
15442    pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15443        self.row_count = v.into();
15444        self
15445    }
15446
15447    /// Sets the value of [profile][crate::model::DataProfileResult::profile].
15448    ///
15449    /// # Example
15450    /// ```ignore,no_run
15451    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15452    /// use google_cloud_dataplex_v1::model::data_profile_result::Profile;
15453    /// let x = DataProfileResult::new().set_profile(Profile::default()/* use setters */);
15454    /// ```
15455    pub fn set_profile<T>(mut self, v: T) -> Self
15456    where
15457        T: std::convert::Into<crate::model::data_profile_result::Profile>,
15458    {
15459        self.profile = std::option::Option::Some(v.into());
15460        self
15461    }
15462
15463    /// Sets or clears the value of [profile][crate::model::DataProfileResult::profile].
15464    ///
15465    /// # Example
15466    /// ```ignore,no_run
15467    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15468    /// use google_cloud_dataplex_v1::model::data_profile_result::Profile;
15469    /// let x = DataProfileResult::new().set_or_clear_profile(Some(Profile::default()/* use setters */));
15470    /// let x = DataProfileResult::new().set_or_clear_profile(None::<Profile>);
15471    /// ```
15472    pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
15473    where
15474        T: std::convert::Into<crate::model::data_profile_result::Profile>,
15475    {
15476        self.profile = v.map(|x| x.into());
15477        self
15478    }
15479
15480    /// Sets the value of [scanned_data][crate::model::DataProfileResult::scanned_data].
15481    ///
15482    /// # Example
15483    /// ```ignore,no_run
15484    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15485    /// use google_cloud_dataplex_v1::model::ScannedData;
15486    /// let x = DataProfileResult::new().set_scanned_data(ScannedData::default()/* use setters */);
15487    /// ```
15488    pub fn set_scanned_data<T>(mut self, v: T) -> Self
15489    where
15490        T: std::convert::Into<crate::model::ScannedData>,
15491    {
15492        self.scanned_data = std::option::Option::Some(v.into());
15493        self
15494    }
15495
15496    /// Sets or clears the value of [scanned_data][crate::model::DataProfileResult::scanned_data].
15497    ///
15498    /// # Example
15499    /// ```ignore,no_run
15500    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15501    /// use google_cloud_dataplex_v1::model::ScannedData;
15502    /// let x = DataProfileResult::new().set_or_clear_scanned_data(Some(ScannedData::default()/* use setters */));
15503    /// let x = DataProfileResult::new().set_or_clear_scanned_data(None::<ScannedData>);
15504    /// ```
15505    pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
15506    where
15507        T: std::convert::Into<crate::model::ScannedData>,
15508    {
15509        self.scanned_data = v.map(|x| x.into());
15510        self
15511    }
15512
15513    /// Sets the value of [post_scan_actions_result][crate::model::DataProfileResult::post_scan_actions_result].
15514    ///
15515    /// # Example
15516    /// ```ignore,no_run
15517    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15518    /// use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
15519    /// let x = DataProfileResult::new().set_post_scan_actions_result(PostScanActionsResult::default()/* use setters */);
15520    /// ```
15521    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
15522    where
15523        T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
15524    {
15525        self.post_scan_actions_result = std::option::Option::Some(v.into());
15526        self
15527    }
15528
15529    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataProfileResult::post_scan_actions_result].
15530    ///
15531    /// # Example
15532    /// ```ignore,no_run
15533    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15534    /// use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
15535    /// let x = DataProfileResult::new().set_or_clear_post_scan_actions_result(Some(PostScanActionsResult::default()/* use setters */));
15536    /// let x = DataProfileResult::new().set_or_clear_post_scan_actions_result(None::<PostScanActionsResult>);
15537    /// ```
15538    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
15539    where
15540        T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
15541    {
15542        self.post_scan_actions_result = v.map(|x| x.into());
15543        self
15544    }
15545
15546    /// Sets the value of [catalog_publishing_status][crate::model::DataProfileResult::catalog_publishing_status].
15547    ///
15548    /// # Example
15549    /// ```ignore,no_run
15550    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15551    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
15552    /// let x = DataProfileResult::new().set_catalog_publishing_status(DataScanCatalogPublishingStatus::default()/* use setters */);
15553    /// ```
15554    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
15555    where
15556        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
15557    {
15558        self.catalog_publishing_status = std::option::Option::Some(v.into());
15559        self
15560    }
15561
15562    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataProfileResult::catalog_publishing_status].
15563    ///
15564    /// # Example
15565    /// ```ignore,no_run
15566    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15567    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
15568    /// let x = DataProfileResult::new().set_or_clear_catalog_publishing_status(Some(DataScanCatalogPublishingStatus::default()/* use setters */));
15569    /// let x = DataProfileResult::new().set_or_clear_catalog_publishing_status(None::<DataScanCatalogPublishingStatus>);
15570    /// ```
15571    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
15572    where
15573        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
15574    {
15575        self.catalog_publishing_status = v.map(|x| x.into());
15576        self
15577    }
15578}
15579
15580impl wkt::message::Message for DataProfileResult {
15581    fn typename() -> &'static str {
15582        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult"
15583    }
15584}
15585
15586/// Defines additional types related to [DataProfileResult].
15587pub mod data_profile_result {
15588    #[allow(unused_imports)]
15589    use super::*;
15590
15591    /// Contains name, type, mode and field type specific profile information.
15592    #[derive(Clone, Default, PartialEq)]
15593    #[non_exhaustive]
15594    pub struct Profile {
15595        /// Output only. List of fields with structural and profile information for
15596        /// each field.
15597        pub fields: std::vec::Vec<crate::model::data_profile_result::profile::Field>,
15598
15599        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15600    }
15601
15602    impl Profile {
15603        pub fn new() -> Self {
15604            std::default::Default::default()
15605        }
15606
15607        /// Sets the value of [fields][crate::model::data_profile_result::Profile::fields].
15608        ///
15609        /// # Example
15610        /// ```ignore,no_run
15611        /// # use google_cloud_dataplex_v1::model::data_profile_result::Profile;
15612        /// use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15613        /// let x = Profile::new()
15614        ///     .set_fields([
15615        ///         Field::default()/* use setters */,
15616        ///         Field::default()/* use (different) setters */,
15617        ///     ]);
15618        /// ```
15619        pub fn set_fields<T, V>(mut self, v: T) -> Self
15620        where
15621            T: std::iter::IntoIterator<Item = V>,
15622            V: std::convert::Into<crate::model::data_profile_result::profile::Field>,
15623        {
15624            use std::iter::Iterator;
15625            self.fields = v.into_iter().map(|i| i.into()).collect();
15626            self
15627        }
15628    }
15629
15630    impl wkt::message::Message for Profile {
15631        fn typename() -> &'static str {
15632            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile"
15633        }
15634    }
15635
15636    /// Defines additional types related to [Profile].
15637    pub mod profile {
15638        #[allow(unused_imports)]
15639        use super::*;
15640
15641        /// A field within a table.
15642        #[derive(Clone, Default, PartialEq)]
15643        #[non_exhaustive]
15644        pub struct Field {
15645            /// Output only. The name of the field.
15646            pub name: std::string::String,
15647
15648            /// Output only. The data type retrieved from the schema of the data
15649            /// source. For instance, for a BigQuery native table, it is the [BigQuery
15650            /// Table
15651            /// Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema).
15652            /// For a Dataplex Universal Catalog Entity, it is the [Entity
15653            /// Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3).
15654            pub r#type: std::string::String,
15655
15656            /// Output only. The mode of the field. Possible values include:
15657            ///
15658            /// * REQUIRED, if it is a required field.
15659            /// * NULLABLE, if it is an optional field.
15660            /// * REPEATED, if it is a repeated field.
15661            pub mode: std::string::String,
15662
15663            /// Output only. Profile information for the corresponding field.
15664            pub profile:
15665                std::option::Option<crate::model::data_profile_result::profile::field::ProfileInfo>,
15666
15667            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15668        }
15669
15670        impl Field {
15671            pub fn new() -> Self {
15672                std::default::Default::default()
15673            }
15674
15675            /// Sets the value of [name][crate::model::data_profile_result::profile::Field::name].
15676            ///
15677            /// # Example
15678            /// ```ignore,no_run
15679            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15680            /// let x = Field::new().set_name("example");
15681            /// ```
15682            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15683                self.name = v.into();
15684                self
15685            }
15686
15687            /// Sets the value of [r#type][crate::model::data_profile_result::profile::Field::type].
15688            ///
15689            /// # Example
15690            /// ```ignore,no_run
15691            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15692            /// let x = Field::new().set_type("example");
15693            /// ```
15694            pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15695                self.r#type = v.into();
15696                self
15697            }
15698
15699            /// Sets the value of [mode][crate::model::data_profile_result::profile::Field::mode].
15700            ///
15701            /// # Example
15702            /// ```ignore,no_run
15703            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15704            /// let x = Field::new().set_mode("example");
15705            /// ```
15706            pub fn set_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15707                self.mode = v.into();
15708                self
15709            }
15710
15711            /// Sets the value of [profile][crate::model::data_profile_result::profile::Field::profile].
15712            ///
15713            /// # Example
15714            /// ```ignore,no_run
15715            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15716            /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15717            /// let x = Field::new().set_profile(ProfileInfo::default()/* use setters */);
15718            /// ```
15719            pub fn set_profile<T>(mut self, v: T) -> Self
15720            where
15721                T: std::convert::Into<
15722                        crate::model::data_profile_result::profile::field::ProfileInfo,
15723                    >,
15724            {
15725                self.profile = std::option::Option::Some(v.into());
15726                self
15727            }
15728
15729            /// Sets or clears the value of [profile][crate::model::data_profile_result::profile::Field::profile].
15730            ///
15731            /// # Example
15732            /// ```ignore,no_run
15733            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15734            /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15735            /// let x = Field::new().set_or_clear_profile(Some(ProfileInfo::default()/* use setters */));
15736            /// let x = Field::new().set_or_clear_profile(None::<ProfileInfo>);
15737            /// ```
15738            pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
15739            where
15740                T: std::convert::Into<
15741                        crate::model::data_profile_result::profile::field::ProfileInfo,
15742                    >,
15743            {
15744                self.profile = v.map(|x| x.into());
15745                self
15746            }
15747        }
15748
15749        impl wkt::message::Message for Field {
15750            fn typename() -> &'static str {
15751                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field"
15752            }
15753        }
15754
15755        /// Defines additional types related to [Field].
15756        pub mod field {
15757            #[allow(unused_imports)]
15758            use super::*;
15759
15760            /// The profile information for each field type.
15761            #[derive(Clone, Default, PartialEq)]
15762            #[non_exhaustive]
15763            pub struct ProfileInfo {
15764                /// Output only. Ratio of rows with null value against total scanned
15765                /// rows.
15766                pub null_ratio: f64,
15767
15768                /// Output only. Ratio of rows with distinct values against total scanned
15769                /// rows. Not available for complex non-groupable field type, including
15770                /// RECORD, ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE
15771                /// mode.
15772                pub distinct_ratio: f64,
15773
15774                /// Output only. The list of top N non-null values, frequency and ratio
15775                /// with which they occur in the scanned data. N is 10 or equal to the
15776                /// number of distinct values in the field, whichever is smaller. Not
15777                /// available for complex non-groupable field type, including RECORD,
15778                /// ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode.
15779                pub top_n_values: std::vec::Vec<
15780                    crate::model::data_profile_result::profile::field::profile_info::TopNValue,
15781                >,
15782
15783                /// Structural and profile information for specific field type. Not
15784                /// available, if mode is REPEATABLE.
15785                pub field_info: std::option::Option<
15786                    crate::model::data_profile_result::profile::field::profile_info::FieldInfo,
15787                >,
15788
15789                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15790            }
15791
15792            impl ProfileInfo {
15793                pub fn new() -> Self {
15794                    std::default::Default::default()
15795                }
15796
15797                /// Sets the value of [null_ratio][crate::model::data_profile_result::profile::field::ProfileInfo::null_ratio].
15798                ///
15799                /// # Example
15800                /// ```ignore,no_run
15801                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15802                /// let x = ProfileInfo::new().set_null_ratio(42.0);
15803                /// ```
15804                pub fn set_null_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
15805                    self.null_ratio = v.into();
15806                    self
15807                }
15808
15809                /// Sets the value of [distinct_ratio][crate::model::data_profile_result::profile::field::ProfileInfo::distinct_ratio].
15810                ///
15811                /// # Example
15812                /// ```ignore,no_run
15813                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15814                /// let x = ProfileInfo::new().set_distinct_ratio(42.0);
15815                /// ```
15816                pub fn set_distinct_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
15817                    self.distinct_ratio = v.into();
15818                    self
15819                }
15820
15821                /// Sets the value of [top_n_values][crate::model::data_profile_result::profile::field::ProfileInfo::top_n_values].
15822                ///
15823                /// # Example
15824                /// ```ignore,no_run
15825                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15826                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
15827                /// let x = ProfileInfo::new()
15828                ///     .set_top_n_values([
15829                ///         TopNValue::default()/* use setters */,
15830                ///         TopNValue::default()/* use (different) setters */,
15831                ///     ]);
15832                /// ```
15833                pub fn set_top_n_values<T, V>(mut self, v: T) -> Self
15834                where
15835                    T: std::iter::IntoIterator<Item = V>,
15836                    V: std::convert::Into<crate::model::data_profile_result::profile::field::profile_info::TopNValue>
15837                {
15838                    use std::iter::Iterator;
15839                    self.top_n_values = v.into_iter().map(|i| i.into()).collect();
15840                    self
15841                }
15842
15843                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info].
15844                ///
15845                /// Note that all the setters affecting `field_info` are mutually
15846                /// exclusive.
15847                ///
15848                /// # Example
15849                /// ```ignore,no_run
15850                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15851                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
15852                /// let x = ProfileInfo::new().set_field_info(Some(
15853                ///     google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(StringFieldInfo::default().into())));
15854                /// ```
15855                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
15856                {
15857                    self.field_info = v.into();
15858                    self
15859                }
15860
15861                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15862                /// if it holds a `StringProfile`, `None` if the field is not set or
15863                /// holds a different branch.
15864                pub fn string_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>>{
15865                    #[allow(unreachable_patterns)]
15866                    self.field_info.as_ref().and_then(|v| match v {
15867                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(v) => std::option::Option::Some(v),
15868                        _ => std::option::Option::None,
15869                    })
15870                }
15871
15872                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15873                /// to hold a `StringProfile`.
15874                ///
15875                /// Note that all the setters affecting `field_info` are
15876                /// mutually exclusive.
15877                ///
15878                /// # Example
15879                /// ```ignore,no_run
15880                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15881                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
15882                /// let x = ProfileInfo::new().set_string_profile(StringFieldInfo::default()/* use setters */);
15883                /// assert!(x.string_profile().is_some());
15884                /// assert!(x.integer_profile().is_none());
15885                /// assert!(x.double_profile().is_none());
15886                /// ```
15887                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{
15888                    self.field_info = std::option::Option::Some(
15889                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(
15890                            v.into()
15891                        )
15892                    );
15893                    self
15894                }
15895
15896                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15897                /// if it holds a `IntegerProfile`, `None` if the field is not set or
15898                /// holds a different branch.
15899                pub fn integer_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>>{
15900                    #[allow(unreachable_patterns)]
15901                    self.field_info.as_ref().and_then(|v| match v {
15902                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(v) => std::option::Option::Some(v),
15903                        _ => std::option::Option::None,
15904                    })
15905                }
15906
15907                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15908                /// to hold a `IntegerProfile`.
15909                ///
15910                /// Note that all the setters affecting `field_info` are
15911                /// mutually exclusive.
15912                ///
15913                /// # Example
15914                /// ```ignore,no_run
15915                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15916                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
15917                /// let x = ProfileInfo::new().set_integer_profile(IntegerFieldInfo::default()/* use setters */);
15918                /// assert!(x.integer_profile().is_some());
15919                /// assert!(x.string_profile().is_none());
15920                /// assert!(x.double_profile().is_none());
15921                /// ```
15922                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{
15923                    self.field_info = std::option::Option::Some(
15924                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(
15925                            v.into()
15926                        )
15927                    );
15928                    self
15929                }
15930
15931                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15932                /// if it holds a `DoubleProfile`, `None` if the field is not set or
15933                /// holds a different branch.
15934                pub fn double_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>>{
15935                    #[allow(unreachable_patterns)]
15936                    self.field_info.as_ref().and_then(|v| match v {
15937                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(v) => std::option::Option::Some(v),
15938                        _ => std::option::Option::None,
15939                    })
15940                }
15941
15942                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15943                /// to hold a `DoubleProfile`.
15944                ///
15945                /// Note that all the setters affecting `field_info` are
15946                /// mutually exclusive.
15947                ///
15948                /// # Example
15949                /// ```ignore,no_run
15950                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15951                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
15952                /// let x = ProfileInfo::new().set_double_profile(DoubleFieldInfo::default()/* use setters */);
15953                /// assert!(x.double_profile().is_some());
15954                /// assert!(x.string_profile().is_none());
15955                /// assert!(x.integer_profile().is_none());
15956                /// ```
15957                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{
15958                    self.field_info = std::option::Option::Some(
15959                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(
15960                            v.into()
15961                        )
15962                    );
15963                    self
15964                }
15965            }
15966
15967            impl wkt::message::Message for ProfileInfo {
15968                fn typename() -> &'static str {
15969                    "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo"
15970                }
15971            }
15972
15973            /// Defines additional types related to [ProfileInfo].
15974            pub mod profile_info {
15975                #[allow(unused_imports)]
15976                use super::*;
15977
15978                /// The profile information for a string type field.
15979                #[derive(Clone, Default, PartialEq)]
15980                #[non_exhaustive]
15981                pub struct StringFieldInfo {
15982                    /// Output only. Minimum length of non-null values in the scanned data.
15983                    pub min_length: i64,
15984
15985                    /// Output only. Maximum length of non-null values in the scanned data.
15986                    pub max_length: i64,
15987
15988                    /// Output only. Average length of non-null values in the scanned data.
15989                    pub average_length: f64,
15990
15991                    pub(crate) _unknown_fields:
15992                        serde_json::Map<std::string::String, serde_json::Value>,
15993                }
15994
15995                impl StringFieldInfo {
15996                    pub fn new() -> Self {
15997                        std::default::Default::default()
15998                    }
15999
16000                    /// Sets the value of [min_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::min_length].
16001                    ///
16002                    /// # Example
16003                    /// ```ignore,no_run
16004                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
16005                    /// let x = StringFieldInfo::new().set_min_length(42);
16006                    /// ```
16007                    pub fn set_min_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16008                        self.min_length = v.into();
16009                        self
16010                    }
16011
16012                    /// Sets the value of [max_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::max_length].
16013                    ///
16014                    /// # Example
16015                    /// ```ignore,no_run
16016                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
16017                    /// let x = StringFieldInfo::new().set_max_length(42);
16018                    /// ```
16019                    pub fn set_max_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16020                        self.max_length = v.into();
16021                        self
16022                    }
16023
16024                    /// Sets the value of [average_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::average_length].
16025                    ///
16026                    /// # Example
16027                    /// ```ignore,no_run
16028                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
16029                    /// let x = StringFieldInfo::new().set_average_length(42.0);
16030                    /// ```
16031                    pub fn set_average_length<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16032                        self.average_length = v.into();
16033                        self
16034                    }
16035                }
16036
16037                impl wkt::message::Message for StringFieldInfo {
16038                    fn typename() -> &'static str {
16039                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo"
16040                    }
16041                }
16042
16043                /// The profile information for an integer type field.
16044                #[derive(Clone, Default, PartialEq)]
16045                #[non_exhaustive]
16046                pub struct IntegerFieldInfo {
16047                    /// Output only. Average of non-null values in the scanned data. NaN,
16048                    /// if the field has a NaN.
16049                    pub average: f64,
16050
16051                    /// Output only. Standard deviation of non-null values in the scanned
16052                    /// data. NaN, if the field has a NaN.
16053                    pub standard_deviation: f64,
16054
16055                    /// Output only. Minimum of non-null values in the scanned data. NaN,
16056                    /// if the field has a NaN.
16057                    pub min: i64,
16058
16059                    /// Output only. A quartile divides the number of data points into four
16060                    /// parts, or quarters, of more-or-less equal size. Three main
16061                    /// quartiles used are: The first quartile (Q1) splits off the lowest
16062                    /// 25% of data from the highest 75%. It is also known as the lower or
16063                    /// 25th empirical quartile, as 25% of the data is below this point.
16064                    /// The second quartile (Q2) is the median of a data set. So, 50% of
16065                    /// the data lies below this point. The third quartile (Q3) splits off
16066                    /// the highest 25% of data from the lowest 75%. It is known as the
16067                    /// upper or 75th empirical quartile, as 75% of the data lies below
16068                    /// this point. Here, the quartiles is provided as an ordered list of
16069                    /// approximate quartile values for the scanned data, occurring in
16070                    /// order Q1, median, Q3.
16071                    pub quartiles: std::vec::Vec<i64>,
16072
16073                    /// Output only. Maximum of non-null values in the scanned data. NaN,
16074                    /// if the field has a NaN.
16075                    pub max: i64,
16076
16077                    pub(crate) _unknown_fields:
16078                        serde_json::Map<std::string::String, serde_json::Value>,
16079                }
16080
16081                impl IntegerFieldInfo {
16082                    pub fn new() -> Self {
16083                        std::default::Default::default()
16084                    }
16085
16086                    /// Sets the value of [average][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::average].
16087                    ///
16088                    /// # Example
16089                    /// ```ignore,no_run
16090                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16091                    /// let x = IntegerFieldInfo::new().set_average(42.0);
16092                    /// ```
16093                    pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16094                        self.average = v.into();
16095                        self
16096                    }
16097
16098                    /// Sets the value of [standard_deviation][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::standard_deviation].
16099                    ///
16100                    /// # Example
16101                    /// ```ignore,no_run
16102                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16103                    /// let x = IntegerFieldInfo::new().set_standard_deviation(42.0);
16104                    /// ```
16105                    pub fn set_standard_deviation<T: std::convert::Into<f64>>(
16106                        mut self,
16107                        v: T,
16108                    ) -> Self {
16109                        self.standard_deviation = v.into();
16110                        self
16111                    }
16112
16113                    /// Sets the value of [min][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::min].
16114                    ///
16115                    /// # Example
16116                    /// ```ignore,no_run
16117                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16118                    /// let x = IntegerFieldInfo::new().set_min(42);
16119                    /// ```
16120                    pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16121                        self.min = v.into();
16122                        self
16123                    }
16124
16125                    /// Sets the value of [quartiles][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::quartiles].
16126                    ///
16127                    /// # Example
16128                    /// ```ignore,no_run
16129                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16130                    /// let x = IntegerFieldInfo::new().set_quartiles([1, 2, 3]);
16131                    /// ```
16132                    pub fn set_quartiles<T, V>(mut self, v: T) -> Self
16133                    where
16134                        T: std::iter::IntoIterator<Item = V>,
16135                        V: std::convert::Into<i64>,
16136                    {
16137                        use std::iter::Iterator;
16138                        self.quartiles = v.into_iter().map(|i| i.into()).collect();
16139                        self
16140                    }
16141
16142                    /// Sets the value of [max][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::max].
16143                    ///
16144                    /// # Example
16145                    /// ```ignore,no_run
16146                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16147                    /// let x = IntegerFieldInfo::new().set_max(42);
16148                    /// ```
16149                    pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16150                        self.max = v.into();
16151                        self
16152                    }
16153                }
16154
16155                impl wkt::message::Message for IntegerFieldInfo {
16156                    fn typename() -> &'static str {
16157                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo"
16158                    }
16159                }
16160
16161                /// The profile information for a double type field.
16162                #[derive(Clone, Default, PartialEq)]
16163                #[non_exhaustive]
16164                pub struct DoubleFieldInfo {
16165                    /// Output only. Average of non-null values in the scanned data. NaN,
16166                    /// if the field has a NaN.
16167                    pub average: f64,
16168
16169                    /// Output only. Standard deviation of non-null values in the scanned
16170                    /// data. NaN, if the field has a NaN.
16171                    pub standard_deviation: f64,
16172
16173                    /// Output only. Minimum of non-null values in the scanned data. NaN,
16174                    /// if the field has a NaN.
16175                    pub min: f64,
16176
16177                    /// Output only. A quartile divides the number of data points into four
16178                    /// parts, or quarters, of more-or-less equal size. Three main
16179                    /// quartiles used are: The first quartile (Q1) splits off the lowest
16180                    /// 25% of data from the highest 75%. It is also known as the lower or
16181                    /// 25th empirical quartile, as 25% of the data is below this point.
16182                    /// The second quartile (Q2) is the median of a data set. So, 50% of
16183                    /// the data lies below this point. The third quartile (Q3) splits off
16184                    /// the highest 25% of data from the lowest 75%. It is known as the
16185                    /// upper or 75th empirical quartile, as 75% of the data lies below
16186                    /// this point. Here, the quartiles is provided as an ordered list of
16187                    /// quartile values for the scanned data, occurring in order Q1,
16188                    /// median, Q3.
16189                    pub quartiles: std::vec::Vec<f64>,
16190
16191                    /// Output only. Maximum of non-null values in the scanned data. NaN,
16192                    /// if the field has a NaN.
16193                    pub max: f64,
16194
16195                    pub(crate) _unknown_fields:
16196                        serde_json::Map<std::string::String, serde_json::Value>,
16197                }
16198
16199                impl DoubleFieldInfo {
16200                    pub fn new() -> Self {
16201                        std::default::Default::default()
16202                    }
16203
16204                    /// Sets the value of [average][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::average].
16205                    ///
16206                    /// # Example
16207                    /// ```ignore,no_run
16208                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16209                    /// let x = DoubleFieldInfo::new().set_average(42.0);
16210                    /// ```
16211                    pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16212                        self.average = v.into();
16213                        self
16214                    }
16215
16216                    /// Sets the value of [standard_deviation][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::standard_deviation].
16217                    ///
16218                    /// # Example
16219                    /// ```ignore,no_run
16220                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16221                    /// let x = DoubleFieldInfo::new().set_standard_deviation(42.0);
16222                    /// ```
16223                    pub fn set_standard_deviation<T: std::convert::Into<f64>>(
16224                        mut self,
16225                        v: T,
16226                    ) -> Self {
16227                        self.standard_deviation = v.into();
16228                        self
16229                    }
16230
16231                    /// Sets the value of [min][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::min].
16232                    ///
16233                    /// # Example
16234                    /// ```ignore,no_run
16235                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16236                    /// let x = DoubleFieldInfo::new().set_min(42.0);
16237                    /// ```
16238                    pub fn set_min<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16239                        self.min = v.into();
16240                        self
16241                    }
16242
16243                    /// Sets the value of [quartiles][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::quartiles].
16244                    ///
16245                    /// # Example
16246                    /// ```ignore,no_run
16247                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16248                    /// let x = DoubleFieldInfo::new().set_quartiles([1.0, 2.0, 3.0]);
16249                    /// ```
16250                    pub fn set_quartiles<T, V>(mut self, v: T) -> Self
16251                    where
16252                        T: std::iter::IntoIterator<Item = V>,
16253                        V: std::convert::Into<f64>,
16254                    {
16255                        use std::iter::Iterator;
16256                        self.quartiles = v.into_iter().map(|i| i.into()).collect();
16257                        self
16258                    }
16259
16260                    /// Sets the value of [max][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::max].
16261                    ///
16262                    /// # Example
16263                    /// ```ignore,no_run
16264                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16265                    /// let x = DoubleFieldInfo::new().set_max(42.0);
16266                    /// ```
16267                    pub fn set_max<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16268                        self.max = v.into();
16269                        self
16270                    }
16271                }
16272
16273                impl wkt::message::Message for DoubleFieldInfo {
16274                    fn typename() -> &'static str {
16275                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo"
16276                    }
16277                }
16278
16279                /// Top N non-null values in the scanned data.
16280                #[derive(Clone, Default, PartialEq)]
16281                #[non_exhaustive]
16282                pub struct TopNValue {
16283                    /// Output only. String value of a top N non-null value.
16284                    pub value: std::string::String,
16285
16286                    /// Output only. Count of the corresponding value in the scanned data.
16287                    pub count: i64,
16288
16289                    /// Output only. Ratio of the corresponding value in the field against
16290                    /// the total number of rows in the scanned data.
16291                    pub ratio: f64,
16292
16293                    pub(crate) _unknown_fields:
16294                        serde_json::Map<std::string::String, serde_json::Value>,
16295                }
16296
16297                impl TopNValue {
16298                    pub fn new() -> Self {
16299                        std::default::Default::default()
16300                    }
16301
16302                    /// Sets the value of [value][crate::model::data_profile_result::profile::field::profile_info::TopNValue::value].
16303                    ///
16304                    /// # Example
16305                    /// ```ignore,no_run
16306                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
16307                    /// let x = TopNValue::new().set_value("example");
16308                    /// ```
16309                    pub fn set_value<T: std::convert::Into<std::string::String>>(
16310                        mut self,
16311                        v: T,
16312                    ) -> Self {
16313                        self.value = v.into();
16314                        self
16315                    }
16316
16317                    /// Sets the value of [count][crate::model::data_profile_result::profile::field::profile_info::TopNValue::count].
16318                    ///
16319                    /// # Example
16320                    /// ```ignore,no_run
16321                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
16322                    /// let x = TopNValue::new().set_count(42);
16323                    /// ```
16324                    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16325                        self.count = v.into();
16326                        self
16327                    }
16328
16329                    /// Sets the value of [ratio][crate::model::data_profile_result::profile::field::profile_info::TopNValue::ratio].
16330                    ///
16331                    /// # Example
16332                    /// ```ignore,no_run
16333                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
16334                    /// let x = TopNValue::new().set_ratio(42.0);
16335                    /// ```
16336                    pub fn set_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16337                        self.ratio = v.into();
16338                        self
16339                    }
16340                }
16341
16342                impl wkt::message::Message for TopNValue {
16343                    fn typename() -> &'static str {
16344                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue"
16345                    }
16346                }
16347
16348                /// Structural and profile information for specific field type. Not
16349                /// available, if mode is REPEATABLE.
16350                #[derive(Clone, Debug, PartialEq)]
16351                #[non_exhaustive]
16352                pub enum FieldInfo {
16353                    /// String type field information.
16354                    StringProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>),
16355                    /// Integer type field information.
16356                    IntegerProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>),
16357                    /// Double type field information.
16358                    DoubleProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>),
16359                }
16360            }
16361        }
16362    }
16363
16364    /// The result of post scan actions of DataProfileScan job.
16365    #[derive(Clone, Default, PartialEq)]
16366    #[non_exhaustive]
16367    pub struct PostScanActionsResult {
16368        /// Output only. The result of BigQuery export post scan action.
16369        pub bigquery_export_result: std::option::Option<
16370            crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult,
16371        >,
16372
16373        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16374    }
16375
16376    impl PostScanActionsResult {
16377        pub fn new() -> Self {
16378            std::default::Default::default()
16379        }
16380
16381        /// Sets the value of [bigquery_export_result][crate::model::data_profile_result::PostScanActionsResult::bigquery_export_result].
16382        ///
16383        /// # Example
16384        /// ```ignore,no_run
16385        /// # use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
16386        /// use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16387        /// let x = PostScanActionsResult::new().set_bigquery_export_result(BigQueryExportResult::default()/* use setters */);
16388        /// ```
16389        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
16390        where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
16391        {
16392            self.bigquery_export_result = std::option::Option::Some(v.into());
16393            self
16394        }
16395
16396        /// Sets or clears the value of [bigquery_export_result][crate::model::data_profile_result::PostScanActionsResult::bigquery_export_result].
16397        ///
16398        /// # Example
16399        /// ```ignore,no_run
16400        /// # use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
16401        /// use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16402        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(Some(BigQueryExportResult::default()/* use setters */));
16403        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(None::<BigQueryExportResult>);
16404        /// ```
16405        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
16406        where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
16407        {
16408            self.bigquery_export_result = v.map(|x| x.into());
16409            self
16410        }
16411    }
16412
16413    impl wkt::message::Message for PostScanActionsResult {
16414        fn typename() -> &'static str {
16415            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult"
16416        }
16417    }
16418
16419    /// Defines additional types related to [PostScanActionsResult].
16420    pub mod post_scan_actions_result {
16421        #[allow(unused_imports)]
16422        use super::*;
16423
16424        /// The result of BigQuery export post scan action.
16425        #[derive(Clone, Default, PartialEq)]
16426        #[non_exhaustive]
16427        pub struct BigQueryExportResult {
16428
16429            /// Output only. Execution state for the BigQuery exporting.
16430            pub state: crate::model::data_profile_result::post_scan_actions_result::big_query_export_result::State,
16431
16432            /// Output only. Additional information about the BigQuery exporting.
16433            pub message: std::string::String,
16434
16435            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16436        }
16437
16438        impl BigQueryExportResult {
16439            pub fn new() -> Self {
16440                std::default::Default::default()
16441            }
16442
16443            /// Sets the value of [state][crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult::state].
16444            ///
16445            /// # Example
16446            /// ```ignore,no_run
16447            /// # use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16448            /// use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::big_query_export_result::State;
16449            /// let x0 = BigQueryExportResult::new().set_state(State::Succeeded);
16450            /// let x1 = BigQueryExportResult::new().set_state(State::Failed);
16451            /// let x2 = BigQueryExportResult::new().set_state(State::Skipped);
16452            /// ```
16453            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{
16454                self.state = v.into();
16455                self
16456            }
16457
16458            /// Sets the value of [message][crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult::message].
16459            ///
16460            /// # Example
16461            /// ```ignore,no_run
16462            /// # use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16463            /// let x = BigQueryExportResult::new().set_message("example");
16464            /// ```
16465            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16466                self.message = v.into();
16467                self
16468            }
16469        }
16470
16471        impl wkt::message::Message for BigQueryExportResult {
16472            fn typename() -> &'static str {
16473                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult"
16474            }
16475        }
16476
16477        /// Defines additional types related to [BigQueryExportResult].
16478        pub mod big_query_export_result {
16479            #[allow(unused_imports)]
16480            use super::*;
16481
16482            /// Execution state for the exporting.
16483            ///
16484            /// # Working with unknown values
16485            ///
16486            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16487            /// additional enum variants at any time. Adding new variants is not considered
16488            /// a breaking change. Applications should write their code in anticipation of:
16489            ///
16490            /// - New values appearing in future releases of the client library, **and**
16491            /// - New values received dynamically, without application changes.
16492            ///
16493            /// Please consult the [Working with enums] section in the user guide for some
16494            /// guidelines.
16495            ///
16496            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16497            #[derive(Clone, Debug, PartialEq)]
16498            #[non_exhaustive]
16499            pub enum State {
16500                /// The exporting state is unspecified.
16501                Unspecified,
16502                /// The exporting completed successfully.
16503                Succeeded,
16504                /// The exporting is no longer running due to an error.
16505                Failed,
16506                /// The exporting is skipped due to no valid scan result to export
16507                /// (usually caused by scan failed).
16508                Skipped,
16509                /// If set, the enum was initialized with an unknown value.
16510                ///
16511                /// Applications can examine the value using [State::value] or
16512                /// [State::name].
16513                UnknownValue(state::UnknownValue),
16514            }
16515
16516            #[doc(hidden)]
16517            pub mod state {
16518                #[allow(unused_imports)]
16519                use super::*;
16520                #[derive(Clone, Debug, PartialEq)]
16521                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16522            }
16523
16524            impl State {
16525                /// Gets the enum value.
16526                ///
16527                /// Returns `None` if the enum contains an unknown value deserialized from
16528                /// the string representation of enums.
16529                pub fn value(&self) -> std::option::Option<i32> {
16530                    match self {
16531                        Self::Unspecified => std::option::Option::Some(0),
16532                        Self::Succeeded => std::option::Option::Some(1),
16533                        Self::Failed => std::option::Option::Some(2),
16534                        Self::Skipped => std::option::Option::Some(3),
16535                        Self::UnknownValue(u) => u.0.value(),
16536                    }
16537                }
16538
16539                /// Gets the enum value as a string.
16540                ///
16541                /// Returns `None` if the enum contains an unknown value deserialized from
16542                /// the integer representation of enums.
16543                pub fn name(&self) -> std::option::Option<&str> {
16544                    match self {
16545                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16546                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
16547                        Self::Failed => std::option::Option::Some("FAILED"),
16548                        Self::Skipped => std::option::Option::Some("SKIPPED"),
16549                        Self::UnknownValue(u) => u.0.name(),
16550                    }
16551                }
16552            }
16553
16554            impl std::default::Default for State {
16555                fn default() -> Self {
16556                    use std::convert::From;
16557                    Self::from(0)
16558                }
16559            }
16560
16561            impl std::fmt::Display for State {
16562                fn fmt(
16563                    &self,
16564                    f: &mut std::fmt::Formatter<'_>,
16565                ) -> std::result::Result<(), std::fmt::Error> {
16566                    wkt::internal::display_enum(f, self.name(), self.value())
16567                }
16568            }
16569
16570            impl std::convert::From<i32> for State {
16571                fn from(value: i32) -> Self {
16572                    match value {
16573                        0 => Self::Unspecified,
16574                        1 => Self::Succeeded,
16575                        2 => Self::Failed,
16576                        3 => Self::Skipped,
16577                        _ => Self::UnknownValue(state::UnknownValue(
16578                            wkt::internal::UnknownEnumValue::Integer(value),
16579                        )),
16580                    }
16581                }
16582            }
16583
16584            impl std::convert::From<&str> for State {
16585                fn from(value: &str) -> Self {
16586                    use std::string::ToString;
16587                    match value {
16588                        "STATE_UNSPECIFIED" => Self::Unspecified,
16589                        "SUCCEEDED" => Self::Succeeded,
16590                        "FAILED" => Self::Failed,
16591                        "SKIPPED" => Self::Skipped,
16592                        _ => Self::UnknownValue(state::UnknownValue(
16593                            wkt::internal::UnknownEnumValue::String(value.to_string()),
16594                        )),
16595                    }
16596                }
16597            }
16598
16599            impl serde::ser::Serialize for State {
16600                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16601                where
16602                    S: serde::Serializer,
16603                {
16604                    match self {
16605                        Self::Unspecified => serializer.serialize_i32(0),
16606                        Self::Succeeded => serializer.serialize_i32(1),
16607                        Self::Failed => serializer.serialize_i32(2),
16608                        Self::Skipped => serializer.serialize_i32(3),
16609                        Self::UnknownValue(u) => u.0.serialize(serializer),
16610                    }
16611                }
16612            }
16613
16614            impl<'de> serde::de::Deserialize<'de> for State {
16615                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16616                where
16617                    D: serde::Deserializer<'de>,
16618                {
16619                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16620                        ".google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State"))
16621                }
16622            }
16623        }
16624    }
16625}
16626
16627/// DataQualityScan related setting.
16628#[derive(Clone, Default, PartialEq)]
16629#[non_exhaustive]
16630pub struct DataQualitySpec {
16631    /// Required. The list of rules to evaluate against a data source. At least one
16632    /// rule is required.
16633    pub rules: std::vec::Vec<crate::model::DataQualityRule>,
16634
16635    /// Optional. The percentage of the records to be selected from the dataset for
16636    /// DataScan.
16637    ///
16638    /// * Value can range between 0.0 and 100.0 with up to 3 significant decimal
16639    ///   digits.
16640    /// * Sampling is not applied if `sampling_percent` is not specified, 0 or
16641    ///
16642    pub sampling_percent: f32,
16643
16644    /// Optional. A filter applied to all rows in a single DataScan job.
16645    /// The filter needs to be a valid SQL expression for a [WHERE clause in
16646    /// GoogleSQL
16647    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#where_clause).
16648    ///
16649    /// Example: col1 >= 0 AND col2 < 10
16650    pub row_filter: std::string::String,
16651
16652    /// Optional. Actions to take upon job completion.
16653    pub post_scan_actions: std::option::Option<crate::model::data_quality_spec::PostScanActions>,
16654
16655    /// Optional. If set, the latest DataScan job result will be published as
16656    /// Dataplex Universal Catalog metadata.
16657    pub catalog_publishing_enabled: bool,
16658
16659    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16660}
16661
16662impl DataQualitySpec {
16663    pub fn new() -> Self {
16664        std::default::Default::default()
16665    }
16666
16667    /// Sets the value of [rules][crate::model::DataQualitySpec::rules].
16668    ///
16669    /// # Example
16670    /// ```ignore,no_run
16671    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16672    /// use google_cloud_dataplex_v1::model::DataQualityRule;
16673    /// let x = DataQualitySpec::new()
16674    ///     .set_rules([
16675    ///         DataQualityRule::default()/* use setters */,
16676    ///         DataQualityRule::default()/* use (different) setters */,
16677    ///     ]);
16678    /// ```
16679    pub fn set_rules<T, V>(mut self, v: T) -> Self
16680    where
16681        T: std::iter::IntoIterator<Item = V>,
16682        V: std::convert::Into<crate::model::DataQualityRule>,
16683    {
16684        use std::iter::Iterator;
16685        self.rules = v.into_iter().map(|i| i.into()).collect();
16686        self
16687    }
16688
16689    /// Sets the value of [sampling_percent][crate::model::DataQualitySpec::sampling_percent].
16690    ///
16691    /// # Example
16692    /// ```ignore,no_run
16693    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16694    /// let x = DataQualitySpec::new().set_sampling_percent(42.0);
16695    /// ```
16696    pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
16697        self.sampling_percent = v.into();
16698        self
16699    }
16700
16701    /// Sets the value of [row_filter][crate::model::DataQualitySpec::row_filter].
16702    ///
16703    /// # Example
16704    /// ```ignore,no_run
16705    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16706    /// let x = DataQualitySpec::new().set_row_filter("example");
16707    /// ```
16708    pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16709        self.row_filter = v.into();
16710        self
16711    }
16712
16713    /// Sets the value of [post_scan_actions][crate::model::DataQualitySpec::post_scan_actions].
16714    ///
16715    /// # Example
16716    /// ```ignore,no_run
16717    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16718    /// use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16719    /// let x = DataQualitySpec::new().set_post_scan_actions(PostScanActions::default()/* use setters */);
16720    /// ```
16721    pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
16722    where
16723        T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
16724    {
16725        self.post_scan_actions = std::option::Option::Some(v.into());
16726        self
16727    }
16728
16729    /// Sets or clears the value of [post_scan_actions][crate::model::DataQualitySpec::post_scan_actions].
16730    ///
16731    /// # Example
16732    /// ```ignore,no_run
16733    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16734    /// use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16735    /// let x = DataQualitySpec::new().set_or_clear_post_scan_actions(Some(PostScanActions::default()/* use setters */));
16736    /// let x = DataQualitySpec::new().set_or_clear_post_scan_actions(None::<PostScanActions>);
16737    /// ```
16738    pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
16739    where
16740        T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
16741    {
16742        self.post_scan_actions = v.map(|x| x.into());
16743        self
16744    }
16745
16746    /// Sets the value of [catalog_publishing_enabled][crate::model::DataQualitySpec::catalog_publishing_enabled].
16747    ///
16748    /// # Example
16749    /// ```ignore,no_run
16750    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16751    /// let x = DataQualitySpec::new().set_catalog_publishing_enabled(true);
16752    /// ```
16753    pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16754        self.catalog_publishing_enabled = v.into();
16755        self
16756    }
16757}
16758
16759impl wkt::message::Message for DataQualitySpec {
16760    fn typename() -> &'static str {
16761        "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec"
16762    }
16763}
16764
16765/// Defines additional types related to [DataQualitySpec].
16766pub mod data_quality_spec {
16767    #[allow(unused_imports)]
16768    use super::*;
16769
16770    /// The configuration of post scan actions of DataQualityScan.
16771    #[derive(Clone, Default, PartialEq)]
16772    #[non_exhaustive]
16773    pub struct PostScanActions {
16774        /// Optional. If set, results will be exported to the provided BigQuery
16775        /// table.
16776        pub bigquery_export:
16777            std::option::Option<crate::model::data_quality_spec::post_scan_actions::BigQueryExport>,
16778
16779        /// Optional. If set, results will be sent to the provided notification
16780        /// receipts upon triggers.
16781        pub notification_report: std::option::Option<
16782            crate::model::data_quality_spec::post_scan_actions::NotificationReport,
16783        >,
16784
16785        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16786    }
16787
16788    impl PostScanActions {
16789        pub fn new() -> Self {
16790            std::default::Default::default()
16791        }
16792
16793        /// Sets the value of [bigquery_export][crate::model::data_quality_spec::PostScanActions::bigquery_export].
16794        ///
16795        /// # Example
16796        /// ```ignore,no_run
16797        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16798        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::BigQueryExport;
16799        /// let x = PostScanActions::new().set_bigquery_export(BigQueryExport::default()/* use setters */);
16800        /// ```
16801        pub fn set_bigquery_export<T>(mut self, v: T) -> Self
16802        where
16803            T: std::convert::Into<
16804                    crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
16805                >,
16806        {
16807            self.bigquery_export = std::option::Option::Some(v.into());
16808            self
16809        }
16810
16811        /// Sets or clears the value of [bigquery_export][crate::model::data_quality_spec::PostScanActions::bigquery_export].
16812        ///
16813        /// # Example
16814        /// ```ignore,no_run
16815        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16816        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::BigQueryExport;
16817        /// let x = PostScanActions::new().set_or_clear_bigquery_export(Some(BigQueryExport::default()/* use setters */));
16818        /// let x = PostScanActions::new().set_or_clear_bigquery_export(None::<BigQueryExport>);
16819        /// ```
16820        pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
16821        where
16822            T: std::convert::Into<
16823                    crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
16824                >,
16825        {
16826            self.bigquery_export = v.map(|x| x.into());
16827            self
16828        }
16829
16830        /// Sets the value of [notification_report][crate::model::data_quality_spec::PostScanActions::notification_report].
16831        ///
16832        /// # Example
16833        /// ```ignore,no_run
16834        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16835        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
16836        /// let x = PostScanActions::new().set_notification_report(NotificationReport::default()/* use setters */);
16837        /// ```
16838        pub fn set_notification_report<T>(mut self, v: T) -> Self
16839        where
16840            T: std::convert::Into<
16841                    crate::model::data_quality_spec::post_scan_actions::NotificationReport,
16842                >,
16843        {
16844            self.notification_report = std::option::Option::Some(v.into());
16845            self
16846        }
16847
16848        /// Sets or clears the value of [notification_report][crate::model::data_quality_spec::PostScanActions::notification_report].
16849        ///
16850        /// # Example
16851        /// ```ignore,no_run
16852        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16853        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
16854        /// let x = PostScanActions::new().set_or_clear_notification_report(Some(NotificationReport::default()/* use setters */));
16855        /// let x = PostScanActions::new().set_or_clear_notification_report(None::<NotificationReport>);
16856        /// ```
16857        pub fn set_or_clear_notification_report<T>(mut self, v: std::option::Option<T>) -> Self
16858        where
16859            T: std::convert::Into<
16860                    crate::model::data_quality_spec::post_scan_actions::NotificationReport,
16861                >,
16862        {
16863            self.notification_report = v.map(|x| x.into());
16864            self
16865        }
16866    }
16867
16868    impl wkt::message::Message for PostScanActions {
16869        fn typename() -> &'static str {
16870            "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions"
16871        }
16872    }
16873
16874    /// Defines additional types related to [PostScanActions].
16875    pub mod post_scan_actions {
16876        #[allow(unused_imports)]
16877        use super::*;
16878
16879        /// The configuration of BigQuery export post scan action.
16880        #[derive(Clone, Default, PartialEq)]
16881        #[non_exhaustive]
16882        pub struct BigQueryExport {
16883            /// Optional. The BigQuery table to export DataQualityScan results to.
16884            /// Format:
16885            /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
16886            /// or
16887            /// projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
16888            pub results_table: std::string::String,
16889
16890            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16891        }
16892
16893        impl BigQueryExport {
16894            pub fn new() -> Self {
16895                std::default::Default::default()
16896            }
16897
16898            /// Sets the value of [results_table][crate::model::data_quality_spec::post_scan_actions::BigQueryExport::results_table].
16899            ///
16900            /// # Example
16901            /// ```ignore,no_run
16902            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::BigQueryExport;
16903            /// let x = BigQueryExport::new().set_results_table("example");
16904            /// ```
16905            pub fn set_results_table<T: std::convert::Into<std::string::String>>(
16906                mut self,
16907                v: T,
16908            ) -> Self {
16909                self.results_table = v.into();
16910                self
16911            }
16912        }
16913
16914        impl wkt::message::Message for BigQueryExport {
16915            fn typename() -> &'static str {
16916                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport"
16917            }
16918        }
16919
16920        /// The individuals or groups who are designated to receive notifications
16921        /// upon triggers.
16922        #[derive(Clone, Default, PartialEq)]
16923        #[non_exhaustive]
16924        pub struct Recipients {
16925            /// Optional. The email recipients who will receive the DataQualityScan
16926            /// results report.
16927            pub emails: std::vec::Vec<std::string::String>,
16928
16929            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16930        }
16931
16932        impl Recipients {
16933            pub fn new() -> Self {
16934                std::default::Default::default()
16935            }
16936
16937            /// Sets the value of [emails][crate::model::data_quality_spec::post_scan_actions::Recipients::emails].
16938            ///
16939            /// # Example
16940            /// ```ignore,no_run
16941            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::Recipients;
16942            /// let x = Recipients::new().set_emails(["a", "b", "c"]);
16943            /// ```
16944            pub fn set_emails<T, V>(mut self, v: T) -> Self
16945            where
16946                T: std::iter::IntoIterator<Item = V>,
16947                V: std::convert::Into<std::string::String>,
16948            {
16949                use std::iter::Iterator;
16950                self.emails = v.into_iter().map(|i| i.into()).collect();
16951                self
16952            }
16953        }
16954
16955        impl wkt::message::Message for Recipients {
16956            fn typename() -> &'static str {
16957                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients"
16958            }
16959        }
16960
16961        /// This trigger is triggered when the DQ score in the job result is less
16962        /// than a specified input score.
16963        #[derive(Clone, Default, PartialEq)]
16964        #[non_exhaustive]
16965        pub struct ScoreThresholdTrigger {
16966            /// Optional. The score range is in [0,100].
16967            pub score_threshold: f32,
16968
16969            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16970        }
16971
16972        impl ScoreThresholdTrigger {
16973            pub fn new() -> Self {
16974                std::default::Default::default()
16975            }
16976
16977            /// Sets the value of [score_threshold][crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger::score_threshold].
16978            ///
16979            /// # Example
16980            /// ```ignore,no_run
16981            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger;
16982            /// let x = ScoreThresholdTrigger::new().set_score_threshold(42.0);
16983            /// ```
16984            pub fn set_score_threshold<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
16985                self.score_threshold = v.into();
16986                self
16987            }
16988        }
16989
16990        impl wkt::message::Message for ScoreThresholdTrigger {
16991            fn typename() -> &'static str {
16992                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger"
16993            }
16994        }
16995
16996        /// This trigger is triggered when the scan job itself fails, regardless of
16997        /// the result.
16998        #[derive(Clone, Default, PartialEq)]
16999        #[non_exhaustive]
17000        pub struct JobFailureTrigger {
17001            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17002        }
17003
17004        impl JobFailureTrigger {
17005            pub fn new() -> Self {
17006                std::default::Default::default()
17007            }
17008        }
17009
17010        impl wkt::message::Message for JobFailureTrigger {
17011            fn typename() -> &'static str {
17012                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger"
17013            }
17014        }
17015
17016        /// This trigger is triggered whenever a scan job run ends, regardless
17017        /// of the result.
17018        #[derive(Clone, Default, PartialEq)]
17019        #[non_exhaustive]
17020        pub struct JobEndTrigger {
17021            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17022        }
17023
17024        impl JobEndTrigger {
17025            pub fn new() -> Self {
17026                std::default::Default::default()
17027            }
17028        }
17029
17030        impl wkt::message::Message for JobEndTrigger {
17031            fn typename() -> &'static str {
17032                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger"
17033            }
17034        }
17035
17036        /// The configuration of notification report post scan action.
17037        #[derive(Clone, Default, PartialEq)]
17038        #[non_exhaustive]
17039        pub struct NotificationReport {
17040            /// Required. The recipients who will receive the notification report.
17041            pub recipients:
17042                std::option::Option<crate::model::data_quality_spec::post_scan_actions::Recipients>,
17043
17044            /// Optional. If set, report will be sent when score threshold is met.
17045            pub score_threshold_trigger: std::option::Option<
17046                crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
17047            >,
17048
17049            /// Optional. If set, report will be sent when a scan job fails.
17050            pub job_failure_trigger: std::option::Option<
17051                crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
17052            >,
17053
17054            /// Optional. If set, report will be sent when a scan job ends.
17055            pub job_end_trigger: std::option::Option<
17056                crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
17057            >,
17058
17059            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17060        }
17061
17062        impl NotificationReport {
17063            pub fn new() -> Self {
17064                std::default::Default::default()
17065            }
17066
17067            /// Sets the value of [recipients][crate::model::data_quality_spec::post_scan_actions::NotificationReport::recipients].
17068            ///
17069            /// # Example
17070            /// ```ignore,no_run
17071            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17072            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::Recipients;
17073            /// let x = NotificationReport::new().set_recipients(Recipients::default()/* use setters */);
17074            /// ```
17075            pub fn set_recipients<T>(mut self, v: T) -> Self
17076            where
17077                T: std::convert::Into<
17078                        crate::model::data_quality_spec::post_scan_actions::Recipients,
17079                    >,
17080            {
17081                self.recipients = std::option::Option::Some(v.into());
17082                self
17083            }
17084
17085            /// Sets or clears the value of [recipients][crate::model::data_quality_spec::post_scan_actions::NotificationReport::recipients].
17086            ///
17087            /// # Example
17088            /// ```ignore,no_run
17089            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17090            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::Recipients;
17091            /// let x = NotificationReport::new().set_or_clear_recipients(Some(Recipients::default()/* use setters */));
17092            /// let x = NotificationReport::new().set_or_clear_recipients(None::<Recipients>);
17093            /// ```
17094            pub fn set_or_clear_recipients<T>(mut self, v: std::option::Option<T>) -> Self
17095            where
17096                T: std::convert::Into<
17097                        crate::model::data_quality_spec::post_scan_actions::Recipients,
17098                    >,
17099            {
17100                self.recipients = v.map(|x| x.into());
17101                self
17102            }
17103
17104            /// Sets the value of [score_threshold_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::score_threshold_trigger].
17105            ///
17106            /// # Example
17107            /// ```ignore,no_run
17108            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17109            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger;
17110            /// let x = NotificationReport::new().set_score_threshold_trigger(ScoreThresholdTrigger::default()/* use setters */);
17111            /// ```
17112            pub fn set_score_threshold_trigger<T>(mut self, v: T) -> Self
17113            where
17114                T: std::convert::Into<
17115                        crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
17116                    >,
17117            {
17118                self.score_threshold_trigger = std::option::Option::Some(v.into());
17119                self
17120            }
17121
17122            /// Sets or clears the value of [score_threshold_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::score_threshold_trigger].
17123            ///
17124            /// # Example
17125            /// ```ignore,no_run
17126            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17127            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger;
17128            /// let x = NotificationReport::new().set_or_clear_score_threshold_trigger(Some(ScoreThresholdTrigger::default()/* use setters */));
17129            /// let x = NotificationReport::new().set_or_clear_score_threshold_trigger(None::<ScoreThresholdTrigger>);
17130            /// ```
17131            pub fn set_or_clear_score_threshold_trigger<T>(
17132                mut self,
17133                v: std::option::Option<T>,
17134            ) -> Self
17135            where
17136                T: std::convert::Into<
17137                        crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
17138                    >,
17139            {
17140                self.score_threshold_trigger = v.map(|x| x.into());
17141                self
17142            }
17143
17144            /// Sets the value of [job_failure_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_failure_trigger].
17145            ///
17146            /// # Example
17147            /// ```ignore,no_run
17148            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17149            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobFailureTrigger;
17150            /// let x = NotificationReport::new().set_job_failure_trigger(JobFailureTrigger::default()/* use setters */);
17151            /// ```
17152            pub fn set_job_failure_trigger<T>(mut self, v: T) -> Self
17153            where
17154                T: std::convert::Into<
17155                        crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
17156                    >,
17157            {
17158                self.job_failure_trigger = std::option::Option::Some(v.into());
17159                self
17160            }
17161
17162            /// Sets or clears the value of [job_failure_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_failure_trigger].
17163            ///
17164            /// # Example
17165            /// ```ignore,no_run
17166            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17167            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobFailureTrigger;
17168            /// let x = NotificationReport::new().set_or_clear_job_failure_trigger(Some(JobFailureTrigger::default()/* use setters */));
17169            /// let x = NotificationReport::new().set_or_clear_job_failure_trigger(None::<JobFailureTrigger>);
17170            /// ```
17171            pub fn set_or_clear_job_failure_trigger<T>(mut self, v: std::option::Option<T>) -> Self
17172            where
17173                T: std::convert::Into<
17174                        crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
17175                    >,
17176            {
17177                self.job_failure_trigger = v.map(|x| x.into());
17178                self
17179            }
17180
17181            /// Sets the value of [job_end_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_end_trigger].
17182            ///
17183            /// # Example
17184            /// ```ignore,no_run
17185            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17186            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobEndTrigger;
17187            /// let x = NotificationReport::new().set_job_end_trigger(JobEndTrigger::default()/* use setters */);
17188            /// ```
17189            pub fn set_job_end_trigger<T>(mut self, v: T) -> Self
17190            where
17191                T: std::convert::Into<
17192                        crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
17193                    >,
17194            {
17195                self.job_end_trigger = std::option::Option::Some(v.into());
17196                self
17197            }
17198
17199            /// Sets or clears the value of [job_end_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_end_trigger].
17200            ///
17201            /// # Example
17202            /// ```ignore,no_run
17203            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17204            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobEndTrigger;
17205            /// let x = NotificationReport::new().set_or_clear_job_end_trigger(Some(JobEndTrigger::default()/* use setters */));
17206            /// let x = NotificationReport::new().set_or_clear_job_end_trigger(None::<JobEndTrigger>);
17207            /// ```
17208            pub fn set_or_clear_job_end_trigger<T>(mut self, v: std::option::Option<T>) -> Self
17209            where
17210                T: std::convert::Into<
17211                        crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
17212                    >,
17213            {
17214                self.job_end_trigger = v.map(|x| x.into());
17215                self
17216            }
17217        }
17218
17219        impl wkt::message::Message for NotificationReport {
17220            fn typename() -> &'static str {
17221                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport"
17222            }
17223        }
17224    }
17225}
17226
17227/// The output of a DataQualityScan.
17228#[derive(Clone, Default, PartialEq)]
17229#[non_exhaustive]
17230pub struct DataQualityResult {
17231    /// Output only. Overall data quality result -- `true` if all rules passed.
17232    pub passed: bool,
17233
17234    /// Output only. The overall data quality score.
17235    ///
17236    /// The score ranges between [0, 100] (up to two decimal points).
17237    pub score: std::option::Option<f32>,
17238
17239    /// Output only. A list of results at the dimension level.
17240    ///
17241    /// A dimension will have a corresponding `DataQualityDimensionResult` if and
17242    /// only if there is at least one rule with the 'dimension' field set to it.
17243    pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
17244
17245    /// Output only. A list of results at the column level.
17246    ///
17247    /// A column will have a corresponding `DataQualityColumnResult` if and only if
17248    /// there is at least one rule with the 'column' field set to it.
17249    pub columns: std::vec::Vec<crate::model::DataQualityColumnResult>,
17250
17251    /// Output only. A list of all the rules in a job, and their results.
17252    pub rules: std::vec::Vec<crate::model::DataQualityRuleResult>,
17253
17254    /// Output only. The count of rows processed.
17255    pub row_count: i64,
17256
17257    /// Output only. The data scanned for this result.
17258    pub scanned_data: std::option::Option<crate::model::ScannedData>,
17259
17260    /// Output only. The result of post scan actions.
17261    pub post_scan_actions_result:
17262        std::option::Option<crate::model::data_quality_result::PostScanActionsResult>,
17263
17264    /// Output only. The status of publishing the data scan as Dataplex Universal
17265    /// Catalog metadata.
17266    pub catalog_publishing_status:
17267        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
17268
17269    /// Output only. The generated assets for anomaly detection.
17270    pub anomaly_detection_generated_assets:
17271        std::option::Option<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
17272
17273    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17274}
17275
17276impl DataQualityResult {
17277    pub fn new() -> Self {
17278        std::default::Default::default()
17279    }
17280
17281    /// Sets the value of [passed][crate::model::DataQualityResult::passed].
17282    ///
17283    /// # Example
17284    /// ```ignore,no_run
17285    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17286    /// let x = DataQualityResult::new().set_passed(true);
17287    /// ```
17288    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17289        self.passed = v.into();
17290        self
17291    }
17292
17293    /// Sets the value of [score][crate::model::DataQualityResult::score].
17294    ///
17295    /// # Example
17296    /// ```ignore,no_run
17297    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17298    /// let x = DataQualityResult::new().set_score(42.0);
17299    /// ```
17300    pub fn set_score<T>(mut self, v: T) -> Self
17301    where
17302        T: std::convert::Into<f32>,
17303    {
17304        self.score = std::option::Option::Some(v.into());
17305        self
17306    }
17307
17308    /// Sets or clears the value of [score][crate::model::DataQualityResult::score].
17309    ///
17310    /// # Example
17311    /// ```ignore,no_run
17312    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17313    /// let x = DataQualityResult::new().set_or_clear_score(Some(42.0));
17314    /// let x = DataQualityResult::new().set_or_clear_score(None::<f32>);
17315    /// ```
17316    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
17317    where
17318        T: std::convert::Into<f32>,
17319    {
17320        self.score = v.map(|x| x.into());
17321        self
17322    }
17323
17324    /// Sets the value of [dimensions][crate::model::DataQualityResult::dimensions].
17325    ///
17326    /// # Example
17327    /// ```ignore,no_run
17328    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17329    /// use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
17330    /// let x = DataQualityResult::new()
17331    ///     .set_dimensions([
17332    ///         DataQualityDimensionResult::default()/* use setters */,
17333    ///         DataQualityDimensionResult::default()/* use (different) setters */,
17334    ///     ]);
17335    /// ```
17336    pub fn set_dimensions<T, V>(mut self, v: T) -> Self
17337    where
17338        T: std::iter::IntoIterator<Item = V>,
17339        V: std::convert::Into<crate::model::DataQualityDimensionResult>,
17340    {
17341        use std::iter::Iterator;
17342        self.dimensions = v.into_iter().map(|i| i.into()).collect();
17343        self
17344    }
17345
17346    /// Sets the value of [columns][crate::model::DataQualityResult::columns].
17347    ///
17348    /// # Example
17349    /// ```ignore,no_run
17350    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17351    /// use google_cloud_dataplex_v1::model::DataQualityColumnResult;
17352    /// let x = DataQualityResult::new()
17353    ///     .set_columns([
17354    ///         DataQualityColumnResult::default()/* use setters */,
17355    ///         DataQualityColumnResult::default()/* use (different) setters */,
17356    ///     ]);
17357    /// ```
17358    pub fn set_columns<T, V>(mut self, v: T) -> Self
17359    where
17360        T: std::iter::IntoIterator<Item = V>,
17361        V: std::convert::Into<crate::model::DataQualityColumnResult>,
17362    {
17363        use std::iter::Iterator;
17364        self.columns = v.into_iter().map(|i| i.into()).collect();
17365        self
17366    }
17367
17368    /// Sets the value of [rules][crate::model::DataQualityResult::rules].
17369    ///
17370    /// # Example
17371    /// ```ignore,no_run
17372    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17373    /// use google_cloud_dataplex_v1::model::DataQualityRuleResult;
17374    /// let x = DataQualityResult::new()
17375    ///     .set_rules([
17376    ///         DataQualityRuleResult::default()/* use setters */,
17377    ///         DataQualityRuleResult::default()/* use (different) setters */,
17378    ///     ]);
17379    /// ```
17380    pub fn set_rules<T, V>(mut self, v: T) -> Self
17381    where
17382        T: std::iter::IntoIterator<Item = V>,
17383        V: std::convert::Into<crate::model::DataQualityRuleResult>,
17384    {
17385        use std::iter::Iterator;
17386        self.rules = v.into_iter().map(|i| i.into()).collect();
17387        self
17388    }
17389
17390    /// Sets the value of [row_count][crate::model::DataQualityResult::row_count].
17391    ///
17392    /// # Example
17393    /// ```ignore,no_run
17394    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17395    /// let x = DataQualityResult::new().set_row_count(42);
17396    /// ```
17397    pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
17398        self.row_count = v.into();
17399        self
17400    }
17401
17402    /// Sets the value of [scanned_data][crate::model::DataQualityResult::scanned_data].
17403    ///
17404    /// # Example
17405    /// ```ignore,no_run
17406    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17407    /// use google_cloud_dataplex_v1::model::ScannedData;
17408    /// let x = DataQualityResult::new().set_scanned_data(ScannedData::default()/* use setters */);
17409    /// ```
17410    pub fn set_scanned_data<T>(mut self, v: T) -> Self
17411    where
17412        T: std::convert::Into<crate::model::ScannedData>,
17413    {
17414        self.scanned_data = std::option::Option::Some(v.into());
17415        self
17416    }
17417
17418    /// Sets or clears the value of [scanned_data][crate::model::DataQualityResult::scanned_data].
17419    ///
17420    /// # Example
17421    /// ```ignore,no_run
17422    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17423    /// use google_cloud_dataplex_v1::model::ScannedData;
17424    /// let x = DataQualityResult::new().set_or_clear_scanned_data(Some(ScannedData::default()/* use setters */));
17425    /// let x = DataQualityResult::new().set_or_clear_scanned_data(None::<ScannedData>);
17426    /// ```
17427    pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
17428    where
17429        T: std::convert::Into<crate::model::ScannedData>,
17430    {
17431        self.scanned_data = v.map(|x| x.into());
17432        self
17433    }
17434
17435    /// Sets the value of [post_scan_actions_result][crate::model::DataQualityResult::post_scan_actions_result].
17436    ///
17437    /// # Example
17438    /// ```ignore,no_run
17439    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17440    /// use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17441    /// let x = DataQualityResult::new().set_post_scan_actions_result(PostScanActionsResult::default()/* use setters */);
17442    /// ```
17443    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
17444    where
17445        T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
17446    {
17447        self.post_scan_actions_result = std::option::Option::Some(v.into());
17448        self
17449    }
17450
17451    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataQualityResult::post_scan_actions_result].
17452    ///
17453    /// # Example
17454    /// ```ignore,no_run
17455    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17456    /// use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17457    /// let x = DataQualityResult::new().set_or_clear_post_scan_actions_result(Some(PostScanActionsResult::default()/* use setters */));
17458    /// let x = DataQualityResult::new().set_or_clear_post_scan_actions_result(None::<PostScanActionsResult>);
17459    /// ```
17460    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
17461    where
17462        T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
17463    {
17464        self.post_scan_actions_result = v.map(|x| x.into());
17465        self
17466    }
17467
17468    /// Sets the value of [catalog_publishing_status][crate::model::DataQualityResult::catalog_publishing_status].
17469    ///
17470    /// # Example
17471    /// ```ignore,no_run
17472    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17473    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
17474    /// let x = DataQualityResult::new().set_catalog_publishing_status(DataScanCatalogPublishingStatus::default()/* use setters */);
17475    /// ```
17476    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
17477    where
17478        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
17479    {
17480        self.catalog_publishing_status = std::option::Option::Some(v.into());
17481        self
17482    }
17483
17484    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataQualityResult::catalog_publishing_status].
17485    ///
17486    /// # Example
17487    /// ```ignore,no_run
17488    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17489    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
17490    /// let x = DataQualityResult::new().set_or_clear_catalog_publishing_status(Some(DataScanCatalogPublishingStatus::default()/* use setters */));
17491    /// let x = DataQualityResult::new().set_or_clear_catalog_publishing_status(None::<DataScanCatalogPublishingStatus>);
17492    /// ```
17493    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
17494    where
17495        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
17496    {
17497        self.catalog_publishing_status = v.map(|x| x.into());
17498        self
17499    }
17500
17501    /// Sets the value of [anomaly_detection_generated_assets][crate::model::DataQualityResult::anomaly_detection_generated_assets].
17502    ///
17503    /// # Example
17504    /// ```ignore,no_run
17505    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17506    /// use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17507    /// let x = DataQualityResult::new().set_anomaly_detection_generated_assets(AnomalyDetectionGeneratedAssets::default()/* use setters */);
17508    /// ```
17509    pub fn set_anomaly_detection_generated_assets<T>(mut self, v: T) -> Self
17510    where
17511        T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
17512    {
17513        self.anomaly_detection_generated_assets = std::option::Option::Some(v.into());
17514        self
17515    }
17516
17517    /// Sets or clears the value of [anomaly_detection_generated_assets][crate::model::DataQualityResult::anomaly_detection_generated_assets].
17518    ///
17519    /// # Example
17520    /// ```ignore,no_run
17521    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17522    /// use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17523    /// let x = DataQualityResult::new().set_or_clear_anomaly_detection_generated_assets(Some(AnomalyDetectionGeneratedAssets::default()/* use setters */));
17524    /// let x = DataQualityResult::new().set_or_clear_anomaly_detection_generated_assets(None::<AnomalyDetectionGeneratedAssets>);
17525    /// ```
17526    pub fn set_or_clear_anomaly_detection_generated_assets<T>(
17527        mut self,
17528        v: std::option::Option<T>,
17529    ) -> Self
17530    where
17531        T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
17532    {
17533        self.anomaly_detection_generated_assets = v.map(|x| x.into());
17534        self
17535    }
17536}
17537
17538impl wkt::message::Message for DataQualityResult {
17539    fn typename() -> &'static str {
17540        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult"
17541    }
17542}
17543
17544/// Defines additional types related to [DataQualityResult].
17545pub mod data_quality_result {
17546    #[allow(unused_imports)]
17547    use super::*;
17548
17549    /// The result of post scan actions of DataQualityScan job.
17550    #[derive(Clone, Default, PartialEq)]
17551    #[non_exhaustive]
17552    pub struct PostScanActionsResult {
17553        /// Output only. The result of BigQuery export post scan action.
17554        pub bigquery_export_result: std::option::Option<
17555            crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult,
17556        >,
17557
17558        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17559    }
17560
17561    impl PostScanActionsResult {
17562        pub fn new() -> Self {
17563            std::default::Default::default()
17564        }
17565
17566        /// Sets the value of [bigquery_export_result][crate::model::data_quality_result::PostScanActionsResult::bigquery_export_result].
17567        ///
17568        /// # Example
17569        /// ```ignore,no_run
17570        /// # use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17571        /// use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17572        /// let x = PostScanActionsResult::new().set_bigquery_export_result(BigQueryExportResult::default()/* use setters */);
17573        /// ```
17574        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
17575        where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
17576        {
17577            self.bigquery_export_result = std::option::Option::Some(v.into());
17578            self
17579        }
17580
17581        /// Sets or clears the value of [bigquery_export_result][crate::model::data_quality_result::PostScanActionsResult::bigquery_export_result].
17582        ///
17583        /// # Example
17584        /// ```ignore,no_run
17585        /// # use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17586        /// use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17587        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(Some(BigQueryExportResult::default()/* use setters */));
17588        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(None::<BigQueryExportResult>);
17589        /// ```
17590        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
17591        where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
17592        {
17593            self.bigquery_export_result = v.map(|x| x.into());
17594            self
17595        }
17596    }
17597
17598    impl wkt::message::Message for PostScanActionsResult {
17599        fn typename() -> &'static str {
17600            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult"
17601        }
17602    }
17603
17604    /// Defines additional types related to [PostScanActionsResult].
17605    pub mod post_scan_actions_result {
17606        #[allow(unused_imports)]
17607        use super::*;
17608
17609        /// The result of BigQuery export post scan action.
17610        #[derive(Clone, Default, PartialEq)]
17611        #[non_exhaustive]
17612        pub struct BigQueryExportResult {
17613
17614            /// Output only. Execution state for the BigQuery exporting.
17615            pub state: crate::model::data_quality_result::post_scan_actions_result::big_query_export_result::State,
17616
17617            /// Output only. Additional information about the BigQuery exporting.
17618            pub message: std::string::String,
17619
17620            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17621        }
17622
17623        impl BigQueryExportResult {
17624            pub fn new() -> Self {
17625                std::default::Default::default()
17626            }
17627
17628            /// Sets the value of [state][crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult::state].
17629            ///
17630            /// # Example
17631            /// ```ignore,no_run
17632            /// # use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17633            /// use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::big_query_export_result::State;
17634            /// let x0 = BigQueryExportResult::new().set_state(State::Succeeded);
17635            /// let x1 = BigQueryExportResult::new().set_state(State::Failed);
17636            /// let x2 = BigQueryExportResult::new().set_state(State::Skipped);
17637            /// ```
17638            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{
17639                self.state = v.into();
17640                self
17641            }
17642
17643            /// Sets the value of [message][crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult::message].
17644            ///
17645            /// # Example
17646            /// ```ignore,no_run
17647            /// # use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17648            /// let x = BigQueryExportResult::new().set_message("example");
17649            /// ```
17650            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17651                self.message = v.into();
17652                self
17653            }
17654        }
17655
17656        impl wkt::message::Message for BigQueryExportResult {
17657            fn typename() -> &'static str {
17658                "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult"
17659            }
17660        }
17661
17662        /// Defines additional types related to [BigQueryExportResult].
17663        pub mod big_query_export_result {
17664            #[allow(unused_imports)]
17665            use super::*;
17666
17667            /// Execution state for the exporting.
17668            ///
17669            /// # Working with unknown values
17670            ///
17671            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17672            /// additional enum variants at any time. Adding new variants is not considered
17673            /// a breaking change. Applications should write their code in anticipation of:
17674            ///
17675            /// - New values appearing in future releases of the client library, **and**
17676            /// - New values received dynamically, without application changes.
17677            ///
17678            /// Please consult the [Working with enums] section in the user guide for some
17679            /// guidelines.
17680            ///
17681            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17682            #[derive(Clone, Debug, PartialEq)]
17683            #[non_exhaustive]
17684            pub enum State {
17685                /// The exporting state is unspecified.
17686                Unspecified,
17687                /// The exporting completed successfully.
17688                Succeeded,
17689                /// The exporting is no longer running due to an error.
17690                Failed,
17691                /// The exporting is skipped due to no valid scan result to export
17692                /// (usually caused by scan failed).
17693                Skipped,
17694                /// If set, the enum was initialized with an unknown value.
17695                ///
17696                /// Applications can examine the value using [State::value] or
17697                /// [State::name].
17698                UnknownValue(state::UnknownValue),
17699            }
17700
17701            #[doc(hidden)]
17702            pub mod state {
17703                #[allow(unused_imports)]
17704                use super::*;
17705                #[derive(Clone, Debug, PartialEq)]
17706                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17707            }
17708
17709            impl State {
17710                /// Gets the enum value.
17711                ///
17712                /// Returns `None` if the enum contains an unknown value deserialized from
17713                /// the string representation of enums.
17714                pub fn value(&self) -> std::option::Option<i32> {
17715                    match self {
17716                        Self::Unspecified => std::option::Option::Some(0),
17717                        Self::Succeeded => std::option::Option::Some(1),
17718                        Self::Failed => std::option::Option::Some(2),
17719                        Self::Skipped => std::option::Option::Some(3),
17720                        Self::UnknownValue(u) => u.0.value(),
17721                    }
17722                }
17723
17724                /// Gets the enum value as a string.
17725                ///
17726                /// Returns `None` if the enum contains an unknown value deserialized from
17727                /// the integer representation of enums.
17728                pub fn name(&self) -> std::option::Option<&str> {
17729                    match self {
17730                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17731                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
17732                        Self::Failed => std::option::Option::Some("FAILED"),
17733                        Self::Skipped => std::option::Option::Some("SKIPPED"),
17734                        Self::UnknownValue(u) => u.0.name(),
17735                    }
17736                }
17737            }
17738
17739            impl std::default::Default for State {
17740                fn default() -> Self {
17741                    use std::convert::From;
17742                    Self::from(0)
17743                }
17744            }
17745
17746            impl std::fmt::Display for State {
17747                fn fmt(
17748                    &self,
17749                    f: &mut std::fmt::Formatter<'_>,
17750                ) -> std::result::Result<(), std::fmt::Error> {
17751                    wkt::internal::display_enum(f, self.name(), self.value())
17752                }
17753            }
17754
17755            impl std::convert::From<i32> for State {
17756                fn from(value: i32) -> Self {
17757                    match value {
17758                        0 => Self::Unspecified,
17759                        1 => Self::Succeeded,
17760                        2 => Self::Failed,
17761                        3 => Self::Skipped,
17762                        _ => Self::UnknownValue(state::UnknownValue(
17763                            wkt::internal::UnknownEnumValue::Integer(value),
17764                        )),
17765                    }
17766                }
17767            }
17768
17769            impl std::convert::From<&str> for State {
17770                fn from(value: &str) -> Self {
17771                    use std::string::ToString;
17772                    match value {
17773                        "STATE_UNSPECIFIED" => Self::Unspecified,
17774                        "SUCCEEDED" => Self::Succeeded,
17775                        "FAILED" => Self::Failed,
17776                        "SKIPPED" => Self::Skipped,
17777                        _ => Self::UnknownValue(state::UnknownValue(
17778                            wkt::internal::UnknownEnumValue::String(value.to_string()),
17779                        )),
17780                    }
17781                }
17782            }
17783
17784            impl serde::ser::Serialize for State {
17785                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17786                where
17787                    S: serde::Serializer,
17788                {
17789                    match self {
17790                        Self::Unspecified => serializer.serialize_i32(0),
17791                        Self::Succeeded => serializer.serialize_i32(1),
17792                        Self::Failed => serializer.serialize_i32(2),
17793                        Self::Skipped => serializer.serialize_i32(3),
17794                        Self::UnknownValue(u) => u.0.serialize(serializer),
17795                    }
17796                }
17797            }
17798
17799            impl<'de> serde::de::Deserialize<'de> for State {
17800                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17801                where
17802                    D: serde::Deserializer<'de>,
17803                {
17804                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17805                        ".google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State"))
17806                }
17807            }
17808        }
17809    }
17810
17811    /// The assets generated by Anomaly Detection Data Scan.
17812    #[derive(Clone, Default, PartialEq)]
17813    #[non_exhaustive]
17814    pub struct AnomalyDetectionGeneratedAssets {
17815        /// Output only. The result table for anomaly detection.
17816        /// Format:
17817        /// PROJECT_ID.DATASET_ID.TABLE_ID
17818        /// If the result table is set at AnomalyDetectionAssets, the result table
17819        /// here would be the same as the one set in the
17820        /// AnomalyDetectionAssets.result_table.
17821        pub result_table: std::string::String,
17822
17823        /// Output only. The intermediate table for data anomaly detection.
17824        /// Format:
17825        /// PROJECT_ID.DATASET_ID.TABLE_ID
17826        pub data_intermediate_table: std::string::String,
17827
17828        /// Output only. The intermediate table for freshness anomaly detection.
17829        /// Format:
17830        /// PROJECT_ID.DATASET_ID.TABLE_ID
17831        pub freshness_intermediate_table: std::string::String,
17832
17833        /// Output only. The intermediate table for volume anomaly detection.
17834        /// Format:
17835        /// PROJECT_ID.DATASET_ID.TABLE_ID
17836        pub volume_intermediate_table: std::string::String,
17837
17838        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17839    }
17840
17841    impl AnomalyDetectionGeneratedAssets {
17842        pub fn new() -> Self {
17843            std::default::Default::default()
17844        }
17845
17846        /// Sets the value of [result_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::result_table].
17847        ///
17848        /// # Example
17849        /// ```ignore,no_run
17850        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17851        /// let x = AnomalyDetectionGeneratedAssets::new().set_result_table("example");
17852        /// ```
17853        pub fn set_result_table<T: std::convert::Into<std::string::String>>(
17854            mut self,
17855            v: T,
17856        ) -> Self {
17857            self.result_table = v.into();
17858            self
17859        }
17860
17861        /// Sets the value of [data_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::data_intermediate_table].
17862        ///
17863        /// # Example
17864        /// ```ignore,no_run
17865        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17866        /// let x = AnomalyDetectionGeneratedAssets::new().set_data_intermediate_table("example");
17867        /// ```
17868        pub fn set_data_intermediate_table<T: std::convert::Into<std::string::String>>(
17869            mut self,
17870            v: T,
17871        ) -> Self {
17872            self.data_intermediate_table = v.into();
17873            self
17874        }
17875
17876        /// Sets the value of [freshness_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::freshness_intermediate_table].
17877        ///
17878        /// # Example
17879        /// ```ignore,no_run
17880        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17881        /// let x = AnomalyDetectionGeneratedAssets::new().set_freshness_intermediate_table("example");
17882        /// ```
17883        pub fn set_freshness_intermediate_table<T: std::convert::Into<std::string::String>>(
17884            mut self,
17885            v: T,
17886        ) -> Self {
17887            self.freshness_intermediate_table = v.into();
17888            self
17889        }
17890
17891        /// Sets the value of [volume_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::volume_intermediate_table].
17892        ///
17893        /// # Example
17894        /// ```ignore,no_run
17895        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17896        /// let x = AnomalyDetectionGeneratedAssets::new().set_volume_intermediate_table("example");
17897        /// ```
17898        pub fn set_volume_intermediate_table<T: std::convert::Into<std::string::String>>(
17899            mut self,
17900            v: T,
17901        ) -> Self {
17902            self.volume_intermediate_table = v.into();
17903            self
17904        }
17905    }
17906
17907    impl wkt::message::Message for AnomalyDetectionGeneratedAssets {
17908        fn typename() -> &'static str {
17909            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.AnomalyDetectionGeneratedAssets"
17910        }
17911    }
17912}
17913
17914/// DataQualityRuleResult provides a more detailed, per-rule view of the results.
17915#[derive(Clone, Default, PartialEq)]
17916#[non_exhaustive]
17917pub struct DataQualityRuleResult {
17918    /// Output only. The rule specified in the DataQualitySpec, as is.
17919    pub rule: std::option::Option<crate::model::DataQualityRule>,
17920
17921    /// Output only. Whether the rule passed or failed.
17922    pub passed: bool,
17923
17924    /// Output only. The number of rows a rule was evaluated against.
17925    ///
17926    /// This field is only valid for row-level type rules.
17927    ///
17928    /// Evaluated count can be configured to either
17929    ///
17930    /// * include all rows (default) - with `null` rows automatically failing rule
17931    ///   evaluation, or
17932    /// * exclude `null` rows from the `evaluated_count`, by setting
17933    ///   `ignore_nulls = true`.
17934    ///
17935    /// This field is not set for rule SqlAssertion.
17936    pub evaluated_count: i64,
17937
17938    /// Output only. The number of rows which passed a rule evaluation.
17939    ///
17940    /// This field is only valid for row-level type rules.
17941    ///
17942    /// This field is not set for rule SqlAssertion.
17943    pub passed_count: i64,
17944
17945    /// Output only. The number of rows with null values in the specified column.
17946    pub null_count: i64,
17947
17948    /// Output only. The ratio of **passed_count / evaluated_count**.
17949    ///
17950    /// This field is only valid for row-level type rules.
17951    pub pass_ratio: f64,
17952
17953    /// Output only. The query to find rows that did not pass this rule.
17954    ///
17955    /// This field is only valid for row-level type rules.
17956    pub failing_rows_query: std::string::String,
17957
17958    /// Output only. The number of rows returned by the SQL statement in a SQL
17959    /// assertion rule.
17960    ///
17961    /// This field is only valid for SQL assertion rules.
17962    pub assertion_row_count: i64,
17963
17964    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17965}
17966
17967impl DataQualityRuleResult {
17968    pub fn new() -> Self {
17969        std::default::Default::default()
17970    }
17971
17972    /// Sets the value of [rule][crate::model::DataQualityRuleResult::rule].
17973    ///
17974    /// # Example
17975    /// ```ignore,no_run
17976    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
17977    /// use google_cloud_dataplex_v1::model::DataQualityRule;
17978    /// let x = DataQualityRuleResult::new().set_rule(DataQualityRule::default()/* use setters */);
17979    /// ```
17980    pub fn set_rule<T>(mut self, v: T) -> Self
17981    where
17982        T: std::convert::Into<crate::model::DataQualityRule>,
17983    {
17984        self.rule = std::option::Option::Some(v.into());
17985        self
17986    }
17987
17988    /// Sets or clears the value of [rule][crate::model::DataQualityRuleResult::rule].
17989    ///
17990    /// # Example
17991    /// ```ignore,no_run
17992    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
17993    /// use google_cloud_dataplex_v1::model::DataQualityRule;
17994    /// let x = DataQualityRuleResult::new().set_or_clear_rule(Some(DataQualityRule::default()/* use setters */));
17995    /// let x = DataQualityRuleResult::new().set_or_clear_rule(None::<DataQualityRule>);
17996    /// ```
17997    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
17998    where
17999        T: std::convert::Into<crate::model::DataQualityRule>,
18000    {
18001        self.rule = v.map(|x| x.into());
18002        self
18003    }
18004
18005    /// Sets the value of [passed][crate::model::DataQualityRuleResult::passed].
18006    ///
18007    /// # Example
18008    /// ```ignore,no_run
18009    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18010    /// let x = DataQualityRuleResult::new().set_passed(true);
18011    /// ```
18012    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18013        self.passed = v.into();
18014        self
18015    }
18016
18017    /// Sets the value of [evaluated_count][crate::model::DataQualityRuleResult::evaluated_count].
18018    ///
18019    /// # Example
18020    /// ```ignore,no_run
18021    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18022    /// let x = DataQualityRuleResult::new().set_evaluated_count(42);
18023    /// ```
18024    pub fn set_evaluated_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18025        self.evaluated_count = v.into();
18026        self
18027    }
18028
18029    /// Sets the value of [passed_count][crate::model::DataQualityRuleResult::passed_count].
18030    ///
18031    /// # Example
18032    /// ```ignore,no_run
18033    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18034    /// let x = DataQualityRuleResult::new().set_passed_count(42);
18035    /// ```
18036    pub fn set_passed_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18037        self.passed_count = v.into();
18038        self
18039    }
18040
18041    /// Sets the value of [null_count][crate::model::DataQualityRuleResult::null_count].
18042    ///
18043    /// # Example
18044    /// ```ignore,no_run
18045    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18046    /// let x = DataQualityRuleResult::new().set_null_count(42);
18047    /// ```
18048    pub fn set_null_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18049        self.null_count = v.into();
18050        self
18051    }
18052
18053    /// Sets the value of [pass_ratio][crate::model::DataQualityRuleResult::pass_ratio].
18054    ///
18055    /// # Example
18056    /// ```ignore,no_run
18057    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18058    /// let x = DataQualityRuleResult::new().set_pass_ratio(42.0);
18059    /// ```
18060    pub fn set_pass_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
18061        self.pass_ratio = v.into();
18062        self
18063    }
18064
18065    /// Sets the value of [failing_rows_query][crate::model::DataQualityRuleResult::failing_rows_query].
18066    ///
18067    /// # Example
18068    /// ```ignore,no_run
18069    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18070    /// let x = DataQualityRuleResult::new().set_failing_rows_query("example");
18071    /// ```
18072    pub fn set_failing_rows_query<T: std::convert::Into<std::string::String>>(
18073        mut self,
18074        v: T,
18075    ) -> Self {
18076        self.failing_rows_query = v.into();
18077        self
18078    }
18079
18080    /// Sets the value of [assertion_row_count][crate::model::DataQualityRuleResult::assertion_row_count].
18081    ///
18082    /// # Example
18083    /// ```ignore,no_run
18084    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18085    /// let x = DataQualityRuleResult::new().set_assertion_row_count(42);
18086    /// ```
18087    pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18088        self.assertion_row_count = v.into();
18089        self
18090    }
18091}
18092
18093impl wkt::message::Message for DataQualityRuleResult {
18094    fn typename() -> &'static str {
18095        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRuleResult"
18096    }
18097}
18098
18099/// DataQualityDimensionResult provides a more detailed, per-dimension view of
18100/// the results.
18101#[derive(Clone, Default, PartialEq)]
18102#[non_exhaustive]
18103pub struct DataQualityDimensionResult {
18104    /// Output only. The dimension config specified in the DataQualitySpec, as is.
18105    pub dimension: std::option::Option<crate::model::DataQualityDimension>,
18106
18107    /// Output only. Whether the dimension passed or failed.
18108    pub passed: bool,
18109
18110    /// Output only. The dimension-level data quality score for this data scan job
18111    /// if and only if the 'dimension' field is set.
18112    ///
18113    /// The score ranges between [0, 100] (up to two decimal
18114    /// points).
18115    pub score: std::option::Option<f32>,
18116
18117    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18118}
18119
18120impl DataQualityDimensionResult {
18121    pub fn new() -> Self {
18122        std::default::Default::default()
18123    }
18124
18125    /// Sets the value of [dimension][crate::model::DataQualityDimensionResult::dimension].
18126    ///
18127    /// # Example
18128    /// ```ignore,no_run
18129    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18130    /// use google_cloud_dataplex_v1::model::DataQualityDimension;
18131    /// let x = DataQualityDimensionResult::new().set_dimension(DataQualityDimension::default()/* use setters */);
18132    /// ```
18133    pub fn set_dimension<T>(mut self, v: T) -> Self
18134    where
18135        T: std::convert::Into<crate::model::DataQualityDimension>,
18136    {
18137        self.dimension = std::option::Option::Some(v.into());
18138        self
18139    }
18140
18141    /// Sets or clears the value of [dimension][crate::model::DataQualityDimensionResult::dimension].
18142    ///
18143    /// # Example
18144    /// ```ignore,no_run
18145    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18146    /// use google_cloud_dataplex_v1::model::DataQualityDimension;
18147    /// let x = DataQualityDimensionResult::new().set_or_clear_dimension(Some(DataQualityDimension::default()/* use setters */));
18148    /// let x = DataQualityDimensionResult::new().set_or_clear_dimension(None::<DataQualityDimension>);
18149    /// ```
18150    pub fn set_or_clear_dimension<T>(mut self, v: std::option::Option<T>) -> Self
18151    where
18152        T: std::convert::Into<crate::model::DataQualityDimension>,
18153    {
18154        self.dimension = v.map(|x| x.into());
18155        self
18156    }
18157
18158    /// Sets the value of [passed][crate::model::DataQualityDimensionResult::passed].
18159    ///
18160    /// # Example
18161    /// ```ignore,no_run
18162    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18163    /// let x = DataQualityDimensionResult::new().set_passed(true);
18164    /// ```
18165    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18166        self.passed = v.into();
18167        self
18168    }
18169
18170    /// Sets the value of [score][crate::model::DataQualityDimensionResult::score].
18171    ///
18172    /// # Example
18173    /// ```ignore,no_run
18174    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18175    /// let x = DataQualityDimensionResult::new().set_score(42.0);
18176    /// ```
18177    pub fn set_score<T>(mut self, v: T) -> Self
18178    where
18179        T: std::convert::Into<f32>,
18180    {
18181        self.score = std::option::Option::Some(v.into());
18182        self
18183    }
18184
18185    /// Sets or clears the value of [score][crate::model::DataQualityDimensionResult::score].
18186    ///
18187    /// # Example
18188    /// ```ignore,no_run
18189    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18190    /// let x = DataQualityDimensionResult::new().set_or_clear_score(Some(42.0));
18191    /// let x = DataQualityDimensionResult::new().set_or_clear_score(None::<f32>);
18192    /// ```
18193    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
18194    where
18195        T: std::convert::Into<f32>,
18196    {
18197        self.score = v.map(|x| x.into());
18198        self
18199    }
18200}
18201
18202impl wkt::message::Message for DataQualityDimensionResult {
18203    fn typename() -> &'static str {
18204        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimensionResult"
18205    }
18206}
18207
18208/// A dimension captures data quality intent about a defined subset of the rules
18209/// specified.
18210#[derive(Clone, Default, PartialEq)]
18211#[non_exhaustive]
18212pub struct DataQualityDimension {
18213    /// Output only. The dimension name a rule belongs to. Custom dimension name is
18214    /// supported with all uppercase letters and maximum length of 30 characters.
18215    pub name: std::string::String,
18216
18217    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18218}
18219
18220impl DataQualityDimension {
18221    pub fn new() -> Self {
18222        std::default::Default::default()
18223    }
18224
18225    /// Sets the value of [name][crate::model::DataQualityDimension::name].
18226    ///
18227    /// # Example
18228    /// ```ignore,no_run
18229    /// # use google_cloud_dataplex_v1::model::DataQualityDimension;
18230    /// let x = DataQualityDimension::new().set_name("example");
18231    /// ```
18232    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18233        self.name = v.into();
18234        self
18235    }
18236}
18237
18238impl wkt::message::Message for DataQualityDimension {
18239    fn typename() -> &'static str {
18240        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimension"
18241    }
18242}
18243
18244/// A rule captures data quality intent about a data source.
18245#[derive(Clone, Default, PartialEq)]
18246#[non_exhaustive]
18247pub struct DataQualityRule {
18248    /// Optional. The unnested column which this rule is evaluated against.
18249    pub column: std::string::String,
18250
18251    /// Optional. Rows with `null` values will automatically fail a rule, unless
18252    /// `ignore_null` is `true`. In that case, such `null` rows are trivially
18253    /// considered passing.
18254    ///
18255    /// This field is only valid for the following type of rules:
18256    ///
18257    /// * RangeExpectation
18258    /// * RegexExpectation
18259    /// * SetExpectation
18260    /// * UniquenessExpectation
18261    pub ignore_null: bool,
18262
18263    /// Required. The dimension a rule belongs to. Results are also aggregated at
18264    /// the dimension level. Custom dimension name is supported with all uppercase
18265    /// letters and maximum length of 30 characters.
18266    pub dimension: std::string::String,
18267
18268    /// Optional. The minimum ratio of **passing_rows / total_rows** required to
18269    /// pass this rule, with a range of [0.0, 1.0].
18270    ///
18271    /// 0 indicates default value (i.e. 1.0).
18272    ///
18273    /// This field is only valid for row-level type rules.
18274    pub threshold: f64,
18275
18276    /// Optional. A mutable name for the rule.
18277    ///
18278    /// * The name must contain only letters (a-z, A-Z), numbers (0-9), or
18279    ///   hyphens (-).
18280    /// * The maximum length is 63 characters.
18281    /// * Must start with a letter.
18282    /// * Must end with a number or a letter.
18283    pub name: std::string::String,
18284
18285    /// Optional. Description of the rule.
18286    ///
18287    /// * The maximum length is 1,024 characters.
18288    pub description: std::string::String,
18289
18290    /// Optional. Whether the Rule is active or suspended.
18291    /// Default is false.
18292    pub suspended: bool,
18293
18294    /// The rule-specific configuration.
18295    pub rule_type: std::option::Option<crate::model::data_quality_rule::RuleType>,
18296
18297    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18298}
18299
18300impl DataQualityRule {
18301    pub fn new() -> Self {
18302        std::default::Default::default()
18303    }
18304
18305    /// Sets the value of [column][crate::model::DataQualityRule::column].
18306    ///
18307    /// # Example
18308    /// ```ignore,no_run
18309    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18310    /// let x = DataQualityRule::new().set_column("example");
18311    /// ```
18312    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18313        self.column = v.into();
18314        self
18315    }
18316
18317    /// Sets the value of [ignore_null][crate::model::DataQualityRule::ignore_null].
18318    ///
18319    /// # Example
18320    /// ```ignore,no_run
18321    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18322    /// let x = DataQualityRule::new().set_ignore_null(true);
18323    /// ```
18324    pub fn set_ignore_null<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18325        self.ignore_null = v.into();
18326        self
18327    }
18328
18329    /// Sets the value of [dimension][crate::model::DataQualityRule::dimension].
18330    ///
18331    /// # Example
18332    /// ```ignore,no_run
18333    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18334    /// let x = DataQualityRule::new().set_dimension("example");
18335    /// ```
18336    pub fn set_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18337        self.dimension = v.into();
18338        self
18339    }
18340
18341    /// Sets the value of [threshold][crate::model::DataQualityRule::threshold].
18342    ///
18343    /// # Example
18344    /// ```ignore,no_run
18345    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18346    /// let x = DataQualityRule::new().set_threshold(42.0);
18347    /// ```
18348    pub fn set_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
18349        self.threshold = v.into();
18350        self
18351    }
18352
18353    /// Sets the value of [name][crate::model::DataQualityRule::name].
18354    ///
18355    /// # Example
18356    /// ```ignore,no_run
18357    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18358    /// let x = DataQualityRule::new().set_name("example");
18359    /// ```
18360    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18361        self.name = v.into();
18362        self
18363    }
18364
18365    /// Sets the value of [description][crate::model::DataQualityRule::description].
18366    ///
18367    /// # Example
18368    /// ```ignore,no_run
18369    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18370    /// let x = DataQualityRule::new().set_description("example");
18371    /// ```
18372    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18373        self.description = v.into();
18374        self
18375    }
18376
18377    /// Sets the value of [suspended][crate::model::DataQualityRule::suspended].
18378    ///
18379    /// # Example
18380    /// ```ignore,no_run
18381    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18382    /// let x = DataQualityRule::new().set_suspended(true);
18383    /// ```
18384    pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18385        self.suspended = v.into();
18386        self
18387    }
18388
18389    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type].
18390    ///
18391    /// Note that all the setters affecting `rule_type` are mutually
18392    /// exclusive.
18393    ///
18394    /// # Example
18395    /// ```ignore,no_run
18396    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18397    /// use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18398    /// let x = DataQualityRule::new().set_rule_type(Some(
18399    ///     google_cloud_dataplex_v1::model::data_quality_rule::RuleType::RangeExpectation(RangeExpectation::default().into())));
18400    /// ```
18401    pub fn set_rule_type<
18402        T: std::convert::Into<std::option::Option<crate::model::data_quality_rule::RuleType>>,
18403    >(
18404        mut self,
18405        v: T,
18406    ) -> Self {
18407        self.rule_type = v.into();
18408        self
18409    }
18410
18411    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18412    /// if it holds a `RangeExpectation`, `None` if the field is not set or
18413    /// holds a different branch.
18414    pub fn range_expectation(
18415        &self,
18416    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>
18417    {
18418        #[allow(unreachable_patterns)]
18419        self.rule_type.as_ref().and_then(|v| match v {
18420            crate::model::data_quality_rule::RuleType::RangeExpectation(v) => {
18421                std::option::Option::Some(v)
18422            }
18423            _ => std::option::Option::None,
18424        })
18425    }
18426
18427    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18428    /// to hold a `RangeExpectation`.
18429    ///
18430    /// Note that all the setters affecting `rule_type` are
18431    /// mutually exclusive.
18432    ///
18433    /// # Example
18434    /// ```ignore,no_run
18435    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18436    /// use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18437    /// let x = DataQualityRule::new().set_range_expectation(RangeExpectation::default()/* use setters */);
18438    /// assert!(x.range_expectation().is_some());
18439    /// assert!(x.non_null_expectation().is_none());
18440    /// assert!(x.set_expectation().is_none());
18441    /// assert!(x.regex_expectation().is_none());
18442    /// assert!(x.uniqueness_expectation().is_none());
18443    /// assert!(x.statistic_range_expectation().is_none());
18444    /// assert!(x.row_condition_expectation().is_none());
18445    /// assert!(x.table_condition_expectation().is_none());
18446    /// assert!(x.sql_assertion().is_none());
18447    /// ```
18448    pub fn set_range_expectation<
18449        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>,
18450    >(
18451        mut self,
18452        v: T,
18453    ) -> Self {
18454        self.rule_type = std::option::Option::Some(
18455            crate::model::data_quality_rule::RuleType::RangeExpectation(v.into()),
18456        );
18457        self
18458    }
18459
18460    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18461    /// if it holds a `NonNullExpectation`, `None` if the field is not set or
18462    /// holds a different branch.
18463    pub fn non_null_expectation(
18464        &self,
18465    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>
18466    {
18467        #[allow(unreachable_patterns)]
18468        self.rule_type.as_ref().and_then(|v| match v {
18469            crate::model::data_quality_rule::RuleType::NonNullExpectation(v) => {
18470                std::option::Option::Some(v)
18471            }
18472            _ => std::option::Option::None,
18473        })
18474    }
18475
18476    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18477    /// to hold a `NonNullExpectation`.
18478    ///
18479    /// Note that all the setters affecting `rule_type` are
18480    /// mutually exclusive.
18481    ///
18482    /// # Example
18483    /// ```ignore,no_run
18484    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18485    /// use google_cloud_dataplex_v1::model::data_quality_rule::NonNullExpectation;
18486    /// let x = DataQualityRule::new().set_non_null_expectation(NonNullExpectation::default()/* use setters */);
18487    /// assert!(x.non_null_expectation().is_some());
18488    /// assert!(x.range_expectation().is_none());
18489    /// assert!(x.set_expectation().is_none());
18490    /// assert!(x.regex_expectation().is_none());
18491    /// assert!(x.uniqueness_expectation().is_none());
18492    /// assert!(x.statistic_range_expectation().is_none());
18493    /// assert!(x.row_condition_expectation().is_none());
18494    /// assert!(x.table_condition_expectation().is_none());
18495    /// assert!(x.sql_assertion().is_none());
18496    /// ```
18497    pub fn set_non_null_expectation<
18498        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>,
18499    >(
18500        mut self,
18501        v: T,
18502    ) -> Self {
18503        self.rule_type = std::option::Option::Some(
18504            crate::model::data_quality_rule::RuleType::NonNullExpectation(v.into()),
18505        );
18506        self
18507    }
18508
18509    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18510    /// if it holds a `SetExpectation`, `None` if the field is not set or
18511    /// holds a different branch.
18512    pub fn set_expectation(
18513        &self,
18514    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>
18515    {
18516        #[allow(unreachable_patterns)]
18517        self.rule_type.as_ref().and_then(|v| match v {
18518            crate::model::data_quality_rule::RuleType::SetExpectation(v) => {
18519                std::option::Option::Some(v)
18520            }
18521            _ => std::option::Option::None,
18522        })
18523    }
18524
18525    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18526    /// to hold a `SetExpectation`.
18527    ///
18528    /// Note that all the setters affecting `rule_type` are
18529    /// mutually exclusive.
18530    ///
18531    /// # Example
18532    /// ```ignore,no_run
18533    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18534    /// use google_cloud_dataplex_v1::model::data_quality_rule::SetExpectation;
18535    /// let x = DataQualityRule::new().set_set_expectation(SetExpectation::default()/* use setters */);
18536    /// assert!(x.set_expectation().is_some());
18537    /// assert!(x.range_expectation().is_none());
18538    /// assert!(x.non_null_expectation().is_none());
18539    /// assert!(x.regex_expectation().is_none());
18540    /// assert!(x.uniqueness_expectation().is_none());
18541    /// assert!(x.statistic_range_expectation().is_none());
18542    /// assert!(x.row_condition_expectation().is_none());
18543    /// assert!(x.table_condition_expectation().is_none());
18544    /// assert!(x.sql_assertion().is_none());
18545    /// ```
18546    pub fn set_set_expectation<
18547        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>,
18548    >(
18549        mut self,
18550        v: T,
18551    ) -> Self {
18552        self.rule_type = std::option::Option::Some(
18553            crate::model::data_quality_rule::RuleType::SetExpectation(v.into()),
18554        );
18555        self
18556    }
18557
18558    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18559    /// if it holds a `RegexExpectation`, `None` if the field is not set or
18560    /// holds a different branch.
18561    pub fn regex_expectation(
18562        &self,
18563    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>
18564    {
18565        #[allow(unreachable_patterns)]
18566        self.rule_type.as_ref().and_then(|v| match v {
18567            crate::model::data_quality_rule::RuleType::RegexExpectation(v) => {
18568                std::option::Option::Some(v)
18569            }
18570            _ => std::option::Option::None,
18571        })
18572    }
18573
18574    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18575    /// to hold a `RegexExpectation`.
18576    ///
18577    /// Note that all the setters affecting `rule_type` are
18578    /// mutually exclusive.
18579    ///
18580    /// # Example
18581    /// ```ignore,no_run
18582    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18583    /// use google_cloud_dataplex_v1::model::data_quality_rule::RegexExpectation;
18584    /// let x = DataQualityRule::new().set_regex_expectation(RegexExpectation::default()/* use setters */);
18585    /// assert!(x.regex_expectation().is_some());
18586    /// assert!(x.range_expectation().is_none());
18587    /// assert!(x.non_null_expectation().is_none());
18588    /// assert!(x.set_expectation().is_none());
18589    /// assert!(x.uniqueness_expectation().is_none());
18590    /// assert!(x.statistic_range_expectation().is_none());
18591    /// assert!(x.row_condition_expectation().is_none());
18592    /// assert!(x.table_condition_expectation().is_none());
18593    /// assert!(x.sql_assertion().is_none());
18594    /// ```
18595    pub fn set_regex_expectation<
18596        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>,
18597    >(
18598        mut self,
18599        v: T,
18600    ) -> Self {
18601        self.rule_type = std::option::Option::Some(
18602            crate::model::data_quality_rule::RuleType::RegexExpectation(v.into()),
18603        );
18604        self
18605    }
18606
18607    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18608    /// if it holds a `UniquenessExpectation`, `None` if the field is not set or
18609    /// holds a different branch.
18610    pub fn uniqueness_expectation(
18611        &self,
18612    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>
18613    {
18614        #[allow(unreachable_patterns)]
18615        self.rule_type.as_ref().and_then(|v| match v {
18616            crate::model::data_quality_rule::RuleType::UniquenessExpectation(v) => {
18617                std::option::Option::Some(v)
18618            }
18619            _ => std::option::Option::None,
18620        })
18621    }
18622
18623    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18624    /// to hold a `UniquenessExpectation`.
18625    ///
18626    /// Note that all the setters affecting `rule_type` are
18627    /// mutually exclusive.
18628    ///
18629    /// # Example
18630    /// ```ignore,no_run
18631    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18632    /// use google_cloud_dataplex_v1::model::data_quality_rule::UniquenessExpectation;
18633    /// let x = DataQualityRule::new().set_uniqueness_expectation(UniquenessExpectation::default()/* use setters */);
18634    /// assert!(x.uniqueness_expectation().is_some());
18635    /// assert!(x.range_expectation().is_none());
18636    /// assert!(x.non_null_expectation().is_none());
18637    /// assert!(x.set_expectation().is_none());
18638    /// assert!(x.regex_expectation().is_none());
18639    /// assert!(x.statistic_range_expectation().is_none());
18640    /// assert!(x.row_condition_expectation().is_none());
18641    /// assert!(x.table_condition_expectation().is_none());
18642    /// assert!(x.sql_assertion().is_none());
18643    /// ```
18644    pub fn set_uniqueness_expectation<
18645        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>,
18646    >(
18647        mut self,
18648        v: T,
18649    ) -> Self {
18650        self.rule_type = std::option::Option::Some(
18651            crate::model::data_quality_rule::RuleType::UniquenessExpectation(v.into()),
18652        );
18653        self
18654    }
18655
18656    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18657    /// if it holds a `StatisticRangeExpectation`, `None` if the field is not set or
18658    /// holds a different branch.
18659    pub fn statistic_range_expectation(
18660        &self,
18661    ) -> std::option::Option<
18662        &std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
18663    > {
18664        #[allow(unreachable_patterns)]
18665        self.rule_type.as_ref().and_then(|v| match v {
18666            crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v) => {
18667                std::option::Option::Some(v)
18668            }
18669            _ => std::option::Option::None,
18670        })
18671    }
18672
18673    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18674    /// to hold a `StatisticRangeExpectation`.
18675    ///
18676    /// Note that all the setters affecting `rule_type` are
18677    /// mutually exclusive.
18678    ///
18679    /// # Example
18680    /// ```ignore,no_run
18681    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18682    /// use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
18683    /// let x = DataQualityRule::new().set_statistic_range_expectation(StatisticRangeExpectation::default()/* use setters */);
18684    /// assert!(x.statistic_range_expectation().is_some());
18685    /// assert!(x.range_expectation().is_none());
18686    /// assert!(x.non_null_expectation().is_none());
18687    /// assert!(x.set_expectation().is_none());
18688    /// assert!(x.regex_expectation().is_none());
18689    /// assert!(x.uniqueness_expectation().is_none());
18690    /// assert!(x.row_condition_expectation().is_none());
18691    /// assert!(x.table_condition_expectation().is_none());
18692    /// assert!(x.sql_assertion().is_none());
18693    /// ```
18694    pub fn set_statistic_range_expectation<
18695        T: std::convert::Into<
18696                std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
18697            >,
18698    >(
18699        mut self,
18700        v: T,
18701    ) -> Self {
18702        self.rule_type = std::option::Option::Some(
18703            crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v.into()),
18704        );
18705        self
18706    }
18707
18708    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18709    /// if it holds a `RowConditionExpectation`, `None` if the field is not set or
18710    /// holds a different branch.
18711    pub fn row_condition_expectation(
18712        &self,
18713    ) -> std::option::Option<
18714        &std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
18715    > {
18716        #[allow(unreachable_patterns)]
18717        self.rule_type.as_ref().and_then(|v| match v {
18718            crate::model::data_quality_rule::RuleType::RowConditionExpectation(v) => {
18719                std::option::Option::Some(v)
18720            }
18721            _ => std::option::Option::None,
18722        })
18723    }
18724
18725    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18726    /// to hold a `RowConditionExpectation`.
18727    ///
18728    /// Note that all the setters affecting `rule_type` are
18729    /// mutually exclusive.
18730    ///
18731    /// # Example
18732    /// ```ignore,no_run
18733    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18734    /// use google_cloud_dataplex_v1::model::data_quality_rule::RowConditionExpectation;
18735    /// let x = DataQualityRule::new().set_row_condition_expectation(RowConditionExpectation::default()/* use setters */);
18736    /// assert!(x.row_condition_expectation().is_some());
18737    /// assert!(x.range_expectation().is_none());
18738    /// assert!(x.non_null_expectation().is_none());
18739    /// assert!(x.set_expectation().is_none());
18740    /// assert!(x.regex_expectation().is_none());
18741    /// assert!(x.uniqueness_expectation().is_none());
18742    /// assert!(x.statistic_range_expectation().is_none());
18743    /// assert!(x.table_condition_expectation().is_none());
18744    /// assert!(x.sql_assertion().is_none());
18745    /// ```
18746    pub fn set_row_condition_expectation<
18747        T: std::convert::Into<
18748                std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
18749            >,
18750    >(
18751        mut self,
18752        v: T,
18753    ) -> Self {
18754        self.rule_type = std::option::Option::Some(
18755            crate::model::data_quality_rule::RuleType::RowConditionExpectation(v.into()),
18756        );
18757        self
18758    }
18759
18760    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18761    /// if it holds a `TableConditionExpectation`, `None` if the field is not set or
18762    /// holds a different branch.
18763    pub fn table_condition_expectation(
18764        &self,
18765    ) -> std::option::Option<
18766        &std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
18767    > {
18768        #[allow(unreachable_patterns)]
18769        self.rule_type.as_ref().and_then(|v| match v {
18770            crate::model::data_quality_rule::RuleType::TableConditionExpectation(v) => {
18771                std::option::Option::Some(v)
18772            }
18773            _ => std::option::Option::None,
18774        })
18775    }
18776
18777    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18778    /// to hold a `TableConditionExpectation`.
18779    ///
18780    /// Note that all the setters affecting `rule_type` are
18781    /// mutually exclusive.
18782    ///
18783    /// # Example
18784    /// ```ignore,no_run
18785    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18786    /// use google_cloud_dataplex_v1::model::data_quality_rule::TableConditionExpectation;
18787    /// let x = DataQualityRule::new().set_table_condition_expectation(TableConditionExpectation::default()/* use setters */);
18788    /// assert!(x.table_condition_expectation().is_some());
18789    /// assert!(x.range_expectation().is_none());
18790    /// assert!(x.non_null_expectation().is_none());
18791    /// assert!(x.set_expectation().is_none());
18792    /// assert!(x.regex_expectation().is_none());
18793    /// assert!(x.uniqueness_expectation().is_none());
18794    /// assert!(x.statistic_range_expectation().is_none());
18795    /// assert!(x.row_condition_expectation().is_none());
18796    /// assert!(x.sql_assertion().is_none());
18797    /// ```
18798    pub fn set_table_condition_expectation<
18799        T: std::convert::Into<
18800                std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
18801            >,
18802    >(
18803        mut self,
18804        v: T,
18805    ) -> Self {
18806        self.rule_type = std::option::Option::Some(
18807            crate::model::data_quality_rule::RuleType::TableConditionExpectation(v.into()),
18808        );
18809        self
18810    }
18811
18812    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18813    /// if it holds a `SqlAssertion`, `None` if the field is not set or
18814    /// holds a different branch.
18815    pub fn sql_assertion(
18816        &self,
18817    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>> {
18818        #[allow(unreachable_patterns)]
18819        self.rule_type.as_ref().and_then(|v| match v {
18820            crate::model::data_quality_rule::RuleType::SqlAssertion(v) => {
18821                std::option::Option::Some(v)
18822            }
18823            _ => std::option::Option::None,
18824        })
18825    }
18826
18827    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18828    /// to hold a `SqlAssertion`.
18829    ///
18830    /// Note that all the setters affecting `rule_type` are
18831    /// mutually exclusive.
18832    ///
18833    /// # Example
18834    /// ```ignore,no_run
18835    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18836    /// use google_cloud_dataplex_v1::model::data_quality_rule::SqlAssertion;
18837    /// let x = DataQualityRule::new().set_sql_assertion(SqlAssertion::default()/* use setters */);
18838    /// assert!(x.sql_assertion().is_some());
18839    /// assert!(x.range_expectation().is_none());
18840    /// assert!(x.non_null_expectation().is_none());
18841    /// assert!(x.set_expectation().is_none());
18842    /// assert!(x.regex_expectation().is_none());
18843    /// assert!(x.uniqueness_expectation().is_none());
18844    /// assert!(x.statistic_range_expectation().is_none());
18845    /// assert!(x.row_condition_expectation().is_none());
18846    /// assert!(x.table_condition_expectation().is_none());
18847    /// ```
18848    pub fn set_sql_assertion<
18849        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>>,
18850    >(
18851        mut self,
18852        v: T,
18853    ) -> Self {
18854        self.rule_type = std::option::Option::Some(
18855            crate::model::data_quality_rule::RuleType::SqlAssertion(v.into()),
18856        );
18857        self
18858    }
18859}
18860
18861impl wkt::message::Message for DataQualityRule {
18862    fn typename() -> &'static str {
18863        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule"
18864    }
18865}
18866
18867/// Defines additional types related to [DataQualityRule].
18868pub mod data_quality_rule {
18869    #[allow(unused_imports)]
18870    use super::*;
18871
18872    /// Evaluates whether each column value lies between a specified range.
18873    #[derive(Clone, Default, PartialEq)]
18874    #[non_exhaustive]
18875    pub struct RangeExpectation {
18876        /// Optional. The minimum column value allowed for a row to pass this
18877        /// validation. At least one of `min_value` and `max_value` need to be
18878        /// provided.
18879        pub min_value: std::string::String,
18880
18881        /// Optional. The maximum column value allowed for a row to pass this
18882        /// validation. At least one of `min_value` and `max_value` need to be
18883        /// provided.
18884        pub max_value: std::string::String,
18885
18886        /// Optional. Whether each value needs to be strictly greater than ('>') the
18887        /// minimum, or if equality is allowed.
18888        ///
18889        /// Only relevant if a `min_value` has been defined. Default = false.
18890        pub strict_min_enabled: bool,
18891
18892        /// Optional. Whether each value needs to be strictly lesser than ('<') the
18893        /// maximum, or if equality is allowed.
18894        ///
18895        /// Only relevant if a `max_value` has been defined. Default = false.
18896        pub strict_max_enabled: bool,
18897
18898        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18899    }
18900
18901    impl RangeExpectation {
18902        pub fn new() -> Self {
18903            std::default::Default::default()
18904        }
18905
18906        /// Sets the value of [min_value][crate::model::data_quality_rule::RangeExpectation::min_value].
18907        ///
18908        /// # Example
18909        /// ```ignore,no_run
18910        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18911        /// let x = RangeExpectation::new().set_min_value("example");
18912        /// ```
18913        pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18914            self.min_value = v.into();
18915            self
18916        }
18917
18918        /// Sets the value of [max_value][crate::model::data_quality_rule::RangeExpectation::max_value].
18919        ///
18920        /// # Example
18921        /// ```ignore,no_run
18922        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18923        /// let x = RangeExpectation::new().set_max_value("example");
18924        /// ```
18925        pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18926            self.max_value = v.into();
18927            self
18928        }
18929
18930        /// Sets the value of [strict_min_enabled][crate::model::data_quality_rule::RangeExpectation::strict_min_enabled].
18931        ///
18932        /// # Example
18933        /// ```ignore,no_run
18934        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18935        /// let x = RangeExpectation::new().set_strict_min_enabled(true);
18936        /// ```
18937        pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18938            self.strict_min_enabled = v.into();
18939            self
18940        }
18941
18942        /// Sets the value of [strict_max_enabled][crate::model::data_quality_rule::RangeExpectation::strict_max_enabled].
18943        ///
18944        /// # Example
18945        /// ```ignore,no_run
18946        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18947        /// let x = RangeExpectation::new().set_strict_max_enabled(true);
18948        /// ```
18949        pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18950            self.strict_max_enabled = v.into();
18951            self
18952        }
18953    }
18954
18955    impl wkt::message::Message for RangeExpectation {
18956        fn typename() -> &'static str {
18957            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RangeExpectation"
18958        }
18959    }
18960
18961    /// Evaluates whether each column value is null.
18962    #[derive(Clone, Default, PartialEq)]
18963    #[non_exhaustive]
18964    pub struct NonNullExpectation {
18965        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18966    }
18967
18968    impl NonNullExpectation {
18969        pub fn new() -> Self {
18970            std::default::Default::default()
18971        }
18972    }
18973
18974    impl wkt::message::Message for NonNullExpectation {
18975        fn typename() -> &'static str {
18976            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation"
18977        }
18978    }
18979
18980    /// Evaluates whether each column value is contained by a specified set.
18981    #[derive(Clone, Default, PartialEq)]
18982    #[non_exhaustive]
18983    pub struct SetExpectation {
18984        /// Optional. Expected values for the column value.
18985        pub values: std::vec::Vec<std::string::String>,
18986
18987        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18988    }
18989
18990    impl SetExpectation {
18991        pub fn new() -> Self {
18992            std::default::Default::default()
18993        }
18994
18995        /// Sets the value of [values][crate::model::data_quality_rule::SetExpectation::values].
18996        ///
18997        /// # Example
18998        /// ```ignore,no_run
18999        /// # use google_cloud_dataplex_v1::model::data_quality_rule::SetExpectation;
19000        /// let x = SetExpectation::new().set_values(["a", "b", "c"]);
19001        /// ```
19002        pub fn set_values<T, V>(mut self, v: T) -> Self
19003        where
19004            T: std::iter::IntoIterator<Item = V>,
19005            V: std::convert::Into<std::string::String>,
19006        {
19007            use std::iter::Iterator;
19008            self.values = v.into_iter().map(|i| i.into()).collect();
19009            self
19010        }
19011    }
19012
19013    impl wkt::message::Message for SetExpectation {
19014        fn typename() -> &'static str {
19015            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SetExpectation"
19016        }
19017    }
19018
19019    /// Evaluates whether each column value matches a specified regex.
19020    #[derive(Clone, Default, PartialEq)]
19021    #[non_exhaustive]
19022    pub struct RegexExpectation {
19023        /// Optional. A regular expression the column value is expected to match.
19024        pub regex: std::string::String,
19025
19026        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19027    }
19028
19029    impl RegexExpectation {
19030        pub fn new() -> Self {
19031            std::default::Default::default()
19032        }
19033
19034        /// Sets the value of [regex][crate::model::data_quality_rule::RegexExpectation::regex].
19035        ///
19036        /// # Example
19037        /// ```ignore,no_run
19038        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RegexExpectation;
19039        /// let x = RegexExpectation::new().set_regex("example");
19040        /// ```
19041        pub fn set_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19042            self.regex = v.into();
19043            self
19044        }
19045    }
19046
19047    impl wkt::message::Message for RegexExpectation {
19048        fn typename() -> &'static str {
19049            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RegexExpectation"
19050        }
19051    }
19052
19053    /// Evaluates whether the column has duplicates.
19054    #[derive(Clone, Default, PartialEq)]
19055    #[non_exhaustive]
19056    pub struct UniquenessExpectation {
19057        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19058    }
19059
19060    impl UniquenessExpectation {
19061        pub fn new() -> Self {
19062            std::default::Default::default()
19063        }
19064    }
19065
19066    impl wkt::message::Message for UniquenessExpectation {
19067        fn typename() -> &'static str {
19068            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation"
19069        }
19070    }
19071
19072    /// Evaluates whether the column aggregate statistic lies between a specified
19073    /// range.
19074    #[derive(Clone, Default, PartialEq)]
19075    #[non_exhaustive]
19076    pub struct StatisticRangeExpectation {
19077        /// Optional. The aggregate metric to evaluate.
19078        pub statistic:
19079            crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
19080
19081        /// Optional. The minimum column statistic value allowed for a row to pass
19082        /// this validation.
19083        ///
19084        /// At least one of `min_value` and `max_value` need to be provided.
19085        pub min_value: std::string::String,
19086
19087        /// Optional. The maximum column statistic value allowed for a row to pass
19088        /// this validation.
19089        ///
19090        /// At least one of `min_value` and `max_value` need to be provided.
19091        pub max_value: std::string::String,
19092
19093        /// Optional. Whether column statistic needs to be strictly greater than
19094        /// ('>') the minimum, or if equality is allowed.
19095        ///
19096        /// Only relevant if a `min_value` has been defined. Default = false.
19097        pub strict_min_enabled: bool,
19098
19099        /// Optional. Whether column statistic needs to be strictly lesser than ('<')
19100        /// the maximum, or if equality is allowed.
19101        ///
19102        /// Only relevant if a `max_value` has been defined. Default = false.
19103        pub strict_max_enabled: bool,
19104
19105        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19106    }
19107
19108    impl StatisticRangeExpectation {
19109        pub fn new() -> Self {
19110            std::default::Default::default()
19111        }
19112
19113        /// Sets the value of [statistic][crate::model::data_quality_rule::StatisticRangeExpectation::statistic].
19114        ///
19115        /// # Example
19116        /// ```ignore,no_run
19117        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19118        /// use google_cloud_dataplex_v1::model::data_quality_rule::statistic_range_expectation::ColumnStatistic;
19119        /// let x0 = StatisticRangeExpectation::new().set_statistic(ColumnStatistic::Mean);
19120        /// let x1 = StatisticRangeExpectation::new().set_statistic(ColumnStatistic::Min);
19121        /// let x2 = StatisticRangeExpectation::new().set_statistic(ColumnStatistic::Max);
19122        /// ```
19123        pub fn set_statistic<
19124            T: std::convert::Into<
19125                    crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
19126                >,
19127        >(
19128            mut self,
19129            v: T,
19130        ) -> Self {
19131            self.statistic = v.into();
19132            self
19133        }
19134
19135        /// Sets the value of [min_value][crate::model::data_quality_rule::StatisticRangeExpectation::min_value].
19136        ///
19137        /// # Example
19138        /// ```ignore,no_run
19139        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19140        /// let x = StatisticRangeExpectation::new().set_min_value("example");
19141        /// ```
19142        pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19143            self.min_value = v.into();
19144            self
19145        }
19146
19147        /// Sets the value of [max_value][crate::model::data_quality_rule::StatisticRangeExpectation::max_value].
19148        ///
19149        /// # Example
19150        /// ```ignore,no_run
19151        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19152        /// let x = StatisticRangeExpectation::new().set_max_value("example");
19153        /// ```
19154        pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19155            self.max_value = v.into();
19156            self
19157        }
19158
19159        /// Sets the value of [strict_min_enabled][crate::model::data_quality_rule::StatisticRangeExpectation::strict_min_enabled].
19160        ///
19161        /// # Example
19162        /// ```ignore,no_run
19163        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19164        /// let x = StatisticRangeExpectation::new().set_strict_min_enabled(true);
19165        /// ```
19166        pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19167            self.strict_min_enabled = v.into();
19168            self
19169        }
19170
19171        /// Sets the value of [strict_max_enabled][crate::model::data_quality_rule::StatisticRangeExpectation::strict_max_enabled].
19172        ///
19173        /// # Example
19174        /// ```ignore,no_run
19175        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19176        /// let x = StatisticRangeExpectation::new().set_strict_max_enabled(true);
19177        /// ```
19178        pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19179            self.strict_max_enabled = v.into();
19180            self
19181        }
19182    }
19183
19184    impl wkt::message::Message for StatisticRangeExpectation {
19185        fn typename() -> &'static str {
19186            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation"
19187        }
19188    }
19189
19190    /// Defines additional types related to [StatisticRangeExpectation].
19191    pub mod statistic_range_expectation {
19192        #[allow(unused_imports)]
19193        use super::*;
19194
19195        /// The list of aggregate metrics a rule can be evaluated against.
19196        ///
19197        /// # Working with unknown values
19198        ///
19199        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19200        /// additional enum variants at any time. Adding new variants is not considered
19201        /// a breaking change. Applications should write their code in anticipation of:
19202        ///
19203        /// - New values appearing in future releases of the client library, **and**
19204        /// - New values received dynamically, without application changes.
19205        ///
19206        /// Please consult the [Working with enums] section in the user guide for some
19207        /// guidelines.
19208        ///
19209        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19210        #[derive(Clone, Debug, PartialEq)]
19211        #[non_exhaustive]
19212        pub enum ColumnStatistic {
19213            /// Unspecified statistic type
19214            StatisticUndefined,
19215            /// Evaluate the column mean
19216            Mean,
19217            /// Evaluate the column min
19218            Min,
19219            /// Evaluate the column max
19220            Max,
19221            /// If set, the enum was initialized with an unknown value.
19222            ///
19223            /// Applications can examine the value using [ColumnStatistic::value] or
19224            /// [ColumnStatistic::name].
19225            UnknownValue(column_statistic::UnknownValue),
19226        }
19227
19228        #[doc(hidden)]
19229        pub mod column_statistic {
19230            #[allow(unused_imports)]
19231            use super::*;
19232            #[derive(Clone, Debug, PartialEq)]
19233            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19234        }
19235
19236        impl ColumnStatistic {
19237            /// Gets the enum value.
19238            ///
19239            /// Returns `None` if the enum contains an unknown value deserialized from
19240            /// the string representation of enums.
19241            pub fn value(&self) -> std::option::Option<i32> {
19242                match self {
19243                    Self::StatisticUndefined => std::option::Option::Some(0),
19244                    Self::Mean => std::option::Option::Some(1),
19245                    Self::Min => std::option::Option::Some(2),
19246                    Self::Max => std::option::Option::Some(3),
19247                    Self::UnknownValue(u) => u.0.value(),
19248                }
19249            }
19250
19251            /// Gets the enum value as a string.
19252            ///
19253            /// Returns `None` if the enum contains an unknown value deserialized from
19254            /// the integer representation of enums.
19255            pub fn name(&self) -> std::option::Option<&str> {
19256                match self {
19257                    Self::StatisticUndefined => std::option::Option::Some("STATISTIC_UNDEFINED"),
19258                    Self::Mean => std::option::Option::Some("MEAN"),
19259                    Self::Min => std::option::Option::Some("MIN"),
19260                    Self::Max => std::option::Option::Some("MAX"),
19261                    Self::UnknownValue(u) => u.0.name(),
19262                }
19263            }
19264        }
19265
19266        impl std::default::Default for ColumnStatistic {
19267            fn default() -> Self {
19268                use std::convert::From;
19269                Self::from(0)
19270            }
19271        }
19272
19273        impl std::fmt::Display for ColumnStatistic {
19274            fn fmt(
19275                &self,
19276                f: &mut std::fmt::Formatter<'_>,
19277            ) -> std::result::Result<(), std::fmt::Error> {
19278                wkt::internal::display_enum(f, self.name(), self.value())
19279            }
19280        }
19281
19282        impl std::convert::From<i32> for ColumnStatistic {
19283            fn from(value: i32) -> Self {
19284                match value {
19285                    0 => Self::StatisticUndefined,
19286                    1 => Self::Mean,
19287                    2 => Self::Min,
19288                    3 => Self::Max,
19289                    _ => Self::UnknownValue(column_statistic::UnknownValue(
19290                        wkt::internal::UnknownEnumValue::Integer(value),
19291                    )),
19292                }
19293            }
19294        }
19295
19296        impl std::convert::From<&str> for ColumnStatistic {
19297            fn from(value: &str) -> Self {
19298                use std::string::ToString;
19299                match value {
19300                    "STATISTIC_UNDEFINED" => Self::StatisticUndefined,
19301                    "MEAN" => Self::Mean,
19302                    "MIN" => Self::Min,
19303                    "MAX" => Self::Max,
19304                    _ => Self::UnknownValue(column_statistic::UnknownValue(
19305                        wkt::internal::UnknownEnumValue::String(value.to_string()),
19306                    )),
19307                }
19308            }
19309        }
19310
19311        impl serde::ser::Serialize for ColumnStatistic {
19312            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19313            where
19314                S: serde::Serializer,
19315            {
19316                match self {
19317                    Self::StatisticUndefined => serializer.serialize_i32(0),
19318                    Self::Mean => serializer.serialize_i32(1),
19319                    Self::Min => serializer.serialize_i32(2),
19320                    Self::Max => serializer.serialize_i32(3),
19321                    Self::UnknownValue(u) => u.0.serialize(serializer),
19322                }
19323            }
19324        }
19325
19326        impl<'de> serde::de::Deserialize<'de> for ColumnStatistic {
19327            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19328            where
19329                D: serde::Deserializer<'de>,
19330            {
19331                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ColumnStatistic>::new(
19332                    ".google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic"))
19333            }
19334        }
19335    }
19336
19337    /// Evaluates whether each row passes the specified condition.
19338    ///
19339    /// The SQL expression needs to use [GoogleSQL
19340    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax)
19341    /// and should produce a boolean value per row as the result.
19342    ///
19343    /// Example: col1 >= 0 AND col2 < 10
19344    #[derive(Clone, Default, PartialEq)]
19345    #[non_exhaustive]
19346    pub struct RowConditionExpectation {
19347        /// Optional. The SQL expression.
19348        pub sql_expression: std::string::String,
19349
19350        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19351    }
19352
19353    impl RowConditionExpectation {
19354        pub fn new() -> Self {
19355            std::default::Default::default()
19356        }
19357
19358        /// Sets the value of [sql_expression][crate::model::data_quality_rule::RowConditionExpectation::sql_expression].
19359        ///
19360        /// # Example
19361        /// ```ignore,no_run
19362        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RowConditionExpectation;
19363        /// let x = RowConditionExpectation::new().set_sql_expression("example");
19364        /// ```
19365        pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
19366            mut self,
19367            v: T,
19368        ) -> Self {
19369            self.sql_expression = v.into();
19370            self
19371        }
19372    }
19373
19374    impl wkt::message::Message for RowConditionExpectation {
19375        fn typename() -> &'static str {
19376            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation"
19377        }
19378    }
19379
19380    /// Evaluates whether the provided expression is true.
19381    ///
19382    /// The SQL expression needs to use [GoogleSQL
19383    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax)
19384    /// and should produce a scalar boolean result.
19385    ///
19386    /// Example: MIN(col1) >= 0
19387    #[derive(Clone, Default, PartialEq)]
19388    #[non_exhaustive]
19389    pub struct TableConditionExpectation {
19390        /// Optional. The SQL expression.
19391        pub sql_expression: std::string::String,
19392
19393        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19394    }
19395
19396    impl TableConditionExpectation {
19397        pub fn new() -> Self {
19398            std::default::Default::default()
19399        }
19400
19401        /// Sets the value of [sql_expression][crate::model::data_quality_rule::TableConditionExpectation::sql_expression].
19402        ///
19403        /// # Example
19404        /// ```ignore,no_run
19405        /// # use google_cloud_dataplex_v1::model::data_quality_rule::TableConditionExpectation;
19406        /// let x = TableConditionExpectation::new().set_sql_expression("example");
19407        /// ```
19408        pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
19409            mut self,
19410            v: T,
19411        ) -> Self {
19412            self.sql_expression = v.into();
19413            self
19414        }
19415    }
19416
19417    impl wkt::message::Message for TableConditionExpectation {
19418        fn typename() -> &'static str {
19419            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation"
19420        }
19421    }
19422
19423    /// A SQL statement that is evaluated to return rows that match an invalid
19424    /// state. If any rows are are returned, this rule fails.
19425    ///
19426    /// The SQL statement must use [GoogleSQL
19427    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax),
19428    /// and must not contain any semicolons.
19429    ///
19430    /// You can use the data reference parameter `${data()}` to reference the
19431    /// source table with all of its precondition filters applied. Examples of
19432    /// precondition filters include row filters, incremental data filters, and
19433    /// sampling. For more information, see [Data reference
19434    /// parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
19435    ///
19436    /// Example: `SELECT * FROM ${data()} WHERE price < 0`
19437    #[derive(Clone, Default, PartialEq)]
19438    #[non_exhaustive]
19439    pub struct SqlAssertion {
19440        /// Optional. The SQL statement.
19441        pub sql_statement: std::string::String,
19442
19443        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19444    }
19445
19446    impl SqlAssertion {
19447        pub fn new() -> Self {
19448            std::default::Default::default()
19449        }
19450
19451        /// Sets the value of [sql_statement][crate::model::data_quality_rule::SqlAssertion::sql_statement].
19452        ///
19453        /// # Example
19454        /// ```ignore,no_run
19455        /// # use google_cloud_dataplex_v1::model::data_quality_rule::SqlAssertion;
19456        /// let x = SqlAssertion::new().set_sql_statement("example");
19457        /// ```
19458        pub fn set_sql_statement<T: std::convert::Into<std::string::String>>(
19459            mut self,
19460            v: T,
19461        ) -> Self {
19462            self.sql_statement = v.into();
19463            self
19464        }
19465    }
19466
19467    impl wkt::message::Message for SqlAssertion {
19468        fn typename() -> &'static str {
19469            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SqlAssertion"
19470        }
19471    }
19472
19473    /// The rule-specific configuration.
19474    #[derive(Clone, Debug, PartialEq)]
19475    #[non_exhaustive]
19476    pub enum RuleType {
19477        /// Row-level rule which evaluates whether each column value lies between a
19478        /// specified range.
19479        RangeExpectation(std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>),
19480        /// Row-level rule which evaluates whether each column value is null.
19481        NonNullExpectation(std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>),
19482        /// Row-level rule which evaluates whether each column value is contained by
19483        /// a specified set.
19484        SetExpectation(std::boxed::Box<crate::model::data_quality_rule::SetExpectation>),
19485        /// Row-level rule which evaluates whether each column value matches a
19486        /// specified regex.
19487        RegexExpectation(std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>),
19488        /// Row-level rule which evaluates whether each column value is unique.
19489        UniquenessExpectation(
19490            std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>,
19491        ),
19492        /// Aggregate rule which evaluates whether the column aggregate
19493        /// statistic lies between a specified range.
19494        StatisticRangeExpectation(
19495            std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
19496        ),
19497        /// Row-level rule which evaluates whether each row in a table passes the
19498        /// specified condition.
19499        RowConditionExpectation(
19500            std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
19501        ),
19502        /// Aggregate rule which evaluates whether the provided expression is true
19503        /// for a table.
19504        TableConditionExpectation(
19505            std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
19506        ),
19507        /// Aggregate rule which evaluates the number of rows returned for the
19508        /// provided statement. If any rows are returned, this rule fails.
19509        SqlAssertion(std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>),
19510    }
19511}
19512
19513/// DataQualityColumnResult provides a more detailed, per-column view of
19514/// the results.
19515#[derive(Clone, Default, PartialEq)]
19516#[non_exhaustive]
19517pub struct DataQualityColumnResult {
19518    /// Output only. The column specified in the DataQualityRule.
19519    pub column: std::string::String,
19520
19521    /// Output only. The column-level data quality score for this data scan job if
19522    /// and only if the 'column' field is set.
19523    ///
19524    /// The score ranges between between [0, 100] (up to two decimal
19525    /// points).
19526    pub score: std::option::Option<f32>,
19527
19528    /// Output only. Whether the column passed or failed.
19529    pub passed: bool,
19530
19531    /// Output only. The dimension-level results for this column.
19532    pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
19533
19534    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19535}
19536
19537impl DataQualityColumnResult {
19538    pub fn new() -> Self {
19539        std::default::Default::default()
19540    }
19541
19542    /// Sets the value of [column][crate::model::DataQualityColumnResult::column].
19543    ///
19544    /// # Example
19545    /// ```ignore,no_run
19546    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19547    /// let x = DataQualityColumnResult::new().set_column("example");
19548    /// ```
19549    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19550        self.column = v.into();
19551        self
19552    }
19553
19554    /// Sets the value of [score][crate::model::DataQualityColumnResult::score].
19555    ///
19556    /// # Example
19557    /// ```ignore,no_run
19558    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19559    /// let x = DataQualityColumnResult::new().set_score(42.0);
19560    /// ```
19561    pub fn set_score<T>(mut self, v: T) -> Self
19562    where
19563        T: std::convert::Into<f32>,
19564    {
19565        self.score = std::option::Option::Some(v.into());
19566        self
19567    }
19568
19569    /// Sets or clears the value of [score][crate::model::DataQualityColumnResult::score].
19570    ///
19571    /// # Example
19572    /// ```ignore,no_run
19573    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19574    /// let x = DataQualityColumnResult::new().set_or_clear_score(Some(42.0));
19575    /// let x = DataQualityColumnResult::new().set_or_clear_score(None::<f32>);
19576    /// ```
19577    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
19578    where
19579        T: std::convert::Into<f32>,
19580    {
19581        self.score = v.map(|x| x.into());
19582        self
19583    }
19584
19585    /// Sets the value of [passed][crate::model::DataQualityColumnResult::passed].
19586    ///
19587    /// # Example
19588    /// ```ignore,no_run
19589    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19590    /// let x = DataQualityColumnResult::new().set_passed(true);
19591    /// ```
19592    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19593        self.passed = v.into();
19594        self
19595    }
19596
19597    /// Sets the value of [dimensions][crate::model::DataQualityColumnResult::dimensions].
19598    ///
19599    /// # Example
19600    /// ```ignore,no_run
19601    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19602    /// use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
19603    /// let x = DataQualityColumnResult::new()
19604    ///     .set_dimensions([
19605    ///         DataQualityDimensionResult::default()/* use setters */,
19606    ///         DataQualityDimensionResult::default()/* use (different) setters */,
19607    ///     ]);
19608    /// ```
19609    pub fn set_dimensions<T, V>(mut self, v: T) -> Self
19610    where
19611        T: std::iter::IntoIterator<Item = V>,
19612        V: std::convert::Into<crate::model::DataQualityDimensionResult>,
19613    {
19614        use std::iter::Iterator;
19615        self.dimensions = v.into_iter().map(|i| i.into()).collect();
19616        self
19617    }
19618}
19619
19620impl wkt::message::Message for DataQualityColumnResult {
19621    fn typename() -> &'static str {
19622        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityColumnResult"
19623    }
19624}
19625
19626/// DataTaxonomy represents a set of hierarchical DataAttributes resources,
19627/// grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes
19628/// to manage PII data. It is defined at project level.
19629#[derive(Clone, Default, PartialEq)]
19630#[non_exhaustive]
19631#[deprecated]
19632pub struct DataTaxonomy {
19633    /// Output only. The relative resource name of the DataTaxonomy, of the form:
19634    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
19635    pub name: std::string::String,
19636
19637    /// Output only. System generated globally unique ID for the dataTaxonomy. This
19638    /// ID will be different if the DataTaxonomy is deleted and re-created with the
19639    /// same name.
19640    pub uid: std::string::String,
19641
19642    /// Output only. The time when the DataTaxonomy was created.
19643    pub create_time: std::option::Option<wkt::Timestamp>,
19644
19645    /// Output only. The time when the DataTaxonomy was last updated.
19646    pub update_time: std::option::Option<wkt::Timestamp>,
19647
19648    /// Optional. Description of the DataTaxonomy.
19649    pub description: std::string::String,
19650
19651    /// Optional. User friendly display name.
19652    pub display_name: std::string::String,
19653
19654    /// Optional. User-defined labels for the DataTaxonomy.
19655    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
19656
19657    /// Output only. The number of attributes in the DataTaxonomy.
19658    pub attribute_count: i32,
19659
19660    /// This checksum is computed by the server based on the value of other
19661    /// fields, and may be sent on update and delete requests to ensure the
19662    /// client has an up-to-date value before proceeding.
19663    pub etag: std::string::String,
19664
19665    /// Output only. The number of classes in the DataTaxonomy.
19666    pub class_count: i32,
19667
19668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19669}
19670
19671impl DataTaxonomy {
19672    pub fn new() -> Self {
19673        std::default::Default::default()
19674    }
19675
19676    /// Sets the value of [name][crate::model::DataTaxonomy::name].
19677    ///
19678    /// # Example
19679    /// ```ignore,no_run
19680    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19681    /// let x = DataTaxonomy::new().set_name("example");
19682    /// ```
19683    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19684        self.name = v.into();
19685        self
19686    }
19687
19688    /// Sets the value of [uid][crate::model::DataTaxonomy::uid].
19689    ///
19690    /// # Example
19691    /// ```ignore,no_run
19692    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19693    /// let x = DataTaxonomy::new().set_uid("example");
19694    /// ```
19695    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19696        self.uid = v.into();
19697        self
19698    }
19699
19700    /// Sets the value of [create_time][crate::model::DataTaxonomy::create_time].
19701    ///
19702    /// # Example
19703    /// ```ignore,no_run
19704    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19705    /// use wkt::Timestamp;
19706    /// let x = DataTaxonomy::new().set_create_time(Timestamp::default()/* use setters */);
19707    /// ```
19708    pub fn set_create_time<T>(mut self, v: T) -> Self
19709    where
19710        T: std::convert::Into<wkt::Timestamp>,
19711    {
19712        self.create_time = std::option::Option::Some(v.into());
19713        self
19714    }
19715
19716    /// Sets or clears the value of [create_time][crate::model::DataTaxonomy::create_time].
19717    ///
19718    /// # Example
19719    /// ```ignore,no_run
19720    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19721    /// use wkt::Timestamp;
19722    /// let x = DataTaxonomy::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
19723    /// let x = DataTaxonomy::new().set_or_clear_create_time(None::<Timestamp>);
19724    /// ```
19725    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
19726    where
19727        T: std::convert::Into<wkt::Timestamp>,
19728    {
19729        self.create_time = v.map(|x| x.into());
19730        self
19731    }
19732
19733    /// Sets the value of [update_time][crate::model::DataTaxonomy::update_time].
19734    ///
19735    /// # Example
19736    /// ```ignore,no_run
19737    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19738    /// use wkt::Timestamp;
19739    /// let x = DataTaxonomy::new().set_update_time(Timestamp::default()/* use setters */);
19740    /// ```
19741    pub fn set_update_time<T>(mut self, v: T) -> Self
19742    where
19743        T: std::convert::Into<wkt::Timestamp>,
19744    {
19745        self.update_time = std::option::Option::Some(v.into());
19746        self
19747    }
19748
19749    /// Sets or clears the value of [update_time][crate::model::DataTaxonomy::update_time].
19750    ///
19751    /// # Example
19752    /// ```ignore,no_run
19753    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19754    /// use wkt::Timestamp;
19755    /// let x = DataTaxonomy::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
19756    /// let x = DataTaxonomy::new().set_or_clear_update_time(None::<Timestamp>);
19757    /// ```
19758    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
19759    where
19760        T: std::convert::Into<wkt::Timestamp>,
19761    {
19762        self.update_time = v.map(|x| x.into());
19763        self
19764    }
19765
19766    /// Sets the value of [description][crate::model::DataTaxonomy::description].
19767    ///
19768    /// # Example
19769    /// ```ignore,no_run
19770    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19771    /// let x = DataTaxonomy::new().set_description("example");
19772    /// ```
19773    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19774        self.description = v.into();
19775        self
19776    }
19777
19778    /// Sets the value of [display_name][crate::model::DataTaxonomy::display_name].
19779    ///
19780    /// # Example
19781    /// ```ignore,no_run
19782    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19783    /// let x = DataTaxonomy::new().set_display_name("example");
19784    /// ```
19785    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19786        self.display_name = v.into();
19787        self
19788    }
19789
19790    /// Sets the value of [labels][crate::model::DataTaxonomy::labels].
19791    ///
19792    /// # Example
19793    /// ```ignore,no_run
19794    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19795    /// let x = DataTaxonomy::new().set_labels([
19796    ///     ("key0", "abc"),
19797    ///     ("key1", "xyz"),
19798    /// ]);
19799    /// ```
19800    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
19801    where
19802        T: std::iter::IntoIterator<Item = (K, V)>,
19803        K: std::convert::Into<std::string::String>,
19804        V: std::convert::Into<std::string::String>,
19805    {
19806        use std::iter::Iterator;
19807        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19808        self
19809    }
19810
19811    /// Sets the value of [attribute_count][crate::model::DataTaxonomy::attribute_count].
19812    ///
19813    /// # Example
19814    /// ```ignore,no_run
19815    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19816    /// let x = DataTaxonomy::new().set_attribute_count(42);
19817    /// ```
19818    pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19819        self.attribute_count = v.into();
19820        self
19821    }
19822
19823    /// Sets the value of [etag][crate::model::DataTaxonomy::etag].
19824    ///
19825    /// # Example
19826    /// ```ignore,no_run
19827    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19828    /// let x = DataTaxonomy::new().set_etag("example");
19829    /// ```
19830    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19831        self.etag = v.into();
19832        self
19833    }
19834
19835    /// Sets the value of [class_count][crate::model::DataTaxonomy::class_count].
19836    ///
19837    /// # Example
19838    /// ```ignore,no_run
19839    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19840    /// let x = DataTaxonomy::new().set_class_count(42);
19841    /// ```
19842    pub fn set_class_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19843        self.class_count = v.into();
19844        self
19845    }
19846}
19847
19848impl wkt::message::Message for DataTaxonomy {
19849    fn typename() -> &'static str {
19850        "type.googleapis.com/google.cloud.dataplex.v1.DataTaxonomy"
19851    }
19852}
19853
19854/// Denotes one dataAttribute in a dataTaxonomy, for example, PII.
19855/// DataAttribute resources can be defined in a hierarchy.
19856/// A single dataAttribute resource can contain specs of multiple types
19857///
19858/// ```norust
19859/// PII
19860///   - ResourceAccessSpec :
19861///                 - readers :foo@bar.com
19862///   - DataAccessSpec :
19863///                 - readers :bar@foo.com
19864/// ```
19865#[derive(Clone, Default, PartialEq)]
19866#[non_exhaustive]
19867#[deprecated]
19868pub struct DataAttribute {
19869    /// Output only. The relative resource name of the dataAttribute, of the form:
19870    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
19871    pub name: std::string::String,
19872
19873    /// Output only. System generated globally unique ID for the DataAttribute.
19874    /// This ID will be different if the DataAttribute is deleted and re-created
19875    /// with the same name.
19876    pub uid: std::string::String,
19877
19878    /// Output only. The time when the DataAttribute was created.
19879    pub create_time: std::option::Option<wkt::Timestamp>,
19880
19881    /// Output only. The time when the DataAttribute was last updated.
19882    pub update_time: std::option::Option<wkt::Timestamp>,
19883
19884    /// Optional. Description of the DataAttribute.
19885    pub description: std::string::String,
19886
19887    /// Optional. User friendly display name.
19888    pub display_name: std::string::String,
19889
19890    /// Optional. User-defined labels for the DataAttribute.
19891    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
19892
19893    /// Optional. The ID of the parent DataAttribute resource, should belong to the
19894    /// same data taxonomy. Circular dependency in parent chain is not valid.
19895    /// Maximum depth of the hierarchy allowed is 4.
19896    /// [a -> b -> c -> d -> e, depth = 4]
19897    pub parent_id: std::string::String,
19898
19899    /// Output only. The number of child attributes present for this attribute.
19900    pub attribute_count: i32,
19901
19902    /// This checksum is computed by the server based on the value of other
19903    /// fields, and may be sent on update and delete requests to ensure the
19904    /// client has an up-to-date value before proceeding.
19905    pub etag: std::string::String,
19906
19907    /// Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
19908    /// BigQuery dataset, BigQuery table).
19909    pub resource_access_spec: std::option::Option<crate::model::ResourceAccessSpec>,
19910
19911    /// Optional. Specified when applied to data stored on the resource (eg: rows,
19912    /// columns in BigQuery Tables).
19913    pub data_access_spec: std::option::Option<crate::model::DataAccessSpec>,
19914
19915    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19916}
19917
19918impl DataAttribute {
19919    pub fn new() -> Self {
19920        std::default::Default::default()
19921    }
19922
19923    /// Sets the value of [name][crate::model::DataAttribute::name].
19924    ///
19925    /// # Example
19926    /// ```ignore,no_run
19927    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19928    /// let x = DataAttribute::new().set_name("example");
19929    /// ```
19930    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19931        self.name = v.into();
19932        self
19933    }
19934
19935    /// Sets the value of [uid][crate::model::DataAttribute::uid].
19936    ///
19937    /// # Example
19938    /// ```ignore,no_run
19939    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19940    /// let x = DataAttribute::new().set_uid("example");
19941    /// ```
19942    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19943        self.uid = v.into();
19944        self
19945    }
19946
19947    /// Sets the value of [create_time][crate::model::DataAttribute::create_time].
19948    ///
19949    /// # Example
19950    /// ```ignore,no_run
19951    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19952    /// use wkt::Timestamp;
19953    /// let x = DataAttribute::new().set_create_time(Timestamp::default()/* use setters */);
19954    /// ```
19955    pub fn set_create_time<T>(mut self, v: T) -> Self
19956    where
19957        T: std::convert::Into<wkt::Timestamp>,
19958    {
19959        self.create_time = std::option::Option::Some(v.into());
19960        self
19961    }
19962
19963    /// Sets or clears the value of [create_time][crate::model::DataAttribute::create_time].
19964    ///
19965    /// # Example
19966    /// ```ignore,no_run
19967    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19968    /// use wkt::Timestamp;
19969    /// let x = DataAttribute::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
19970    /// let x = DataAttribute::new().set_or_clear_create_time(None::<Timestamp>);
19971    /// ```
19972    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
19973    where
19974        T: std::convert::Into<wkt::Timestamp>,
19975    {
19976        self.create_time = v.map(|x| x.into());
19977        self
19978    }
19979
19980    /// Sets the value of [update_time][crate::model::DataAttribute::update_time].
19981    ///
19982    /// # Example
19983    /// ```ignore,no_run
19984    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19985    /// use wkt::Timestamp;
19986    /// let x = DataAttribute::new().set_update_time(Timestamp::default()/* use setters */);
19987    /// ```
19988    pub fn set_update_time<T>(mut self, v: T) -> Self
19989    where
19990        T: std::convert::Into<wkt::Timestamp>,
19991    {
19992        self.update_time = std::option::Option::Some(v.into());
19993        self
19994    }
19995
19996    /// Sets or clears the value of [update_time][crate::model::DataAttribute::update_time].
19997    ///
19998    /// # Example
19999    /// ```ignore,no_run
20000    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20001    /// use wkt::Timestamp;
20002    /// let x = DataAttribute::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
20003    /// let x = DataAttribute::new().set_or_clear_update_time(None::<Timestamp>);
20004    /// ```
20005    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
20006    where
20007        T: std::convert::Into<wkt::Timestamp>,
20008    {
20009        self.update_time = v.map(|x| x.into());
20010        self
20011    }
20012
20013    /// Sets the value of [description][crate::model::DataAttribute::description].
20014    ///
20015    /// # Example
20016    /// ```ignore,no_run
20017    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20018    /// let x = DataAttribute::new().set_description("example");
20019    /// ```
20020    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20021        self.description = v.into();
20022        self
20023    }
20024
20025    /// Sets the value of [display_name][crate::model::DataAttribute::display_name].
20026    ///
20027    /// # Example
20028    /// ```ignore,no_run
20029    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20030    /// let x = DataAttribute::new().set_display_name("example");
20031    /// ```
20032    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20033        self.display_name = v.into();
20034        self
20035    }
20036
20037    /// Sets the value of [labels][crate::model::DataAttribute::labels].
20038    ///
20039    /// # Example
20040    /// ```ignore,no_run
20041    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20042    /// let x = DataAttribute::new().set_labels([
20043    ///     ("key0", "abc"),
20044    ///     ("key1", "xyz"),
20045    /// ]);
20046    /// ```
20047    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20048    where
20049        T: std::iter::IntoIterator<Item = (K, V)>,
20050        K: std::convert::Into<std::string::String>,
20051        V: std::convert::Into<std::string::String>,
20052    {
20053        use std::iter::Iterator;
20054        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20055        self
20056    }
20057
20058    /// Sets the value of [parent_id][crate::model::DataAttribute::parent_id].
20059    ///
20060    /// # Example
20061    /// ```ignore,no_run
20062    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20063    /// let x = DataAttribute::new().set_parent_id("example");
20064    /// ```
20065    pub fn set_parent_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20066        self.parent_id = v.into();
20067        self
20068    }
20069
20070    /// Sets the value of [attribute_count][crate::model::DataAttribute::attribute_count].
20071    ///
20072    /// # Example
20073    /// ```ignore,no_run
20074    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20075    /// let x = DataAttribute::new().set_attribute_count(42);
20076    /// ```
20077    pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20078        self.attribute_count = v.into();
20079        self
20080    }
20081
20082    /// Sets the value of [etag][crate::model::DataAttribute::etag].
20083    ///
20084    /// # Example
20085    /// ```ignore,no_run
20086    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20087    /// let x = DataAttribute::new().set_etag("example");
20088    /// ```
20089    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20090        self.etag = v.into();
20091        self
20092    }
20093
20094    /// Sets the value of [resource_access_spec][crate::model::DataAttribute::resource_access_spec].
20095    ///
20096    /// # Example
20097    /// ```ignore,no_run
20098    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20099    /// use google_cloud_dataplex_v1::model::ResourceAccessSpec;
20100    /// let x = DataAttribute::new().set_resource_access_spec(ResourceAccessSpec::default()/* use setters */);
20101    /// ```
20102    pub fn set_resource_access_spec<T>(mut self, v: T) -> Self
20103    where
20104        T: std::convert::Into<crate::model::ResourceAccessSpec>,
20105    {
20106        self.resource_access_spec = std::option::Option::Some(v.into());
20107        self
20108    }
20109
20110    /// Sets or clears the value of [resource_access_spec][crate::model::DataAttribute::resource_access_spec].
20111    ///
20112    /// # Example
20113    /// ```ignore,no_run
20114    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20115    /// use google_cloud_dataplex_v1::model::ResourceAccessSpec;
20116    /// let x = DataAttribute::new().set_or_clear_resource_access_spec(Some(ResourceAccessSpec::default()/* use setters */));
20117    /// let x = DataAttribute::new().set_or_clear_resource_access_spec(None::<ResourceAccessSpec>);
20118    /// ```
20119    pub fn set_or_clear_resource_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
20120    where
20121        T: std::convert::Into<crate::model::ResourceAccessSpec>,
20122    {
20123        self.resource_access_spec = v.map(|x| x.into());
20124        self
20125    }
20126
20127    /// Sets the value of [data_access_spec][crate::model::DataAttribute::data_access_spec].
20128    ///
20129    /// # Example
20130    /// ```ignore,no_run
20131    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20132    /// use google_cloud_dataplex_v1::model::DataAccessSpec;
20133    /// let x = DataAttribute::new().set_data_access_spec(DataAccessSpec::default()/* use setters */);
20134    /// ```
20135    pub fn set_data_access_spec<T>(mut self, v: T) -> Self
20136    where
20137        T: std::convert::Into<crate::model::DataAccessSpec>,
20138    {
20139        self.data_access_spec = std::option::Option::Some(v.into());
20140        self
20141    }
20142
20143    /// Sets or clears the value of [data_access_spec][crate::model::DataAttribute::data_access_spec].
20144    ///
20145    /// # Example
20146    /// ```ignore,no_run
20147    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20148    /// use google_cloud_dataplex_v1::model::DataAccessSpec;
20149    /// let x = DataAttribute::new().set_or_clear_data_access_spec(Some(DataAccessSpec::default()/* use setters */));
20150    /// let x = DataAttribute::new().set_or_clear_data_access_spec(None::<DataAccessSpec>);
20151    /// ```
20152    pub fn set_or_clear_data_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
20153    where
20154        T: std::convert::Into<crate::model::DataAccessSpec>,
20155    {
20156        self.data_access_spec = v.map(|x| x.into());
20157        self
20158    }
20159}
20160
20161impl wkt::message::Message for DataAttribute {
20162    fn typename() -> &'static str {
20163        "type.googleapis.com/google.cloud.dataplex.v1.DataAttribute"
20164    }
20165}
20166
20167/// DataAttributeBinding represents binding of attributes to resources. Eg: Bind
20168/// 'CustomerInfo' entity with 'PII' attribute.
20169#[derive(Clone, Default, PartialEq)]
20170#[non_exhaustive]
20171#[deprecated]
20172pub struct DataAttributeBinding {
20173    /// Output only. The relative resource name of the Data Attribute Binding, of
20174    /// the form:
20175    /// projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
20176    pub name: std::string::String,
20177
20178    /// Output only. System generated globally unique ID for the
20179    /// DataAttributeBinding. This ID will be different if the DataAttributeBinding
20180    /// is deleted and re-created with the same name.
20181    pub uid: std::string::String,
20182
20183    /// Output only. The time when the DataAttributeBinding was created.
20184    pub create_time: std::option::Option<wkt::Timestamp>,
20185
20186    /// Output only. The time when the DataAttributeBinding was last updated.
20187    pub update_time: std::option::Option<wkt::Timestamp>,
20188
20189    /// Optional. Description of the DataAttributeBinding.
20190    pub description: std::string::String,
20191
20192    /// Optional. User friendly display name.
20193    pub display_name: std::string::String,
20194
20195    /// Optional. User-defined labels for the DataAttributeBinding.
20196    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
20197
20198    /// This checksum is computed by the server based on the value of other
20199    /// fields, and may be sent on update and delete requests to ensure the
20200    /// client has an up-to-date value before proceeding.
20201    /// Etags must be used when calling the DeleteDataAttributeBinding and the
20202    /// UpdateDataAttributeBinding method.
20203    pub etag: std::string::String,
20204
20205    /// Optional. List of attributes to be associated with the resource, provided
20206    /// in the form:
20207    /// projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
20208    pub attributes: std::vec::Vec<std::string::String>,
20209
20210    /// Optional. The list of paths for items within the associated resource (eg.
20211    /// columns and partitions within a table) along with attribute bindings.
20212    pub paths: std::vec::Vec<crate::model::data_attribute_binding::Path>,
20213
20214    /// The reference to the resource that is associated to attributes, or
20215    /// the query to match resources and associate attributes.
20216    pub resource_reference:
20217        std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
20218
20219    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20220}
20221
20222impl DataAttributeBinding {
20223    pub fn new() -> Self {
20224        std::default::Default::default()
20225    }
20226
20227    /// Sets the value of [name][crate::model::DataAttributeBinding::name].
20228    ///
20229    /// # Example
20230    /// ```ignore,no_run
20231    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20232    /// let x = DataAttributeBinding::new().set_name("example");
20233    /// ```
20234    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20235        self.name = v.into();
20236        self
20237    }
20238
20239    /// Sets the value of [uid][crate::model::DataAttributeBinding::uid].
20240    ///
20241    /// # Example
20242    /// ```ignore,no_run
20243    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20244    /// let x = DataAttributeBinding::new().set_uid("example");
20245    /// ```
20246    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20247        self.uid = v.into();
20248        self
20249    }
20250
20251    /// Sets the value of [create_time][crate::model::DataAttributeBinding::create_time].
20252    ///
20253    /// # Example
20254    /// ```ignore,no_run
20255    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20256    /// use wkt::Timestamp;
20257    /// let x = DataAttributeBinding::new().set_create_time(Timestamp::default()/* use setters */);
20258    /// ```
20259    pub fn set_create_time<T>(mut self, v: T) -> Self
20260    where
20261        T: std::convert::Into<wkt::Timestamp>,
20262    {
20263        self.create_time = std::option::Option::Some(v.into());
20264        self
20265    }
20266
20267    /// Sets or clears the value of [create_time][crate::model::DataAttributeBinding::create_time].
20268    ///
20269    /// # Example
20270    /// ```ignore,no_run
20271    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20272    /// use wkt::Timestamp;
20273    /// let x = DataAttributeBinding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
20274    /// let x = DataAttributeBinding::new().set_or_clear_create_time(None::<Timestamp>);
20275    /// ```
20276    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
20277    where
20278        T: std::convert::Into<wkt::Timestamp>,
20279    {
20280        self.create_time = v.map(|x| x.into());
20281        self
20282    }
20283
20284    /// Sets the value of [update_time][crate::model::DataAttributeBinding::update_time].
20285    ///
20286    /// # Example
20287    /// ```ignore,no_run
20288    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20289    /// use wkt::Timestamp;
20290    /// let x = DataAttributeBinding::new().set_update_time(Timestamp::default()/* use setters */);
20291    /// ```
20292    pub fn set_update_time<T>(mut self, v: T) -> Self
20293    where
20294        T: std::convert::Into<wkt::Timestamp>,
20295    {
20296        self.update_time = std::option::Option::Some(v.into());
20297        self
20298    }
20299
20300    /// Sets or clears the value of [update_time][crate::model::DataAttributeBinding::update_time].
20301    ///
20302    /// # Example
20303    /// ```ignore,no_run
20304    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20305    /// use wkt::Timestamp;
20306    /// let x = DataAttributeBinding::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
20307    /// let x = DataAttributeBinding::new().set_or_clear_update_time(None::<Timestamp>);
20308    /// ```
20309    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
20310    where
20311        T: std::convert::Into<wkt::Timestamp>,
20312    {
20313        self.update_time = v.map(|x| x.into());
20314        self
20315    }
20316
20317    /// Sets the value of [description][crate::model::DataAttributeBinding::description].
20318    ///
20319    /// # Example
20320    /// ```ignore,no_run
20321    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20322    /// let x = DataAttributeBinding::new().set_description("example");
20323    /// ```
20324    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20325        self.description = v.into();
20326        self
20327    }
20328
20329    /// Sets the value of [display_name][crate::model::DataAttributeBinding::display_name].
20330    ///
20331    /// # Example
20332    /// ```ignore,no_run
20333    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20334    /// let x = DataAttributeBinding::new().set_display_name("example");
20335    /// ```
20336    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20337        self.display_name = v.into();
20338        self
20339    }
20340
20341    /// Sets the value of [labels][crate::model::DataAttributeBinding::labels].
20342    ///
20343    /// # Example
20344    /// ```ignore,no_run
20345    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20346    /// let x = DataAttributeBinding::new().set_labels([
20347    ///     ("key0", "abc"),
20348    ///     ("key1", "xyz"),
20349    /// ]);
20350    /// ```
20351    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20352    where
20353        T: std::iter::IntoIterator<Item = (K, V)>,
20354        K: std::convert::Into<std::string::String>,
20355        V: std::convert::Into<std::string::String>,
20356    {
20357        use std::iter::Iterator;
20358        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20359        self
20360    }
20361
20362    /// Sets the value of [etag][crate::model::DataAttributeBinding::etag].
20363    ///
20364    /// # Example
20365    /// ```ignore,no_run
20366    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20367    /// let x = DataAttributeBinding::new().set_etag("example");
20368    /// ```
20369    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20370        self.etag = v.into();
20371        self
20372    }
20373
20374    /// Sets the value of [attributes][crate::model::DataAttributeBinding::attributes].
20375    ///
20376    /// # Example
20377    /// ```ignore,no_run
20378    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20379    /// let x = DataAttributeBinding::new().set_attributes(["a", "b", "c"]);
20380    /// ```
20381    pub fn set_attributes<T, V>(mut self, v: T) -> Self
20382    where
20383        T: std::iter::IntoIterator<Item = V>,
20384        V: std::convert::Into<std::string::String>,
20385    {
20386        use std::iter::Iterator;
20387        self.attributes = v.into_iter().map(|i| i.into()).collect();
20388        self
20389    }
20390
20391    /// Sets the value of [paths][crate::model::DataAttributeBinding::paths].
20392    ///
20393    /// # Example
20394    /// ```ignore,no_run
20395    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20396    /// use google_cloud_dataplex_v1::model::data_attribute_binding::Path;
20397    /// let x = DataAttributeBinding::new()
20398    ///     .set_paths([
20399    ///         Path::default()/* use setters */,
20400    ///         Path::default()/* use (different) setters */,
20401    ///     ]);
20402    /// ```
20403    pub fn set_paths<T, V>(mut self, v: T) -> Self
20404    where
20405        T: std::iter::IntoIterator<Item = V>,
20406        V: std::convert::Into<crate::model::data_attribute_binding::Path>,
20407    {
20408        use std::iter::Iterator;
20409        self.paths = v.into_iter().map(|i| i.into()).collect();
20410        self
20411    }
20412
20413    /// Sets the value of [resource_reference][crate::model::DataAttributeBinding::resource_reference].
20414    ///
20415    /// Note that all the setters affecting `resource_reference` are mutually
20416    /// exclusive.
20417    ///
20418    /// # Example
20419    /// ```ignore,no_run
20420    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20421    /// use google_cloud_dataplex_v1::model::data_attribute_binding::ResourceReference;
20422    /// let x = DataAttributeBinding::new().set_resource_reference(Some(ResourceReference::Resource("example".to_string())));
20423    /// ```
20424    pub fn set_resource_reference<
20425        T: std::convert::Into<
20426                std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
20427            >,
20428    >(
20429        mut self,
20430        v: T,
20431    ) -> Self {
20432        self.resource_reference = v.into();
20433        self
20434    }
20435
20436    /// The value of [resource_reference][crate::model::DataAttributeBinding::resource_reference]
20437    /// if it holds a `Resource`, `None` if the field is not set or
20438    /// holds a different branch.
20439    pub fn resource(&self) -> std::option::Option<&std::string::String> {
20440        #[allow(unreachable_patterns)]
20441        self.resource_reference.as_ref().and_then(|v| match v {
20442            crate::model::data_attribute_binding::ResourceReference::Resource(v) => {
20443                std::option::Option::Some(v)
20444            }
20445            _ => std::option::Option::None,
20446        })
20447    }
20448
20449    /// Sets the value of [resource_reference][crate::model::DataAttributeBinding::resource_reference]
20450    /// to hold a `Resource`.
20451    ///
20452    /// Note that all the setters affecting `resource_reference` are
20453    /// mutually exclusive.
20454    ///
20455    /// # Example
20456    /// ```ignore,no_run
20457    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20458    /// let x = DataAttributeBinding::new().set_resource("example");
20459    /// assert!(x.resource().is_some());
20460    /// ```
20461    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20462        self.resource_reference = std::option::Option::Some(
20463            crate::model::data_attribute_binding::ResourceReference::Resource(v.into()),
20464        );
20465        self
20466    }
20467}
20468
20469impl wkt::message::Message for DataAttributeBinding {
20470    fn typename() -> &'static str {
20471        "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding"
20472    }
20473}
20474
20475/// Defines additional types related to [DataAttributeBinding].
20476pub mod data_attribute_binding {
20477    #[allow(unused_imports)]
20478    use super::*;
20479
20480    /// Represents a subresource of the given resource, and associated bindings
20481    /// with it. Currently supported subresources are column and partition schema
20482    /// fields within a table.
20483    #[derive(Clone, Default, PartialEq)]
20484    #[non_exhaustive]
20485    pub struct Path {
20486        /// Required. The name identifier of the path.
20487        /// Nested columns should be of the form: 'address.city'.
20488        pub name: std::string::String,
20489
20490        /// Optional. List of attributes to be associated with the path of the
20491        /// resource, provided in the form:
20492        /// projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
20493        pub attributes: std::vec::Vec<std::string::String>,
20494
20495        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20496    }
20497
20498    impl Path {
20499        pub fn new() -> Self {
20500            std::default::Default::default()
20501        }
20502
20503        /// Sets the value of [name][crate::model::data_attribute_binding::Path::name].
20504        ///
20505        /// # Example
20506        /// ```ignore,no_run
20507        /// # use google_cloud_dataplex_v1::model::data_attribute_binding::Path;
20508        /// let x = Path::new().set_name("example");
20509        /// ```
20510        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20511            self.name = v.into();
20512            self
20513        }
20514
20515        /// Sets the value of [attributes][crate::model::data_attribute_binding::Path::attributes].
20516        ///
20517        /// # Example
20518        /// ```ignore,no_run
20519        /// # use google_cloud_dataplex_v1::model::data_attribute_binding::Path;
20520        /// let x = Path::new().set_attributes(["a", "b", "c"]);
20521        /// ```
20522        pub fn set_attributes<T, V>(mut self, v: T) -> Self
20523        where
20524            T: std::iter::IntoIterator<Item = V>,
20525            V: std::convert::Into<std::string::String>,
20526        {
20527            use std::iter::Iterator;
20528            self.attributes = v.into_iter().map(|i| i.into()).collect();
20529            self
20530        }
20531    }
20532
20533    impl wkt::message::Message for Path {
20534        fn typename() -> &'static str {
20535            "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding.Path"
20536        }
20537    }
20538
20539    /// The reference to the resource that is associated to attributes, or
20540    /// the query to match resources and associate attributes.
20541    #[derive(Clone, Debug, PartialEq)]
20542    #[non_exhaustive]
20543    pub enum ResourceReference {
20544        /// Optional. Immutable. The resource name of the resource that is associated
20545        /// to attributes. Presently, only entity resource is supported in the form:
20546        /// projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
20547        /// Must belong in the same project and region as the attribute binding, and
20548        /// there can only exist one active binding for a resource.
20549        Resource(std::string::String),
20550    }
20551}
20552
20553/// Create DataTaxonomy request.
20554#[derive(Clone, Default, PartialEq)]
20555#[non_exhaustive]
20556#[deprecated]
20557pub struct CreateDataTaxonomyRequest {
20558    pub parent: std::string::String,
20559
20560    /// Required. DataTaxonomy identifier.
20561    ///
20562    /// * Must contain only lowercase letters, numbers and hyphens.
20563    /// * Must start with a letter.
20564    /// * Must be between 1-63 characters.
20565    /// * Must end with a number or a letter.
20566    /// * Must be unique within the Project.
20567    pub data_taxonomy_id: std::string::String,
20568
20569    /// Required. DataTaxonomy resource.
20570    pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
20571
20572    /// Optional. Only validate the request, but do not perform mutations.
20573    /// The default is false.
20574    pub validate_only: bool,
20575
20576    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20577}
20578
20579impl CreateDataTaxonomyRequest {
20580    pub fn new() -> Self {
20581        std::default::Default::default()
20582    }
20583
20584    /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
20585    ///
20586    /// # Example
20587    /// ```ignore,no_run
20588    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20589    /// let x = CreateDataTaxonomyRequest::new().set_parent("example");
20590    /// ```
20591    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20592        self.parent = v.into();
20593        self
20594    }
20595
20596    /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
20597    ///
20598    /// # Example
20599    /// ```ignore,no_run
20600    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20601    /// let x = CreateDataTaxonomyRequest::new().set_data_taxonomy_id("example");
20602    /// ```
20603    pub fn set_data_taxonomy_id<T: std::convert::Into<std::string::String>>(
20604        mut self,
20605        v: T,
20606    ) -> Self {
20607        self.data_taxonomy_id = v.into();
20608        self
20609    }
20610
20611    /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
20612    ///
20613    /// # Example
20614    /// ```ignore,no_run
20615    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20616    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20617    /// let x = CreateDataTaxonomyRequest::new().set_data_taxonomy(DataTaxonomy::default()/* use setters */);
20618    /// ```
20619    pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
20620    where
20621        T: std::convert::Into<crate::model::DataTaxonomy>,
20622    {
20623        self.data_taxonomy = std::option::Option::Some(v.into());
20624        self
20625    }
20626
20627    /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
20628    ///
20629    /// # Example
20630    /// ```ignore,no_run
20631    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20632    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20633    /// let x = CreateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(Some(DataTaxonomy::default()/* use setters */));
20634    /// let x = CreateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(None::<DataTaxonomy>);
20635    /// ```
20636    pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
20637    where
20638        T: std::convert::Into<crate::model::DataTaxonomy>,
20639    {
20640        self.data_taxonomy = v.map(|x| x.into());
20641        self
20642    }
20643
20644    /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
20645    ///
20646    /// # Example
20647    /// ```ignore,no_run
20648    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20649    /// let x = CreateDataTaxonomyRequest::new().set_validate_only(true);
20650    /// ```
20651    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20652        self.validate_only = v.into();
20653        self
20654    }
20655}
20656
20657impl wkt::message::Message for CreateDataTaxonomyRequest {
20658    fn typename() -> &'static str {
20659        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataTaxonomyRequest"
20660    }
20661}
20662
20663/// Update DataTaxonomy request.
20664#[derive(Clone, Default, PartialEq)]
20665#[non_exhaustive]
20666#[deprecated]
20667pub struct UpdateDataTaxonomyRequest {
20668    /// Required. Mask of fields to update.
20669    pub update_mask: std::option::Option<wkt::FieldMask>,
20670
20671    /// Required. Only fields specified in `update_mask` are updated.
20672    pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
20673
20674    /// Optional. Only validate the request, but do not perform mutations.
20675    /// The default is false.
20676    pub validate_only: bool,
20677
20678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20679}
20680
20681impl UpdateDataTaxonomyRequest {
20682    pub fn new() -> Self {
20683        std::default::Default::default()
20684    }
20685
20686    /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
20687    ///
20688    /// # Example
20689    /// ```ignore,no_run
20690    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20691    /// use wkt::FieldMask;
20692    /// let x = UpdateDataTaxonomyRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20693    /// ```
20694    pub fn set_update_mask<T>(mut self, v: T) -> Self
20695    where
20696        T: std::convert::Into<wkt::FieldMask>,
20697    {
20698        self.update_mask = std::option::Option::Some(v.into());
20699        self
20700    }
20701
20702    /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
20703    ///
20704    /// # Example
20705    /// ```ignore,no_run
20706    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20707    /// use wkt::FieldMask;
20708    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20709    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20710    /// ```
20711    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20712    where
20713        T: std::convert::Into<wkt::FieldMask>,
20714    {
20715        self.update_mask = v.map(|x| x.into());
20716        self
20717    }
20718
20719    /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
20720    ///
20721    /// # Example
20722    /// ```ignore,no_run
20723    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20724    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20725    /// let x = UpdateDataTaxonomyRequest::new().set_data_taxonomy(DataTaxonomy::default()/* use setters */);
20726    /// ```
20727    pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
20728    where
20729        T: std::convert::Into<crate::model::DataTaxonomy>,
20730    {
20731        self.data_taxonomy = std::option::Option::Some(v.into());
20732        self
20733    }
20734
20735    /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
20736    ///
20737    /// # Example
20738    /// ```ignore,no_run
20739    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20740    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20741    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(Some(DataTaxonomy::default()/* use setters */));
20742    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(None::<DataTaxonomy>);
20743    /// ```
20744    pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
20745    where
20746        T: std::convert::Into<crate::model::DataTaxonomy>,
20747    {
20748        self.data_taxonomy = v.map(|x| x.into());
20749        self
20750    }
20751
20752    /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
20753    ///
20754    /// # Example
20755    /// ```ignore,no_run
20756    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20757    /// let x = UpdateDataTaxonomyRequest::new().set_validate_only(true);
20758    /// ```
20759    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20760        self.validate_only = v.into();
20761        self
20762    }
20763}
20764
20765impl wkt::message::Message for UpdateDataTaxonomyRequest {
20766    fn typename() -> &'static str {
20767        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataTaxonomyRequest"
20768    }
20769}
20770
20771/// Get DataTaxonomy request.
20772#[derive(Clone, Default, PartialEq)]
20773#[non_exhaustive]
20774#[deprecated]
20775pub struct GetDataTaxonomyRequest {
20776    pub name: std::string::String,
20777
20778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20779}
20780
20781impl GetDataTaxonomyRequest {
20782    pub fn new() -> Self {
20783        std::default::Default::default()
20784    }
20785
20786    /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
20787    ///
20788    /// # Example
20789    /// ```ignore,no_run
20790    /// # use google_cloud_dataplex_v1::model::GetDataTaxonomyRequest;
20791    /// let x = GetDataTaxonomyRequest::new().set_name("example");
20792    /// ```
20793    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20794        self.name = v.into();
20795        self
20796    }
20797}
20798
20799impl wkt::message::Message for GetDataTaxonomyRequest {
20800    fn typename() -> &'static str {
20801        "type.googleapis.com/google.cloud.dataplex.v1.GetDataTaxonomyRequest"
20802    }
20803}
20804
20805/// List DataTaxonomies request.
20806#[derive(Clone, Default, PartialEq)]
20807#[non_exhaustive]
20808pub struct ListDataTaxonomiesRequest {
20809    /// Required. The resource name of the DataTaxonomy location, of the form:
20810    /// projects/{project_number}/locations/{location_id}
20811    /// where `location_id` refers to a Google Cloud region.
20812    pub parent: std::string::String,
20813
20814    /// Optional. Maximum number of DataTaxonomies to return. The service may
20815    /// return fewer than this value. If unspecified, at most 10 DataTaxonomies
20816    /// will be returned. The maximum value is 1000; values above 1000 will be
20817    /// coerced to 1000.
20818    pub page_size: i32,
20819
20820    /// Optional. Page token received from a previous ` ListDataTaxonomies` call.
20821    /// Provide this to retrieve the subsequent page. When paginating, all other
20822    /// parameters provided to ` ListDataTaxonomies` must match the call that
20823    /// provided the page token.
20824    pub page_token: std::string::String,
20825
20826    /// Optional. Filter request.
20827    pub filter: std::string::String,
20828
20829    /// Optional. Order by fields for the result.
20830    pub order_by: std::string::String,
20831
20832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20833}
20834
20835impl ListDataTaxonomiesRequest {
20836    pub fn new() -> Self {
20837        std::default::Default::default()
20838    }
20839
20840    /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
20841    ///
20842    /// # Example
20843    /// ```ignore,no_run
20844    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20845    /// let x = ListDataTaxonomiesRequest::new().set_parent("example");
20846    /// ```
20847    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20848        self.parent = v.into();
20849        self
20850    }
20851
20852    /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
20853    ///
20854    /// # Example
20855    /// ```ignore,no_run
20856    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20857    /// let x = ListDataTaxonomiesRequest::new().set_page_size(42);
20858    /// ```
20859    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20860        self.page_size = v.into();
20861        self
20862    }
20863
20864    /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
20865    ///
20866    /// # Example
20867    /// ```ignore,no_run
20868    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20869    /// let x = ListDataTaxonomiesRequest::new().set_page_token("example");
20870    /// ```
20871    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20872        self.page_token = v.into();
20873        self
20874    }
20875
20876    /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
20877    ///
20878    /// # Example
20879    /// ```ignore,no_run
20880    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20881    /// let x = ListDataTaxonomiesRequest::new().set_filter("example");
20882    /// ```
20883    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20884        self.filter = v.into();
20885        self
20886    }
20887
20888    /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
20889    ///
20890    /// # Example
20891    /// ```ignore,no_run
20892    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20893    /// let x = ListDataTaxonomiesRequest::new().set_order_by("example");
20894    /// ```
20895    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20896        self.order_by = v.into();
20897        self
20898    }
20899}
20900
20901impl wkt::message::Message for ListDataTaxonomiesRequest {
20902    fn typename() -> &'static str {
20903        "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesRequest"
20904    }
20905}
20906
20907/// List DataTaxonomies response.
20908#[derive(Clone, Default, PartialEq)]
20909#[non_exhaustive]
20910pub struct ListDataTaxonomiesResponse {
20911    /// DataTaxonomies under the given parent location.
20912    pub data_taxonomies: std::vec::Vec<crate::model::DataTaxonomy>,
20913
20914    /// Token to retrieve the next page of results, or empty if there are no more
20915    /// results in the list.
20916    pub next_page_token: std::string::String,
20917
20918    /// Locations that could not be reached.
20919    pub unreachable_locations: std::vec::Vec<std::string::String>,
20920
20921    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20922}
20923
20924impl ListDataTaxonomiesResponse {
20925    pub fn new() -> Self {
20926        std::default::Default::default()
20927    }
20928
20929    /// Sets the value of [data_taxonomies][crate::model::ListDataTaxonomiesResponse::data_taxonomies].
20930    ///
20931    /// # Example
20932    /// ```ignore,no_run
20933    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesResponse;
20934    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20935    /// let x = ListDataTaxonomiesResponse::new()
20936    ///     .set_data_taxonomies([
20937    ///         DataTaxonomy::default()/* use setters */,
20938    ///         DataTaxonomy::default()/* use (different) setters */,
20939    ///     ]);
20940    /// ```
20941    pub fn set_data_taxonomies<T, V>(mut self, v: T) -> Self
20942    where
20943        T: std::iter::IntoIterator<Item = V>,
20944        V: std::convert::Into<crate::model::DataTaxonomy>,
20945    {
20946        use std::iter::Iterator;
20947        self.data_taxonomies = v.into_iter().map(|i| i.into()).collect();
20948        self
20949    }
20950
20951    /// Sets the value of [next_page_token][crate::model::ListDataTaxonomiesResponse::next_page_token].
20952    ///
20953    /// # Example
20954    /// ```ignore,no_run
20955    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesResponse;
20956    /// let x = ListDataTaxonomiesResponse::new().set_next_page_token("example");
20957    /// ```
20958    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20959        self.next_page_token = v.into();
20960        self
20961    }
20962
20963    /// Sets the value of [unreachable_locations][crate::model::ListDataTaxonomiesResponse::unreachable_locations].
20964    ///
20965    /// # Example
20966    /// ```ignore,no_run
20967    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesResponse;
20968    /// let x = ListDataTaxonomiesResponse::new().set_unreachable_locations(["a", "b", "c"]);
20969    /// ```
20970    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
20971    where
20972        T: std::iter::IntoIterator<Item = V>,
20973        V: std::convert::Into<std::string::String>,
20974    {
20975        use std::iter::Iterator;
20976        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
20977        self
20978    }
20979}
20980
20981impl wkt::message::Message for ListDataTaxonomiesResponse {
20982    fn typename() -> &'static str {
20983        "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesResponse"
20984    }
20985}
20986
20987#[doc(hidden)]
20988impl gax::paginator::internal::PageableResponse for ListDataTaxonomiesResponse {
20989    type PageItem = crate::model::DataTaxonomy;
20990
20991    fn items(self) -> std::vec::Vec<Self::PageItem> {
20992        self.data_taxonomies
20993    }
20994
20995    fn next_page_token(&self) -> std::string::String {
20996        use std::clone::Clone;
20997        self.next_page_token.clone()
20998    }
20999}
21000
21001/// Delete DataTaxonomy request.
21002#[derive(Clone, Default, PartialEq)]
21003#[non_exhaustive]
21004#[deprecated]
21005pub struct DeleteDataTaxonomyRequest {
21006    /// Required. The resource name of the DataTaxonomy:
21007    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
21008    pub name: std::string::String,
21009
21010    /// Optional. If the client provided etag value does not match the current etag
21011    /// value,the DeleteDataTaxonomy method returns an ABORTED error.
21012    pub etag: std::string::String,
21013
21014    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21015}
21016
21017impl DeleteDataTaxonomyRequest {
21018    pub fn new() -> Self {
21019        std::default::Default::default()
21020    }
21021
21022    /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
21023    ///
21024    /// # Example
21025    /// ```ignore,no_run
21026    /// # use google_cloud_dataplex_v1::model::DeleteDataTaxonomyRequest;
21027    /// let x = DeleteDataTaxonomyRequest::new().set_name("example");
21028    /// ```
21029    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21030        self.name = v.into();
21031        self
21032    }
21033
21034    /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
21035    ///
21036    /// # Example
21037    /// ```ignore,no_run
21038    /// # use google_cloud_dataplex_v1::model::DeleteDataTaxonomyRequest;
21039    /// let x = DeleteDataTaxonomyRequest::new().set_etag("example");
21040    /// ```
21041    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21042        self.etag = v.into();
21043        self
21044    }
21045}
21046
21047impl wkt::message::Message for DeleteDataTaxonomyRequest {
21048    fn typename() -> &'static str {
21049        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataTaxonomyRequest"
21050    }
21051}
21052
21053/// Create DataAttribute request.
21054#[derive(Clone, Default, PartialEq)]
21055#[non_exhaustive]
21056pub struct CreateDataAttributeRequest {
21057    /// Required. The resource name of the parent data taxonomy
21058    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
21059    pub parent: std::string::String,
21060
21061    /// Required. DataAttribute identifier.
21062    ///
21063    /// * Must contain only lowercase letters, numbers and hyphens.
21064    /// * Must start with a letter.
21065    /// * Must be between 1-63 characters.
21066    /// * Must end with a number or a letter.
21067    /// * Must be unique within the DataTaxonomy.
21068    pub data_attribute_id: std::string::String,
21069
21070    /// Required. DataAttribute resource.
21071    pub data_attribute: std::option::Option<crate::model::DataAttribute>,
21072
21073    /// Optional. Only validate the request, but do not perform mutations.
21074    /// The default is false.
21075    pub validate_only: bool,
21076
21077    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21078}
21079
21080impl CreateDataAttributeRequest {
21081    pub fn new() -> Self {
21082        std::default::Default::default()
21083    }
21084
21085    /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
21086    ///
21087    /// # Example
21088    /// ```ignore,no_run
21089    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21090    /// let x = CreateDataAttributeRequest::new().set_parent("example");
21091    /// ```
21092    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21093        self.parent = v.into();
21094        self
21095    }
21096
21097    /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
21098    ///
21099    /// # Example
21100    /// ```ignore,no_run
21101    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21102    /// let x = CreateDataAttributeRequest::new().set_data_attribute_id("example");
21103    /// ```
21104    pub fn set_data_attribute_id<T: std::convert::Into<std::string::String>>(
21105        mut self,
21106        v: T,
21107    ) -> Self {
21108        self.data_attribute_id = v.into();
21109        self
21110    }
21111
21112    /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
21113    ///
21114    /// # Example
21115    /// ```ignore,no_run
21116    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21117    /// use google_cloud_dataplex_v1::model::DataAttribute;
21118    /// let x = CreateDataAttributeRequest::new().set_data_attribute(DataAttribute::default()/* use setters */);
21119    /// ```
21120    pub fn set_data_attribute<T>(mut self, v: T) -> Self
21121    where
21122        T: std::convert::Into<crate::model::DataAttribute>,
21123    {
21124        self.data_attribute = std::option::Option::Some(v.into());
21125        self
21126    }
21127
21128    /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
21129    ///
21130    /// # Example
21131    /// ```ignore,no_run
21132    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21133    /// use google_cloud_dataplex_v1::model::DataAttribute;
21134    /// let x = CreateDataAttributeRequest::new().set_or_clear_data_attribute(Some(DataAttribute::default()/* use setters */));
21135    /// let x = CreateDataAttributeRequest::new().set_or_clear_data_attribute(None::<DataAttribute>);
21136    /// ```
21137    pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
21138    where
21139        T: std::convert::Into<crate::model::DataAttribute>,
21140    {
21141        self.data_attribute = v.map(|x| x.into());
21142        self
21143    }
21144
21145    /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
21146    ///
21147    /// # Example
21148    /// ```ignore,no_run
21149    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21150    /// let x = CreateDataAttributeRequest::new().set_validate_only(true);
21151    /// ```
21152    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21153        self.validate_only = v.into();
21154        self
21155    }
21156}
21157
21158impl wkt::message::Message for CreateDataAttributeRequest {
21159    fn typename() -> &'static str {
21160        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeRequest"
21161    }
21162}
21163
21164/// Update DataAttribute request.
21165#[derive(Clone, Default, PartialEq)]
21166#[non_exhaustive]
21167pub struct UpdateDataAttributeRequest {
21168    /// Required. Mask of fields to update.
21169    pub update_mask: std::option::Option<wkt::FieldMask>,
21170
21171    /// Required. Only fields specified in `update_mask` are updated.
21172    pub data_attribute: std::option::Option<crate::model::DataAttribute>,
21173
21174    /// Optional. Only validate the request, but do not perform mutations.
21175    /// The default is false.
21176    pub validate_only: bool,
21177
21178    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21179}
21180
21181impl UpdateDataAttributeRequest {
21182    pub fn new() -> Self {
21183        std::default::Default::default()
21184    }
21185
21186    /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
21187    ///
21188    /// # Example
21189    /// ```ignore,no_run
21190    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21191    /// use wkt::FieldMask;
21192    /// let x = UpdateDataAttributeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21193    /// ```
21194    pub fn set_update_mask<T>(mut self, v: T) -> Self
21195    where
21196        T: std::convert::Into<wkt::FieldMask>,
21197    {
21198        self.update_mask = std::option::Option::Some(v.into());
21199        self
21200    }
21201
21202    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
21203    ///
21204    /// # Example
21205    /// ```ignore,no_run
21206    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21207    /// use wkt::FieldMask;
21208    /// let x = UpdateDataAttributeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21209    /// let x = UpdateDataAttributeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21210    /// ```
21211    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21212    where
21213        T: std::convert::Into<wkt::FieldMask>,
21214    {
21215        self.update_mask = v.map(|x| x.into());
21216        self
21217    }
21218
21219    /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
21220    ///
21221    /// # Example
21222    /// ```ignore,no_run
21223    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21224    /// use google_cloud_dataplex_v1::model::DataAttribute;
21225    /// let x = UpdateDataAttributeRequest::new().set_data_attribute(DataAttribute::default()/* use setters */);
21226    /// ```
21227    pub fn set_data_attribute<T>(mut self, v: T) -> Self
21228    where
21229        T: std::convert::Into<crate::model::DataAttribute>,
21230    {
21231        self.data_attribute = std::option::Option::Some(v.into());
21232        self
21233    }
21234
21235    /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
21236    ///
21237    /// # Example
21238    /// ```ignore,no_run
21239    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21240    /// use google_cloud_dataplex_v1::model::DataAttribute;
21241    /// let x = UpdateDataAttributeRequest::new().set_or_clear_data_attribute(Some(DataAttribute::default()/* use setters */));
21242    /// let x = UpdateDataAttributeRequest::new().set_or_clear_data_attribute(None::<DataAttribute>);
21243    /// ```
21244    pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
21245    where
21246        T: std::convert::Into<crate::model::DataAttribute>,
21247    {
21248        self.data_attribute = v.map(|x| x.into());
21249        self
21250    }
21251
21252    /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
21253    ///
21254    /// # Example
21255    /// ```ignore,no_run
21256    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21257    /// let x = UpdateDataAttributeRequest::new().set_validate_only(true);
21258    /// ```
21259    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21260        self.validate_only = v.into();
21261        self
21262    }
21263}
21264
21265impl wkt::message::Message for UpdateDataAttributeRequest {
21266    fn typename() -> &'static str {
21267        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeRequest"
21268    }
21269}
21270
21271/// Get DataAttribute request.
21272#[derive(Clone, Default, PartialEq)]
21273#[non_exhaustive]
21274pub struct GetDataAttributeRequest {
21275    /// Required. The resource name of the dataAttribute:
21276    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
21277    pub name: std::string::String,
21278
21279    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21280}
21281
21282impl GetDataAttributeRequest {
21283    pub fn new() -> Self {
21284        std::default::Default::default()
21285    }
21286
21287    /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
21288    ///
21289    /// # Example
21290    /// ```ignore,no_run
21291    /// # use google_cloud_dataplex_v1::model::GetDataAttributeRequest;
21292    /// let x = GetDataAttributeRequest::new().set_name("example");
21293    /// ```
21294    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21295        self.name = v.into();
21296        self
21297    }
21298}
21299
21300impl wkt::message::Message for GetDataAttributeRequest {
21301    fn typename() -> &'static str {
21302        "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeRequest"
21303    }
21304}
21305
21306/// List DataAttributes request.
21307#[derive(Clone, Default, PartialEq)]
21308#[non_exhaustive]
21309pub struct ListDataAttributesRequest {
21310    /// Required. The resource name of the DataTaxonomy:
21311    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
21312    pub parent: std::string::String,
21313
21314    /// Optional. Maximum number of DataAttributes to return. The service may
21315    /// return fewer than this value. If unspecified, at most 10 dataAttributes
21316    /// will be returned. The maximum value is 1000; values above 1000 will be
21317    /// coerced to 1000.
21318    pub page_size: i32,
21319
21320    /// Optional. Page token received from a previous `ListDataAttributes` call.
21321    /// Provide this to retrieve the subsequent page. When paginating, all other
21322    /// parameters provided to `ListDataAttributes` must match the call that
21323    /// provided the page token.
21324    pub page_token: std::string::String,
21325
21326    /// Optional. Filter request.
21327    pub filter: std::string::String,
21328
21329    /// Optional. Order by fields for the result.
21330    pub order_by: std::string::String,
21331
21332    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21333}
21334
21335impl ListDataAttributesRequest {
21336    pub fn new() -> Self {
21337        std::default::Default::default()
21338    }
21339
21340    /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
21341    ///
21342    /// # Example
21343    /// ```ignore,no_run
21344    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21345    /// let x = ListDataAttributesRequest::new().set_parent("example");
21346    /// ```
21347    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21348        self.parent = v.into();
21349        self
21350    }
21351
21352    /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
21353    ///
21354    /// # Example
21355    /// ```ignore,no_run
21356    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21357    /// let x = ListDataAttributesRequest::new().set_page_size(42);
21358    /// ```
21359    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21360        self.page_size = v.into();
21361        self
21362    }
21363
21364    /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
21365    ///
21366    /// # Example
21367    /// ```ignore,no_run
21368    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21369    /// let x = ListDataAttributesRequest::new().set_page_token("example");
21370    /// ```
21371    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21372        self.page_token = v.into();
21373        self
21374    }
21375
21376    /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
21377    ///
21378    /// # Example
21379    /// ```ignore,no_run
21380    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21381    /// let x = ListDataAttributesRequest::new().set_filter("example");
21382    /// ```
21383    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21384        self.filter = v.into();
21385        self
21386    }
21387
21388    /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
21389    ///
21390    /// # Example
21391    /// ```ignore,no_run
21392    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21393    /// let x = ListDataAttributesRequest::new().set_order_by("example");
21394    /// ```
21395    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21396        self.order_by = v.into();
21397        self
21398    }
21399}
21400
21401impl wkt::message::Message for ListDataAttributesRequest {
21402    fn typename() -> &'static str {
21403        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesRequest"
21404    }
21405}
21406
21407/// List DataAttributes response.
21408#[derive(Clone, Default, PartialEq)]
21409#[non_exhaustive]
21410pub struct ListDataAttributesResponse {
21411    /// DataAttributes under the given parent DataTaxonomy.
21412    pub data_attributes: std::vec::Vec<crate::model::DataAttribute>,
21413
21414    /// Token to retrieve the next page of results, or empty if there are no more
21415    /// results in the list.
21416    pub next_page_token: std::string::String,
21417
21418    /// Locations that could not be reached.
21419    pub unreachable_locations: std::vec::Vec<std::string::String>,
21420
21421    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21422}
21423
21424impl ListDataAttributesResponse {
21425    pub fn new() -> Self {
21426        std::default::Default::default()
21427    }
21428
21429    /// Sets the value of [data_attributes][crate::model::ListDataAttributesResponse::data_attributes].
21430    ///
21431    /// # Example
21432    /// ```ignore,no_run
21433    /// # use google_cloud_dataplex_v1::model::ListDataAttributesResponse;
21434    /// use google_cloud_dataplex_v1::model::DataAttribute;
21435    /// let x = ListDataAttributesResponse::new()
21436    ///     .set_data_attributes([
21437    ///         DataAttribute::default()/* use setters */,
21438    ///         DataAttribute::default()/* use (different) setters */,
21439    ///     ]);
21440    /// ```
21441    pub fn set_data_attributes<T, V>(mut self, v: T) -> Self
21442    where
21443        T: std::iter::IntoIterator<Item = V>,
21444        V: std::convert::Into<crate::model::DataAttribute>,
21445    {
21446        use std::iter::Iterator;
21447        self.data_attributes = v.into_iter().map(|i| i.into()).collect();
21448        self
21449    }
21450
21451    /// Sets the value of [next_page_token][crate::model::ListDataAttributesResponse::next_page_token].
21452    ///
21453    /// # Example
21454    /// ```ignore,no_run
21455    /// # use google_cloud_dataplex_v1::model::ListDataAttributesResponse;
21456    /// let x = ListDataAttributesResponse::new().set_next_page_token("example");
21457    /// ```
21458    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21459        self.next_page_token = v.into();
21460        self
21461    }
21462
21463    /// Sets the value of [unreachable_locations][crate::model::ListDataAttributesResponse::unreachable_locations].
21464    ///
21465    /// # Example
21466    /// ```ignore,no_run
21467    /// # use google_cloud_dataplex_v1::model::ListDataAttributesResponse;
21468    /// let x = ListDataAttributesResponse::new().set_unreachable_locations(["a", "b", "c"]);
21469    /// ```
21470    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
21471    where
21472        T: std::iter::IntoIterator<Item = V>,
21473        V: std::convert::Into<std::string::String>,
21474    {
21475        use std::iter::Iterator;
21476        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
21477        self
21478    }
21479}
21480
21481impl wkt::message::Message for ListDataAttributesResponse {
21482    fn typename() -> &'static str {
21483        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesResponse"
21484    }
21485}
21486
21487#[doc(hidden)]
21488impl gax::paginator::internal::PageableResponse for ListDataAttributesResponse {
21489    type PageItem = crate::model::DataAttribute;
21490
21491    fn items(self) -> std::vec::Vec<Self::PageItem> {
21492        self.data_attributes
21493    }
21494
21495    fn next_page_token(&self) -> std::string::String {
21496        use std::clone::Clone;
21497        self.next_page_token.clone()
21498    }
21499}
21500
21501/// Delete DataAttribute request.
21502#[derive(Clone, Default, PartialEq)]
21503#[non_exhaustive]
21504pub struct DeleteDataAttributeRequest {
21505    /// Required. The resource name of the DataAttribute:
21506    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
21507    pub name: std::string::String,
21508
21509    /// Optional. If the client provided etag value does not match the current etag
21510    /// value, the DeleteDataAttribute method returns an ABORTED error response.
21511    pub etag: std::string::String,
21512
21513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21514}
21515
21516impl DeleteDataAttributeRequest {
21517    pub fn new() -> Self {
21518        std::default::Default::default()
21519    }
21520
21521    /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
21522    ///
21523    /// # Example
21524    /// ```ignore,no_run
21525    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeRequest;
21526    /// let x = DeleteDataAttributeRequest::new().set_name("example");
21527    /// ```
21528    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21529        self.name = v.into();
21530        self
21531    }
21532
21533    /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
21534    ///
21535    /// # Example
21536    /// ```ignore,no_run
21537    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeRequest;
21538    /// let x = DeleteDataAttributeRequest::new().set_etag("example");
21539    /// ```
21540    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21541        self.etag = v.into();
21542        self
21543    }
21544}
21545
21546impl wkt::message::Message for DeleteDataAttributeRequest {
21547    fn typename() -> &'static str {
21548        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeRequest"
21549    }
21550}
21551
21552/// Create DataAttributeBinding request.
21553#[derive(Clone, Default, PartialEq)]
21554#[non_exhaustive]
21555pub struct CreateDataAttributeBindingRequest {
21556    /// Required. The resource name of the parent data taxonomy
21557    /// projects/{project_number}/locations/{location_id}
21558    pub parent: std::string::String,
21559
21560    /// Required. DataAttributeBinding identifier.
21561    ///
21562    /// * Must contain only lowercase letters, numbers and hyphens.
21563    /// * Must start with a letter.
21564    /// * Must be between 1-63 characters.
21565    /// * Must end with a number or a letter.
21566    /// * Must be unique within the Location.
21567    pub data_attribute_binding_id: std::string::String,
21568
21569    /// Required. DataAttributeBinding resource.
21570    pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
21571
21572    /// Optional. Only validate the request, but do not perform mutations.
21573    /// The default is false.
21574    pub validate_only: bool,
21575
21576    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21577}
21578
21579impl CreateDataAttributeBindingRequest {
21580    pub fn new() -> Self {
21581        std::default::Default::default()
21582    }
21583
21584    /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
21585    ///
21586    /// # Example
21587    /// ```ignore,no_run
21588    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21589    /// let x = CreateDataAttributeBindingRequest::new().set_parent("example");
21590    /// ```
21591    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21592        self.parent = v.into();
21593        self
21594    }
21595
21596    /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
21597    ///
21598    /// # Example
21599    /// ```ignore,no_run
21600    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21601    /// let x = CreateDataAttributeBindingRequest::new().set_data_attribute_binding_id("example");
21602    /// ```
21603    pub fn set_data_attribute_binding_id<T: std::convert::Into<std::string::String>>(
21604        mut self,
21605        v: T,
21606    ) -> Self {
21607        self.data_attribute_binding_id = v.into();
21608        self
21609    }
21610
21611    /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
21612    ///
21613    /// # Example
21614    /// ```ignore,no_run
21615    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21616    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21617    /// let x = CreateDataAttributeBindingRequest::new().set_data_attribute_binding(DataAttributeBinding::default()/* use setters */);
21618    /// ```
21619    pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
21620    where
21621        T: std::convert::Into<crate::model::DataAttributeBinding>,
21622    {
21623        self.data_attribute_binding = std::option::Option::Some(v.into());
21624        self
21625    }
21626
21627    /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
21628    ///
21629    /// # Example
21630    /// ```ignore,no_run
21631    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21632    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21633    /// let x = CreateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(Some(DataAttributeBinding::default()/* use setters */));
21634    /// let x = CreateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(None::<DataAttributeBinding>);
21635    /// ```
21636    pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
21637    where
21638        T: std::convert::Into<crate::model::DataAttributeBinding>,
21639    {
21640        self.data_attribute_binding = v.map(|x| x.into());
21641        self
21642    }
21643
21644    /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
21645    ///
21646    /// # Example
21647    /// ```ignore,no_run
21648    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21649    /// let x = CreateDataAttributeBindingRequest::new().set_validate_only(true);
21650    /// ```
21651    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21652        self.validate_only = v.into();
21653        self
21654    }
21655}
21656
21657impl wkt::message::Message for CreateDataAttributeBindingRequest {
21658    fn typename() -> &'static str {
21659        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeBindingRequest"
21660    }
21661}
21662
21663/// Update DataAttributeBinding request.
21664#[derive(Clone, Default, PartialEq)]
21665#[non_exhaustive]
21666pub struct UpdateDataAttributeBindingRequest {
21667    /// Required. Mask of fields to update.
21668    pub update_mask: std::option::Option<wkt::FieldMask>,
21669
21670    /// Required. Only fields specified in `update_mask` are updated.
21671    pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
21672
21673    /// Optional. Only validate the request, but do not perform mutations.
21674    /// The default is false.
21675    pub validate_only: bool,
21676
21677    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21678}
21679
21680impl UpdateDataAttributeBindingRequest {
21681    pub fn new() -> Self {
21682        std::default::Default::default()
21683    }
21684
21685    /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
21686    ///
21687    /// # Example
21688    /// ```ignore,no_run
21689    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21690    /// use wkt::FieldMask;
21691    /// let x = UpdateDataAttributeBindingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21692    /// ```
21693    pub fn set_update_mask<T>(mut self, v: T) -> Self
21694    where
21695        T: std::convert::Into<wkt::FieldMask>,
21696    {
21697        self.update_mask = std::option::Option::Some(v.into());
21698        self
21699    }
21700
21701    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
21702    ///
21703    /// # Example
21704    /// ```ignore,no_run
21705    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21706    /// use wkt::FieldMask;
21707    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21708    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21709    /// ```
21710    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21711    where
21712        T: std::convert::Into<wkt::FieldMask>,
21713    {
21714        self.update_mask = v.map(|x| x.into());
21715        self
21716    }
21717
21718    /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
21719    ///
21720    /// # Example
21721    /// ```ignore,no_run
21722    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21723    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21724    /// let x = UpdateDataAttributeBindingRequest::new().set_data_attribute_binding(DataAttributeBinding::default()/* use setters */);
21725    /// ```
21726    pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
21727    where
21728        T: std::convert::Into<crate::model::DataAttributeBinding>,
21729    {
21730        self.data_attribute_binding = std::option::Option::Some(v.into());
21731        self
21732    }
21733
21734    /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
21735    ///
21736    /// # Example
21737    /// ```ignore,no_run
21738    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21739    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21740    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(Some(DataAttributeBinding::default()/* use setters */));
21741    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(None::<DataAttributeBinding>);
21742    /// ```
21743    pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
21744    where
21745        T: std::convert::Into<crate::model::DataAttributeBinding>,
21746    {
21747        self.data_attribute_binding = v.map(|x| x.into());
21748        self
21749    }
21750
21751    /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
21752    ///
21753    /// # Example
21754    /// ```ignore,no_run
21755    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21756    /// let x = UpdateDataAttributeBindingRequest::new().set_validate_only(true);
21757    /// ```
21758    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21759        self.validate_only = v.into();
21760        self
21761    }
21762}
21763
21764impl wkt::message::Message for UpdateDataAttributeBindingRequest {
21765    fn typename() -> &'static str {
21766        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest"
21767    }
21768}
21769
21770/// Get DataAttributeBinding request.
21771#[derive(Clone, Default, PartialEq)]
21772#[non_exhaustive]
21773pub struct GetDataAttributeBindingRequest {
21774    /// Required. The resource name of the DataAttributeBinding:
21775    /// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
21776    pub name: std::string::String,
21777
21778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21779}
21780
21781impl GetDataAttributeBindingRequest {
21782    pub fn new() -> Self {
21783        std::default::Default::default()
21784    }
21785
21786    /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
21787    ///
21788    /// # Example
21789    /// ```ignore,no_run
21790    /// # use google_cloud_dataplex_v1::model::GetDataAttributeBindingRequest;
21791    /// let x = GetDataAttributeBindingRequest::new().set_name("example");
21792    /// ```
21793    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21794        self.name = v.into();
21795        self
21796    }
21797}
21798
21799impl wkt::message::Message for GetDataAttributeBindingRequest {
21800    fn typename() -> &'static str {
21801        "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeBindingRequest"
21802    }
21803}
21804
21805/// List DataAttributeBindings request.
21806#[derive(Clone, Default, PartialEq)]
21807#[non_exhaustive]
21808pub struct ListDataAttributeBindingsRequest {
21809    /// Required. The resource name of the Location:
21810    /// projects/{project_number}/locations/{location_id}
21811    pub parent: std::string::String,
21812
21813    /// Optional. Maximum number of DataAttributeBindings to return. The service
21814    /// may return fewer than this value. If unspecified, at most 10
21815    /// DataAttributeBindings will be returned. The maximum value is 1000; values
21816    /// above 1000 will be coerced to 1000.
21817    pub page_size: i32,
21818
21819    /// Optional. Page token received from a previous `ListDataAttributeBindings`
21820    /// call. Provide this to retrieve the subsequent page. When paginating, all
21821    /// other parameters provided to `ListDataAttributeBindings` must match the
21822    /// call that provided the page token.
21823    pub page_token: std::string::String,
21824
21825    /// Optional. Filter request.
21826    /// Filter using resource: filter=resource:"resource-name"
21827    /// Filter using attribute: filter=attributes:"attribute-name"
21828    /// Filter using attribute in paths list:
21829    /// filter=paths.attributes:"attribute-name"
21830    pub filter: std::string::String,
21831
21832    /// Optional. Order by fields for the result.
21833    pub order_by: std::string::String,
21834
21835    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21836}
21837
21838impl ListDataAttributeBindingsRequest {
21839    pub fn new() -> Self {
21840        std::default::Default::default()
21841    }
21842
21843    /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
21844    ///
21845    /// # Example
21846    /// ```ignore,no_run
21847    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21848    /// let x = ListDataAttributeBindingsRequest::new().set_parent("example");
21849    /// ```
21850    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21851        self.parent = v.into();
21852        self
21853    }
21854
21855    /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
21856    ///
21857    /// # Example
21858    /// ```ignore,no_run
21859    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21860    /// let x = ListDataAttributeBindingsRequest::new().set_page_size(42);
21861    /// ```
21862    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21863        self.page_size = v.into();
21864        self
21865    }
21866
21867    /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
21868    ///
21869    /// # Example
21870    /// ```ignore,no_run
21871    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21872    /// let x = ListDataAttributeBindingsRequest::new().set_page_token("example");
21873    /// ```
21874    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21875        self.page_token = v.into();
21876        self
21877    }
21878
21879    /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
21880    ///
21881    /// # Example
21882    /// ```ignore,no_run
21883    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21884    /// let x = ListDataAttributeBindingsRequest::new().set_filter("example");
21885    /// ```
21886    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21887        self.filter = v.into();
21888        self
21889    }
21890
21891    /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
21892    ///
21893    /// # Example
21894    /// ```ignore,no_run
21895    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21896    /// let x = ListDataAttributeBindingsRequest::new().set_order_by("example");
21897    /// ```
21898    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21899        self.order_by = v.into();
21900        self
21901    }
21902}
21903
21904impl wkt::message::Message for ListDataAttributeBindingsRequest {
21905    fn typename() -> &'static str {
21906        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsRequest"
21907    }
21908}
21909
21910/// List DataAttributeBindings response.
21911#[derive(Clone, Default, PartialEq)]
21912#[non_exhaustive]
21913pub struct ListDataAttributeBindingsResponse {
21914    /// DataAttributeBindings under the given parent Location.
21915    pub data_attribute_bindings: std::vec::Vec<crate::model::DataAttributeBinding>,
21916
21917    /// Token to retrieve the next page of results, or empty if there are no more
21918    /// results in the list.
21919    pub next_page_token: std::string::String,
21920
21921    /// Locations that could not be reached.
21922    pub unreachable_locations: std::vec::Vec<std::string::String>,
21923
21924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21925}
21926
21927impl ListDataAttributeBindingsResponse {
21928    pub fn new() -> Self {
21929        std::default::Default::default()
21930    }
21931
21932    /// Sets the value of [data_attribute_bindings][crate::model::ListDataAttributeBindingsResponse::data_attribute_bindings].
21933    ///
21934    /// # Example
21935    /// ```ignore,no_run
21936    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsResponse;
21937    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21938    /// let x = ListDataAttributeBindingsResponse::new()
21939    ///     .set_data_attribute_bindings([
21940    ///         DataAttributeBinding::default()/* use setters */,
21941    ///         DataAttributeBinding::default()/* use (different) setters */,
21942    ///     ]);
21943    /// ```
21944    pub fn set_data_attribute_bindings<T, V>(mut self, v: T) -> Self
21945    where
21946        T: std::iter::IntoIterator<Item = V>,
21947        V: std::convert::Into<crate::model::DataAttributeBinding>,
21948    {
21949        use std::iter::Iterator;
21950        self.data_attribute_bindings = v.into_iter().map(|i| i.into()).collect();
21951        self
21952    }
21953
21954    /// Sets the value of [next_page_token][crate::model::ListDataAttributeBindingsResponse::next_page_token].
21955    ///
21956    /// # Example
21957    /// ```ignore,no_run
21958    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsResponse;
21959    /// let x = ListDataAttributeBindingsResponse::new().set_next_page_token("example");
21960    /// ```
21961    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21962        self.next_page_token = v.into();
21963        self
21964    }
21965
21966    /// Sets the value of [unreachable_locations][crate::model::ListDataAttributeBindingsResponse::unreachable_locations].
21967    ///
21968    /// # Example
21969    /// ```ignore,no_run
21970    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsResponse;
21971    /// let x = ListDataAttributeBindingsResponse::new().set_unreachable_locations(["a", "b", "c"]);
21972    /// ```
21973    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
21974    where
21975        T: std::iter::IntoIterator<Item = V>,
21976        V: std::convert::Into<std::string::String>,
21977    {
21978        use std::iter::Iterator;
21979        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
21980        self
21981    }
21982}
21983
21984impl wkt::message::Message for ListDataAttributeBindingsResponse {
21985    fn typename() -> &'static str {
21986        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsResponse"
21987    }
21988}
21989
21990#[doc(hidden)]
21991impl gax::paginator::internal::PageableResponse for ListDataAttributeBindingsResponse {
21992    type PageItem = crate::model::DataAttributeBinding;
21993
21994    fn items(self) -> std::vec::Vec<Self::PageItem> {
21995        self.data_attribute_bindings
21996    }
21997
21998    fn next_page_token(&self) -> std::string::String {
21999        use std::clone::Clone;
22000        self.next_page_token.clone()
22001    }
22002}
22003
22004/// Delete DataAttributeBinding request.
22005#[derive(Clone, Default, PartialEq)]
22006#[non_exhaustive]
22007pub struct DeleteDataAttributeBindingRequest {
22008    /// Required. The resource name of the DataAttributeBinding:
22009    /// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
22010    pub name: std::string::String,
22011
22012    /// Required. If the client provided etag value does not match the current etag
22013    /// value, the DeleteDataAttributeBindingRequest method returns an ABORTED
22014    /// error response. Etags must be used when calling the
22015    /// DeleteDataAttributeBinding.
22016    pub etag: std::string::String,
22017
22018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22019}
22020
22021impl DeleteDataAttributeBindingRequest {
22022    pub fn new() -> Self {
22023        std::default::Default::default()
22024    }
22025
22026    /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
22027    ///
22028    /// # Example
22029    /// ```ignore,no_run
22030    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeBindingRequest;
22031    /// let x = DeleteDataAttributeBindingRequest::new().set_name("example");
22032    /// ```
22033    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22034        self.name = v.into();
22035        self
22036    }
22037
22038    /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
22039    ///
22040    /// # Example
22041    /// ```ignore,no_run
22042    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeBindingRequest;
22043    /// let x = DeleteDataAttributeBindingRequest::new().set_etag("example");
22044    /// ```
22045    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22046        self.etag = v.into();
22047        self
22048    }
22049}
22050
22051impl wkt::message::Message for DeleteDataAttributeBindingRequest {
22052    fn typename() -> &'static str {
22053        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest"
22054    }
22055}
22056
22057/// Create dataScan request.
22058#[derive(Clone, Default, PartialEq)]
22059#[non_exhaustive]
22060pub struct CreateDataScanRequest {
22061    /// Required. The resource name of the parent location:
22062    /// `projects/{project}/locations/{location_id}`
22063    /// where `project` refers to a *project_id* or *project_number* and
22064    /// `location_id` refers to a Google Cloud region.
22065    pub parent: std::string::String,
22066
22067    /// Required. DataScan resource.
22068    pub data_scan: std::option::Option<crate::model::DataScan>,
22069
22070    /// Required. DataScan identifier.
22071    ///
22072    /// * Must contain only lowercase letters, numbers and hyphens.
22073    /// * Must start with a letter.
22074    /// * Must end with a number or a letter.
22075    /// * Must be between 1-63 characters.
22076    /// * Must be unique within the customer project / location.
22077    pub data_scan_id: std::string::String,
22078
22079    /// Optional. Only validate the request, but do not perform mutations.
22080    /// The default is `false`.
22081    pub validate_only: bool,
22082
22083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22084}
22085
22086impl CreateDataScanRequest {
22087    pub fn new() -> Self {
22088        std::default::Default::default()
22089    }
22090
22091    /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
22092    ///
22093    /// # Example
22094    /// ```ignore,no_run
22095    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22096    /// let x = CreateDataScanRequest::new().set_parent("example");
22097    /// ```
22098    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22099        self.parent = v.into();
22100        self
22101    }
22102
22103    /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
22104    ///
22105    /// # Example
22106    /// ```ignore,no_run
22107    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22108    /// use google_cloud_dataplex_v1::model::DataScan;
22109    /// let x = CreateDataScanRequest::new().set_data_scan(DataScan::default()/* use setters */);
22110    /// ```
22111    pub fn set_data_scan<T>(mut self, v: T) -> Self
22112    where
22113        T: std::convert::Into<crate::model::DataScan>,
22114    {
22115        self.data_scan = std::option::Option::Some(v.into());
22116        self
22117    }
22118
22119    /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
22120    ///
22121    /// # Example
22122    /// ```ignore,no_run
22123    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22124    /// use google_cloud_dataplex_v1::model::DataScan;
22125    /// let x = CreateDataScanRequest::new().set_or_clear_data_scan(Some(DataScan::default()/* use setters */));
22126    /// let x = CreateDataScanRequest::new().set_or_clear_data_scan(None::<DataScan>);
22127    /// ```
22128    pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
22129    where
22130        T: std::convert::Into<crate::model::DataScan>,
22131    {
22132        self.data_scan = v.map(|x| x.into());
22133        self
22134    }
22135
22136    /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
22137    ///
22138    /// # Example
22139    /// ```ignore,no_run
22140    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22141    /// let x = CreateDataScanRequest::new().set_data_scan_id("example");
22142    /// ```
22143    pub fn set_data_scan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22144        self.data_scan_id = v.into();
22145        self
22146    }
22147
22148    /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
22149    ///
22150    /// # Example
22151    /// ```ignore,no_run
22152    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22153    /// let x = CreateDataScanRequest::new().set_validate_only(true);
22154    /// ```
22155    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22156        self.validate_only = v.into();
22157        self
22158    }
22159}
22160
22161impl wkt::message::Message for CreateDataScanRequest {
22162    fn typename() -> &'static str {
22163        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataScanRequest"
22164    }
22165}
22166
22167/// Update dataScan request.
22168#[derive(Clone, Default, PartialEq)]
22169#[non_exhaustive]
22170pub struct UpdateDataScanRequest {
22171    /// Required. DataScan resource to be updated.
22172    ///
22173    /// Only fields specified in `update_mask` are updated.
22174    pub data_scan: std::option::Option<crate::model::DataScan>,
22175
22176    /// Optional. Mask of fields to update.
22177    pub update_mask: std::option::Option<wkt::FieldMask>,
22178
22179    /// Optional. Only validate the request, but do not perform mutations.
22180    /// The default is `false`.
22181    pub validate_only: bool,
22182
22183    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22184}
22185
22186impl UpdateDataScanRequest {
22187    pub fn new() -> Self {
22188        std::default::Default::default()
22189    }
22190
22191    /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
22192    ///
22193    /// # Example
22194    /// ```ignore,no_run
22195    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22196    /// use google_cloud_dataplex_v1::model::DataScan;
22197    /// let x = UpdateDataScanRequest::new().set_data_scan(DataScan::default()/* use setters */);
22198    /// ```
22199    pub fn set_data_scan<T>(mut self, v: T) -> Self
22200    where
22201        T: std::convert::Into<crate::model::DataScan>,
22202    {
22203        self.data_scan = std::option::Option::Some(v.into());
22204        self
22205    }
22206
22207    /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
22208    ///
22209    /// # Example
22210    /// ```ignore,no_run
22211    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22212    /// use google_cloud_dataplex_v1::model::DataScan;
22213    /// let x = UpdateDataScanRequest::new().set_or_clear_data_scan(Some(DataScan::default()/* use setters */));
22214    /// let x = UpdateDataScanRequest::new().set_or_clear_data_scan(None::<DataScan>);
22215    /// ```
22216    pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
22217    where
22218        T: std::convert::Into<crate::model::DataScan>,
22219    {
22220        self.data_scan = v.map(|x| x.into());
22221        self
22222    }
22223
22224    /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
22225    ///
22226    /// # Example
22227    /// ```ignore,no_run
22228    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22229    /// use wkt::FieldMask;
22230    /// let x = UpdateDataScanRequest::new().set_update_mask(FieldMask::default()/* use setters */);
22231    /// ```
22232    pub fn set_update_mask<T>(mut self, v: T) -> Self
22233    where
22234        T: std::convert::Into<wkt::FieldMask>,
22235    {
22236        self.update_mask = std::option::Option::Some(v.into());
22237        self
22238    }
22239
22240    /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
22241    ///
22242    /// # Example
22243    /// ```ignore,no_run
22244    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22245    /// use wkt::FieldMask;
22246    /// let x = UpdateDataScanRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
22247    /// let x = UpdateDataScanRequest::new().set_or_clear_update_mask(None::<FieldMask>);
22248    /// ```
22249    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
22250    where
22251        T: std::convert::Into<wkt::FieldMask>,
22252    {
22253        self.update_mask = v.map(|x| x.into());
22254        self
22255    }
22256
22257    /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
22258    ///
22259    /// # Example
22260    /// ```ignore,no_run
22261    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22262    /// let x = UpdateDataScanRequest::new().set_validate_only(true);
22263    /// ```
22264    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22265        self.validate_only = v.into();
22266        self
22267    }
22268}
22269
22270impl wkt::message::Message for UpdateDataScanRequest {
22271    fn typename() -> &'static str {
22272        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataScanRequest"
22273    }
22274}
22275
22276/// Delete dataScan request.
22277#[derive(Clone, Default, PartialEq)]
22278#[non_exhaustive]
22279pub struct DeleteDataScanRequest {
22280    /// Required. The resource name of the dataScan:
22281    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
22282    /// where `project` refers to a *project_id* or *project_number* and
22283    /// `location_id` refers to a Google Cloud region.
22284    pub name: std::string::String,
22285
22286    /// Optional. If set to true, any child resources of this data scan will also
22287    /// be deleted. (Otherwise, the request will only work if the data scan has no
22288    /// child resources.)
22289    pub force: bool,
22290
22291    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22292}
22293
22294impl DeleteDataScanRequest {
22295    pub fn new() -> Self {
22296        std::default::Default::default()
22297    }
22298
22299    /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
22300    ///
22301    /// # Example
22302    /// ```ignore,no_run
22303    /// # use google_cloud_dataplex_v1::model::DeleteDataScanRequest;
22304    /// let x = DeleteDataScanRequest::new().set_name("example");
22305    /// ```
22306    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22307        self.name = v.into();
22308        self
22309    }
22310
22311    /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
22312    ///
22313    /// # Example
22314    /// ```ignore,no_run
22315    /// # use google_cloud_dataplex_v1::model::DeleteDataScanRequest;
22316    /// let x = DeleteDataScanRequest::new().set_force(true);
22317    /// ```
22318    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22319        self.force = v.into();
22320        self
22321    }
22322}
22323
22324impl wkt::message::Message for DeleteDataScanRequest {
22325    fn typename() -> &'static str {
22326        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataScanRequest"
22327    }
22328}
22329
22330/// Get dataScan request.
22331#[derive(Clone, Default, PartialEq)]
22332#[non_exhaustive]
22333pub struct GetDataScanRequest {
22334    /// Required. The resource name of the dataScan:
22335    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
22336    /// where `project` refers to a *project_id* or *project_number* and
22337    /// `location_id` refers to a Google Cloud region.
22338    pub name: std::string::String,
22339
22340    /// Optional. Select the DataScan view to return. Defaults to `BASIC`.
22341    pub view: crate::model::get_data_scan_request::DataScanView,
22342
22343    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22344}
22345
22346impl GetDataScanRequest {
22347    pub fn new() -> Self {
22348        std::default::Default::default()
22349    }
22350
22351    /// Sets the value of [name][crate::model::GetDataScanRequest::name].
22352    ///
22353    /// # Example
22354    /// ```ignore,no_run
22355    /// # use google_cloud_dataplex_v1::model::GetDataScanRequest;
22356    /// let x = GetDataScanRequest::new().set_name("example");
22357    /// ```
22358    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22359        self.name = v.into();
22360        self
22361    }
22362
22363    /// Sets the value of [view][crate::model::GetDataScanRequest::view].
22364    ///
22365    /// # Example
22366    /// ```ignore,no_run
22367    /// # use google_cloud_dataplex_v1::model::GetDataScanRequest;
22368    /// use google_cloud_dataplex_v1::model::get_data_scan_request::DataScanView;
22369    /// let x0 = GetDataScanRequest::new().set_view(DataScanView::Basic);
22370    /// let x1 = GetDataScanRequest::new().set_view(DataScanView::Full);
22371    /// ```
22372    pub fn set_view<T: std::convert::Into<crate::model::get_data_scan_request::DataScanView>>(
22373        mut self,
22374        v: T,
22375    ) -> Self {
22376        self.view = v.into();
22377        self
22378    }
22379}
22380
22381impl wkt::message::Message for GetDataScanRequest {
22382    fn typename() -> &'static str {
22383        "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanRequest"
22384    }
22385}
22386
22387/// Defines additional types related to [GetDataScanRequest].
22388pub mod get_data_scan_request {
22389    #[allow(unused_imports)]
22390    use super::*;
22391
22392    /// DataScan view options.
22393    ///
22394    /// # Working with unknown values
22395    ///
22396    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22397    /// additional enum variants at any time. Adding new variants is not considered
22398    /// a breaking change. Applications should write their code in anticipation of:
22399    ///
22400    /// - New values appearing in future releases of the client library, **and**
22401    /// - New values received dynamically, without application changes.
22402    ///
22403    /// Please consult the [Working with enums] section in the user guide for some
22404    /// guidelines.
22405    ///
22406    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22407    #[derive(Clone, Debug, PartialEq)]
22408    #[non_exhaustive]
22409    pub enum DataScanView {
22410        /// The API will default to the `BASIC` view.
22411        Unspecified,
22412        /// Basic view that does not include *spec* and *result*.
22413        Basic,
22414        /// Include everything.
22415        Full,
22416        /// If set, the enum was initialized with an unknown value.
22417        ///
22418        /// Applications can examine the value using [DataScanView::value] or
22419        /// [DataScanView::name].
22420        UnknownValue(data_scan_view::UnknownValue),
22421    }
22422
22423    #[doc(hidden)]
22424    pub mod data_scan_view {
22425        #[allow(unused_imports)]
22426        use super::*;
22427        #[derive(Clone, Debug, PartialEq)]
22428        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22429    }
22430
22431    impl DataScanView {
22432        /// Gets the enum value.
22433        ///
22434        /// Returns `None` if the enum contains an unknown value deserialized from
22435        /// the string representation of enums.
22436        pub fn value(&self) -> std::option::Option<i32> {
22437            match self {
22438                Self::Unspecified => std::option::Option::Some(0),
22439                Self::Basic => std::option::Option::Some(1),
22440                Self::Full => std::option::Option::Some(10),
22441                Self::UnknownValue(u) => u.0.value(),
22442            }
22443        }
22444
22445        /// Gets the enum value as a string.
22446        ///
22447        /// Returns `None` if the enum contains an unknown value deserialized from
22448        /// the integer representation of enums.
22449        pub fn name(&self) -> std::option::Option<&str> {
22450            match self {
22451                Self::Unspecified => std::option::Option::Some("DATA_SCAN_VIEW_UNSPECIFIED"),
22452                Self::Basic => std::option::Option::Some("BASIC"),
22453                Self::Full => std::option::Option::Some("FULL"),
22454                Self::UnknownValue(u) => u.0.name(),
22455            }
22456        }
22457    }
22458
22459    impl std::default::Default for DataScanView {
22460        fn default() -> Self {
22461            use std::convert::From;
22462            Self::from(0)
22463        }
22464    }
22465
22466    impl std::fmt::Display for DataScanView {
22467        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22468            wkt::internal::display_enum(f, self.name(), self.value())
22469        }
22470    }
22471
22472    impl std::convert::From<i32> for DataScanView {
22473        fn from(value: i32) -> Self {
22474            match value {
22475                0 => Self::Unspecified,
22476                1 => Self::Basic,
22477                10 => Self::Full,
22478                _ => Self::UnknownValue(data_scan_view::UnknownValue(
22479                    wkt::internal::UnknownEnumValue::Integer(value),
22480                )),
22481            }
22482        }
22483    }
22484
22485    impl std::convert::From<&str> for DataScanView {
22486        fn from(value: &str) -> Self {
22487            use std::string::ToString;
22488            match value {
22489                "DATA_SCAN_VIEW_UNSPECIFIED" => Self::Unspecified,
22490                "BASIC" => Self::Basic,
22491                "FULL" => Self::Full,
22492                _ => Self::UnknownValue(data_scan_view::UnknownValue(
22493                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22494                )),
22495            }
22496        }
22497    }
22498
22499    impl serde::ser::Serialize for DataScanView {
22500        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22501        where
22502            S: serde::Serializer,
22503        {
22504            match self {
22505                Self::Unspecified => serializer.serialize_i32(0),
22506                Self::Basic => serializer.serialize_i32(1),
22507                Self::Full => serializer.serialize_i32(10),
22508                Self::UnknownValue(u) => u.0.serialize(serializer),
22509            }
22510        }
22511    }
22512
22513    impl<'de> serde::de::Deserialize<'de> for DataScanView {
22514        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22515        where
22516            D: serde::Deserializer<'de>,
22517        {
22518            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanView>::new(
22519                ".google.cloud.dataplex.v1.GetDataScanRequest.DataScanView",
22520            ))
22521        }
22522    }
22523}
22524
22525/// List dataScans request.
22526#[derive(Clone, Default, PartialEq)]
22527#[non_exhaustive]
22528pub struct ListDataScansRequest {
22529    /// Required. The resource name of the parent location:
22530    /// `projects/{project}/locations/{location_id}`
22531    /// where `project` refers to a *project_id* or *project_number* and
22532    /// `location_id` refers to a Google Cloud region.
22533    pub parent: std::string::String,
22534
22535    /// Optional. Maximum number of dataScans to return. The service may return
22536    /// fewer than this value. If unspecified, at most 500 scans will be returned.
22537    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
22538    pub page_size: i32,
22539
22540    /// Optional. Page token received from a previous `ListDataScans` call. Provide
22541    /// this to retrieve the subsequent page. When paginating, all other parameters
22542    /// provided to `ListDataScans` must match the call that provided the
22543    /// page token.
22544    pub page_token: std::string::String,
22545
22546    /// Optional. Filter request.
22547    pub filter: std::string::String,
22548
22549    /// Optional. Order by fields (`name` or `create_time`) for the result.
22550    /// If not specified, the ordering is undefined.
22551    pub order_by: std::string::String,
22552
22553    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22554}
22555
22556impl ListDataScansRequest {
22557    pub fn new() -> Self {
22558        std::default::Default::default()
22559    }
22560
22561    /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
22562    ///
22563    /// # Example
22564    /// ```ignore,no_run
22565    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22566    /// let x = ListDataScansRequest::new().set_parent("example");
22567    /// ```
22568    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22569        self.parent = v.into();
22570        self
22571    }
22572
22573    /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
22574    ///
22575    /// # Example
22576    /// ```ignore,no_run
22577    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22578    /// let x = ListDataScansRequest::new().set_page_size(42);
22579    /// ```
22580    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22581        self.page_size = v.into();
22582        self
22583    }
22584
22585    /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
22586    ///
22587    /// # Example
22588    /// ```ignore,no_run
22589    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22590    /// let x = ListDataScansRequest::new().set_page_token("example");
22591    /// ```
22592    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22593        self.page_token = v.into();
22594        self
22595    }
22596
22597    /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
22598    ///
22599    /// # Example
22600    /// ```ignore,no_run
22601    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22602    /// let x = ListDataScansRequest::new().set_filter("example");
22603    /// ```
22604    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22605        self.filter = v.into();
22606        self
22607    }
22608
22609    /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
22610    ///
22611    /// # Example
22612    /// ```ignore,no_run
22613    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22614    /// let x = ListDataScansRequest::new().set_order_by("example");
22615    /// ```
22616    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22617        self.order_by = v.into();
22618        self
22619    }
22620}
22621
22622impl wkt::message::Message for ListDataScansRequest {
22623    fn typename() -> &'static str {
22624        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansRequest"
22625    }
22626}
22627
22628/// List dataScans response.
22629#[derive(Clone, Default, PartialEq)]
22630#[non_exhaustive]
22631pub struct ListDataScansResponse {
22632    /// DataScans (`BASIC` view only) under the given parent location.
22633    pub data_scans: std::vec::Vec<crate::model::DataScan>,
22634
22635    /// Token to retrieve the next page of results, or empty if there are no more
22636    /// results in the list.
22637    pub next_page_token: std::string::String,
22638
22639    /// Locations that could not be reached.
22640    pub unreachable: std::vec::Vec<std::string::String>,
22641
22642    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22643}
22644
22645impl ListDataScansResponse {
22646    pub fn new() -> Self {
22647        std::default::Default::default()
22648    }
22649
22650    /// Sets the value of [data_scans][crate::model::ListDataScansResponse::data_scans].
22651    ///
22652    /// # Example
22653    /// ```ignore,no_run
22654    /// # use google_cloud_dataplex_v1::model::ListDataScansResponse;
22655    /// use google_cloud_dataplex_v1::model::DataScan;
22656    /// let x = ListDataScansResponse::new()
22657    ///     .set_data_scans([
22658    ///         DataScan::default()/* use setters */,
22659    ///         DataScan::default()/* use (different) setters */,
22660    ///     ]);
22661    /// ```
22662    pub fn set_data_scans<T, V>(mut self, v: T) -> Self
22663    where
22664        T: std::iter::IntoIterator<Item = V>,
22665        V: std::convert::Into<crate::model::DataScan>,
22666    {
22667        use std::iter::Iterator;
22668        self.data_scans = v.into_iter().map(|i| i.into()).collect();
22669        self
22670    }
22671
22672    /// Sets the value of [next_page_token][crate::model::ListDataScansResponse::next_page_token].
22673    ///
22674    /// # Example
22675    /// ```ignore,no_run
22676    /// # use google_cloud_dataplex_v1::model::ListDataScansResponse;
22677    /// let x = ListDataScansResponse::new().set_next_page_token("example");
22678    /// ```
22679    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22680        self.next_page_token = v.into();
22681        self
22682    }
22683
22684    /// Sets the value of [unreachable][crate::model::ListDataScansResponse::unreachable].
22685    ///
22686    /// # Example
22687    /// ```ignore,no_run
22688    /// # use google_cloud_dataplex_v1::model::ListDataScansResponse;
22689    /// let x = ListDataScansResponse::new().set_unreachable(["a", "b", "c"]);
22690    /// ```
22691    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
22692    where
22693        T: std::iter::IntoIterator<Item = V>,
22694        V: std::convert::Into<std::string::String>,
22695    {
22696        use std::iter::Iterator;
22697        self.unreachable = v.into_iter().map(|i| i.into()).collect();
22698        self
22699    }
22700}
22701
22702impl wkt::message::Message for ListDataScansResponse {
22703    fn typename() -> &'static str {
22704        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansResponse"
22705    }
22706}
22707
22708#[doc(hidden)]
22709impl gax::paginator::internal::PageableResponse for ListDataScansResponse {
22710    type PageItem = crate::model::DataScan;
22711
22712    fn items(self) -> std::vec::Vec<Self::PageItem> {
22713        self.data_scans
22714    }
22715
22716    fn next_page_token(&self) -> std::string::String {
22717        use std::clone::Clone;
22718        self.next_page_token.clone()
22719    }
22720}
22721
22722/// Run DataScan Request
22723#[derive(Clone, Default, PartialEq)]
22724#[non_exhaustive]
22725pub struct RunDataScanRequest {
22726    /// Required. The resource name of the DataScan:
22727    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`.
22728    /// where `project` refers to a *project_id* or *project_number* and
22729    /// `location_id` refers to a Google Cloud region.
22730    ///
22731    /// Only **OnDemand** data scans are allowed.
22732    pub name: std::string::String,
22733
22734    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22735}
22736
22737impl RunDataScanRequest {
22738    pub fn new() -> Self {
22739        std::default::Default::default()
22740    }
22741
22742    /// Sets the value of [name][crate::model::RunDataScanRequest::name].
22743    ///
22744    /// # Example
22745    /// ```ignore,no_run
22746    /// # use google_cloud_dataplex_v1::model::RunDataScanRequest;
22747    /// let x = RunDataScanRequest::new().set_name("example");
22748    /// ```
22749    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22750        self.name = v.into();
22751        self
22752    }
22753}
22754
22755impl wkt::message::Message for RunDataScanRequest {
22756    fn typename() -> &'static str {
22757        "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanRequest"
22758    }
22759}
22760
22761/// Run DataScan Response.
22762#[derive(Clone, Default, PartialEq)]
22763#[non_exhaustive]
22764pub struct RunDataScanResponse {
22765    /// DataScanJob created by RunDataScan request.
22766    pub job: std::option::Option<crate::model::DataScanJob>,
22767
22768    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22769}
22770
22771impl RunDataScanResponse {
22772    pub fn new() -> Self {
22773        std::default::Default::default()
22774    }
22775
22776    /// Sets the value of [job][crate::model::RunDataScanResponse::job].
22777    ///
22778    /// # Example
22779    /// ```ignore,no_run
22780    /// # use google_cloud_dataplex_v1::model::RunDataScanResponse;
22781    /// use google_cloud_dataplex_v1::model::DataScanJob;
22782    /// let x = RunDataScanResponse::new().set_job(DataScanJob::default()/* use setters */);
22783    /// ```
22784    pub fn set_job<T>(mut self, v: T) -> Self
22785    where
22786        T: std::convert::Into<crate::model::DataScanJob>,
22787    {
22788        self.job = std::option::Option::Some(v.into());
22789        self
22790    }
22791
22792    /// Sets or clears the value of [job][crate::model::RunDataScanResponse::job].
22793    ///
22794    /// # Example
22795    /// ```ignore,no_run
22796    /// # use google_cloud_dataplex_v1::model::RunDataScanResponse;
22797    /// use google_cloud_dataplex_v1::model::DataScanJob;
22798    /// let x = RunDataScanResponse::new().set_or_clear_job(Some(DataScanJob::default()/* use setters */));
22799    /// let x = RunDataScanResponse::new().set_or_clear_job(None::<DataScanJob>);
22800    /// ```
22801    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
22802    where
22803        T: std::convert::Into<crate::model::DataScanJob>,
22804    {
22805        self.job = v.map(|x| x.into());
22806        self
22807    }
22808}
22809
22810impl wkt::message::Message for RunDataScanResponse {
22811    fn typename() -> &'static str {
22812        "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanResponse"
22813    }
22814}
22815
22816/// Get DataScanJob request.
22817#[derive(Clone, Default, PartialEq)]
22818#[non_exhaustive]
22819pub struct GetDataScanJobRequest {
22820    /// Required. The resource name of the DataScanJob:
22821    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}`
22822    /// where `project` refers to a *project_id* or *project_number* and
22823    /// `location_id` refers to a Google Cloud region.
22824    pub name: std::string::String,
22825
22826    /// Optional. Select the DataScanJob view to return. Defaults to `BASIC`.
22827    pub view: crate::model::get_data_scan_job_request::DataScanJobView,
22828
22829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22830}
22831
22832impl GetDataScanJobRequest {
22833    pub fn new() -> Self {
22834        std::default::Default::default()
22835    }
22836
22837    /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
22838    ///
22839    /// # Example
22840    /// ```ignore,no_run
22841    /// # use google_cloud_dataplex_v1::model::GetDataScanJobRequest;
22842    /// let x = GetDataScanJobRequest::new().set_name("example");
22843    /// ```
22844    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22845        self.name = v.into();
22846        self
22847    }
22848
22849    /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
22850    ///
22851    /// # Example
22852    /// ```ignore,no_run
22853    /// # use google_cloud_dataplex_v1::model::GetDataScanJobRequest;
22854    /// use google_cloud_dataplex_v1::model::get_data_scan_job_request::DataScanJobView;
22855    /// let x0 = GetDataScanJobRequest::new().set_view(DataScanJobView::Basic);
22856    /// let x1 = GetDataScanJobRequest::new().set_view(DataScanJobView::Full);
22857    /// ```
22858    pub fn set_view<
22859        T: std::convert::Into<crate::model::get_data_scan_job_request::DataScanJobView>,
22860    >(
22861        mut self,
22862        v: T,
22863    ) -> Self {
22864        self.view = v.into();
22865        self
22866    }
22867}
22868
22869impl wkt::message::Message for GetDataScanJobRequest {
22870    fn typename() -> &'static str {
22871        "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanJobRequest"
22872    }
22873}
22874
22875/// Defines additional types related to [GetDataScanJobRequest].
22876pub mod get_data_scan_job_request {
22877    #[allow(unused_imports)]
22878    use super::*;
22879
22880    /// DataScanJob view options.
22881    ///
22882    /// # Working with unknown values
22883    ///
22884    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22885    /// additional enum variants at any time. Adding new variants is not considered
22886    /// a breaking change. Applications should write their code in anticipation of:
22887    ///
22888    /// - New values appearing in future releases of the client library, **and**
22889    /// - New values received dynamically, without application changes.
22890    ///
22891    /// Please consult the [Working with enums] section in the user guide for some
22892    /// guidelines.
22893    ///
22894    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22895    #[derive(Clone, Debug, PartialEq)]
22896    #[non_exhaustive]
22897    pub enum DataScanJobView {
22898        /// The API will default to the `BASIC` view.
22899        Unspecified,
22900        /// Basic view that does not include *spec* and *result*.
22901        Basic,
22902        /// Include everything.
22903        Full,
22904        /// If set, the enum was initialized with an unknown value.
22905        ///
22906        /// Applications can examine the value using [DataScanJobView::value] or
22907        /// [DataScanJobView::name].
22908        UnknownValue(data_scan_job_view::UnknownValue),
22909    }
22910
22911    #[doc(hidden)]
22912    pub mod data_scan_job_view {
22913        #[allow(unused_imports)]
22914        use super::*;
22915        #[derive(Clone, Debug, PartialEq)]
22916        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22917    }
22918
22919    impl DataScanJobView {
22920        /// Gets the enum value.
22921        ///
22922        /// Returns `None` if the enum contains an unknown value deserialized from
22923        /// the string representation of enums.
22924        pub fn value(&self) -> std::option::Option<i32> {
22925            match self {
22926                Self::Unspecified => std::option::Option::Some(0),
22927                Self::Basic => std::option::Option::Some(1),
22928                Self::Full => std::option::Option::Some(10),
22929                Self::UnknownValue(u) => u.0.value(),
22930            }
22931        }
22932
22933        /// Gets the enum value as a string.
22934        ///
22935        /// Returns `None` if the enum contains an unknown value deserialized from
22936        /// the integer representation of enums.
22937        pub fn name(&self) -> std::option::Option<&str> {
22938            match self {
22939                Self::Unspecified => std::option::Option::Some("DATA_SCAN_JOB_VIEW_UNSPECIFIED"),
22940                Self::Basic => std::option::Option::Some("BASIC"),
22941                Self::Full => std::option::Option::Some("FULL"),
22942                Self::UnknownValue(u) => u.0.name(),
22943            }
22944        }
22945    }
22946
22947    impl std::default::Default for DataScanJobView {
22948        fn default() -> Self {
22949            use std::convert::From;
22950            Self::from(0)
22951        }
22952    }
22953
22954    impl std::fmt::Display for DataScanJobView {
22955        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22956            wkt::internal::display_enum(f, self.name(), self.value())
22957        }
22958    }
22959
22960    impl std::convert::From<i32> for DataScanJobView {
22961        fn from(value: i32) -> Self {
22962            match value {
22963                0 => Self::Unspecified,
22964                1 => Self::Basic,
22965                10 => Self::Full,
22966                _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
22967                    wkt::internal::UnknownEnumValue::Integer(value),
22968                )),
22969            }
22970        }
22971    }
22972
22973    impl std::convert::From<&str> for DataScanJobView {
22974        fn from(value: &str) -> Self {
22975            use std::string::ToString;
22976            match value {
22977                "DATA_SCAN_JOB_VIEW_UNSPECIFIED" => Self::Unspecified,
22978                "BASIC" => Self::Basic,
22979                "FULL" => Self::Full,
22980                _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
22981                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22982                )),
22983            }
22984        }
22985    }
22986
22987    impl serde::ser::Serialize for DataScanJobView {
22988        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22989        where
22990            S: serde::Serializer,
22991        {
22992            match self {
22993                Self::Unspecified => serializer.serialize_i32(0),
22994                Self::Basic => serializer.serialize_i32(1),
22995                Self::Full => serializer.serialize_i32(10),
22996                Self::UnknownValue(u) => u.0.serialize(serializer),
22997            }
22998        }
22999    }
23000
23001    impl<'de> serde::de::Deserialize<'de> for DataScanJobView {
23002        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23003        where
23004            D: serde::Deserializer<'de>,
23005        {
23006            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanJobView>::new(
23007                ".google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView",
23008            ))
23009        }
23010    }
23011}
23012
23013/// List DataScanJobs request.
23014#[derive(Clone, Default, PartialEq)]
23015#[non_exhaustive]
23016pub struct ListDataScanJobsRequest {
23017    /// Required. The resource name of the parent environment:
23018    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
23019    /// where `project` refers to a *project_id* or *project_number* and
23020    /// `location_id` refers to a Google Cloud region.
23021    pub parent: std::string::String,
23022
23023    /// Optional. Maximum number of DataScanJobs to return. The service may return
23024    /// fewer than this value. If unspecified, at most 10 DataScanJobs will be
23025    /// returned. The maximum value is 1000; values above 1000 will be coerced to
23026    /// 1000.
23027    pub page_size: i32,
23028
23029    /// Optional. Page token received from a previous `ListDataScanJobs` call.
23030    /// Provide this to retrieve the subsequent page. When paginating, all other
23031    /// parameters provided to `ListDataScanJobs` must match the call that provided
23032    /// the page token.
23033    pub page_token: std::string::String,
23034
23035    /// Optional. An expression for filtering the results of the ListDataScanJobs
23036    /// request.
23037    ///
23038    /// If unspecified, all datascan jobs will be returned. Multiple filters can be
23039    /// applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
23040    ///
23041    /// Allowed fields are:
23042    ///
23043    /// - `start_time`
23044    /// - `end_time`
23045    ///
23046    /// `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
23047    /// 2018-10-08T18:30:00-07:00).
23048    ///
23049    /// For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
23050    /// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
23051    /// specified start and end times.
23052    pub filter: std::string::String,
23053
23054    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23055}
23056
23057impl ListDataScanJobsRequest {
23058    pub fn new() -> Self {
23059        std::default::Default::default()
23060    }
23061
23062    /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
23063    ///
23064    /// # Example
23065    /// ```ignore,no_run
23066    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23067    /// let x = ListDataScanJobsRequest::new().set_parent("example");
23068    /// ```
23069    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23070        self.parent = v.into();
23071        self
23072    }
23073
23074    /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
23075    ///
23076    /// # Example
23077    /// ```ignore,no_run
23078    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23079    /// let x = ListDataScanJobsRequest::new().set_page_size(42);
23080    /// ```
23081    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23082        self.page_size = v.into();
23083        self
23084    }
23085
23086    /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
23087    ///
23088    /// # Example
23089    /// ```ignore,no_run
23090    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23091    /// let x = ListDataScanJobsRequest::new().set_page_token("example");
23092    /// ```
23093    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23094        self.page_token = v.into();
23095        self
23096    }
23097
23098    /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
23099    ///
23100    /// # Example
23101    /// ```ignore,no_run
23102    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23103    /// let x = ListDataScanJobsRequest::new().set_filter("example");
23104    /// ```
23105    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23106        self.filter = v.into();
23107        self
23108    }
23109}
23110
23111impl wkt::message::Message for ListDataScanJobsRequest {
23112    fn typename() -> &'static str {
23113        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsRequest"
23114    }
23115}
23116
23117/// List DataScanJobs response.
23118#[derive(Clone, Default, PartialEq)]
23119#[non_exhaustive]
23120pub struct ListDataScanJobsResponse {
23121    /// DataScanJobs (`BASIC` view only) under a given dataScan.
23122    pub data_scan_jobs: std::vec::Vec<crate::model::DataScanJob>,
23123
23124    /// Token to retrieve the next page of results, or empty if there are no more
23125    /// results in the list.
23126    pub next_page_token: std::string::String,
23127
23128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23129}
23130
23131impl ListDataScanJobsResponse {
23132    pub fn new() -> Self {
23133        std::default::Default::default()
23134    }
23135
23136    /// Sets the value of [data_scan_jobs][crate::model::ListDataScanJobsResponse::data_scan_jobs].
23137    ///
23138    /// # Example
23139    /// ```ignore,no_run
23140    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsResponse;
23141    /// use google_cloud_dataplex_v1::model::DataScanJob;
23142    /// let x = ListDataScanJobsResponse::new()
23143    ///     .set_data_scan_jobs([
23144    ///         DataScanJob::default()/* use setters */,
23145    ///         DataScanJob::default()/* use (different) setters */,
23146    ///     ]);
23147    /// ```
23148    pub fn set_data_scan_jobs<T, V>(mut self, v: T) -> Self
23149    where
23150        T: std::iter::IntoIterator<Item = V>,
23151        V: std::convert::Into<crate::model::DataScanJob>,
23152    {
23153        use std::iter::Iterator;
23154        self.data_scan_jobs = v.into_iter().map(|i| i.into()).collect();
23155        self
23156    }
23157
23158    /// Sets the value of [next_page_token][crate::model::ListDataScanJobsResponse::next_page_token].
23159    ///
23160    /// # Example
23161    /// ```ignore,no_run
23162    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsResponse;
23163    /// let x = ListDataScanJobsResponse::new().set_next_page_token("example");
23164    /// ```
23165    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23166        self.next_page_token = v.into();
23167        self
23168    }
23169}
23170
23171impl wkt::message::Message for ListDataScanJobsResponse {
23172    fn typename() -> &'static str {
23173        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsResponse"
23174    }
23175}
23176
23177#[doc(hidden)]
23178impl gax::paginator::internal::PageableResponse for ListDataScanJobsResponse {
23179    type PageItem = crate::model::DataScanJob;
23180
23181    fn items(self) -> std::vec::Vec<Self::PageItem> {
23182        self.data_scan_jobs
23183    }
23184
23185    fn next_page_token(&self) -> std::string::String {
23186        use std::clone::Clone;
23187        self.next_page_token.clone()
23188    }
23189}
23190
23191/// Request details for generating data quality rule recommendations.
23192#[derive(Clone, Default, PartialEq)]
23193#[non_exhaustive]
23194pub struct GenerateDataQualityRulesRequest {
23195    /// Required. The name must be one of the following:
23196    ///
23197    /// * The name of a data scan with at least one successful, completed data
23198    ///   profiling job
23199    /// * The name of a successful, completed data profiling job (a data scan job
23200    ///   where the job type is data profiling)
23201    pub name: std::string::String,
23202
23203    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23204}
23205
23206impl GenerateDataQualityRulesRequest {
23207    pub fn new() -> Self {
23208        std::default::Default::default()
23209    }
23210
23211    /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
23212    ///
23213    /// # Example
23214    /// ```ignore,no_run
23215    /// # use google_cloud_dataplex_v1::model::GenerateDataQualityRulesRequest;
23216    /// let x = GenerateDataQualityRulesRequest::new().set_name("example");
23217    /// ```
23218    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23219        self.name = v.into();
23220        self
23221    }
23222}
23223
23224impl wkt::message::Message for GenerateDataQualityRulesRequest {
23225    fn typename() -> &'static str {
23226        "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesRequest"
23227    }
23228}
23229
23230/// Response details for data quality rule recommendations.
23231#[derive(Clone, Default, PartialEq)]
23232#[non_exhaustive]
23233pub struct GenerateDataQualityRulesResponse {
23234    /// The data quality rules that Dataplex Universal Catalog generates based on
23235    /// the results of a data profiling scan.
23236    pub rule: std::vec::Vec<crate::model::DataQualityRule>,
23237
23238    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23239}
23240
23241impl GenerateDataQualityRulesResponse {
23242    pub fn new() -> Self {
23243        std::default::Default::default()
23244    }
23245
23246    /// Sets the value of [rule][crate::model::GenerateDataQualityRulesResponse::rule].
23247    ///
23248    /// # Example
23249    /// ```ignore,no_run
23250    /// # use google_cloud_dataplex_v1::model::GenerateDataQualityRulesResponse;
23251    /// use google_cloud_dataplex_v1::model::DataQualityRule;
23252    /// let x = GenerateDataQualityRulesResponse::new()
23253    ///     .set_rule([
23254    ///         DataQualityRule::default()/* use setters */,
23255    ///         DataQualityRule::default()/* use (different) setters */,
23256    ///     ]);
23257    /// ```
23258    pub fn set_rule<T, V>(mut self, v: T) -> Self
23259    where
23260        T: std::iter::IntoIterator<Item = V>,
23261        V: std::convert::Into<crate::model::DataQualityRule>,
23262    {
23263        use std::iter::Iterator;
23264        self.rule = v.into_iter().map(|i| i.into()).collect();
23265        self
23266    }
23267}
23268
23269impl wkt::message::Message for GenerateDataQualityRulesResponse {
23270    fn typename() -> &'static str {
23271        "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesResponse"
23272    }
23273}
23274
23275/// Represents a user-visible job which provides the insights for the related
23276/// data source.
23277///
23278/// For example:
23279///
23280/// * Data quality: generates queries based on the rules and runs against the
23281///   data to get data quality check results. For more information, see [Auto
23282///   data quality
23283///   overview](https://cloud.google.com/dataplex/docs/auto-data-quality-overview).
23284/// * Data profile: analyzes the data in tables and generates insights about
23285///   the structure, content and relationships (such as null percent,
23286///   cardinality, min/max/mean, etc). For more information, see [About data
23287///   profiling](https://cloud.google.com/dataplex/docs/data-profiling-overview).
23288/// * Data discovery: scans data in Cloud Storage buckets to extract and then
23289///   catalog metadata. For more information, see [Discover and catalog Cloud
23290///   Storage data](https://cloud.google.com/bigquery/docs/automatic-discovery).
23291/// * Data documentation: analyzes the table details and generates insights
23292///   including descriptions and sample SQL queries for the table. For more
23293///   information, see [Generate data insights in
23294///   BigQuery](https://cloud.google.com/bigquery/docs/data-insights).
23295#[derive(Clone, Default, PartialEq)]
23296#[non_exhaustive]
23297pub struct DataScan {
23298    /// Output only. Identifier. The relative resource name of the scan, of the
23299    /// form: `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`,
23300    /// where `project` refers to a *project_id* or *project_number* and
23301    /// `location_id` refers to a Google Cloud region.
23302    pub name: std::string::String,
23303
23304    /// Output only. System generated globally unique ID for the scan. This ID will
23305    /// be different if the scan is deleted and re-created with the same name.
23306    pub uid: std::string::String,
23307
23308    /// Optional. Description of the scan.
23309    ///
23310    /// * Must be between 1-1024 characters.
23311    pub description: std::string::String,
23312
23313    /// Optional. User friendly display name.
23314    ///
23315    /// * Must be between 1-256 characters.
23316    pub display_name: std::string::String,
23317
23318    /// Optional. User-defined labels for the scan.
23319    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
23320
23321    /// Output only. Current state of the DataScan.
23322    pub state: crate::model::State,
23323
23324    /// Output only. The time when the scan was created.
23325    pub create_time: std::option::Option<wkt::Timestamp>,
23326
23327    /// Output only. The time when the scan was last updated.
23328    pub update_time: std::option::Option<wkt::Timestamp>,
23329
23330    /// Required. The data source for DataScan.
23331    pub data: std::option::Option<crate::model::DataSource>,
23332
23333    /// Optional. DataScan execution settings.
23334    ///
23335    /// If not specified, the fields in it will use their default values.
23336    pub execution_spec: std::option::Option<crate::model::data_scan::ExecutionSpec>,
23337
23338    /// Output only. Status of the data scan execution.
23339    pub execution_status: std::option::Option<crate::model::data_scan::ExecutionStatus>,
23340
23341    /// Output only. The type of DataScan.
23342    pub r#type: crate::model::DataScanType,
23343
23344    /// Data scan related setting.
23345    /// The settings are required and immutable. After you configure the settings
23346    /// for one type of data scan, you can't change the data scan to a different
23347    /// type of data scan.
23348    pub spec: std::option::Option<crate::model::data_scan::Spec>,
23349
23350    /// The result of the data scan.
23351    pub result: std::option::Option<crate::model::data_scan::Result>,
23352
23353    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23354}
23355
23356impl DataScan {
23357    pub fn new() -> Self {
23358        std::default::Default::default()
23359    }
23360
23361    /// Sets the value of [name][crate::model::DataScan::name].
23362    ///
23363    /// # Example
23364    /// ```ignore,no_run
23365    /// # use google_cloud_dataplex_v1::model::DataScan;
23366    /// let x = DataScan::new().set_name("example");
23367    /// ```
23368    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23369        self.name = v.into();
23370        self
23371    }
23372
23373    /// Sets the value of [uid][crate::model::DataScan::uid].
23374    ///
23375    /// # Example
23376    /// ```ignore,no_run
23377    /// # use google_cloud_dataplex_v1::model::DataScan;
23378    /// let x = DataScan::new().set_uid("example");
23379    /// ```
23380    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23381        self.uid = v.into();
23382        self
23383    }
23384
23385    /// Sets the value of [description][crate::model::DataScan::description].
23386    ///
23387    /// # Example
23388    /// ```ignore,no_run
23389    /// # use google_cloud_dataplex_v1::model::DataScan;
23390    /// let x = DataScan::new().set_description("example");
23391    /// ```
23392    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23393        self.description = v.into();
23394        self
23395    }
23396
23397    /// Sets the value of [display_name][crate::model::DataScan::display_name].
23398    ///
23399    /// # Example
23400    /// ```ignore,no_run
23401    /// # use google_cloud_dataplex_v1::model::DataScan;
23402    /// let x = DataScan::new().set_display_name("example");
23403    /// ```
23404    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23405        self.display_name = v.into();
23406        self
23407    }
23408
23409    /// Sets the value of [labels][crate::model::DataScan::labels].
23410    ///
23411    /// # Example
23412    /// ```ignore,no_run
23413    /// # use google_cloud_dataplex_v1::model::DataScan;
23414    /// let x = DataScan::new().set_labels([
23415    ///     ("key0", "abc"),
23416    ///     ("key1", "xyz"),
23417    /// ]);
23418    /// ```
23419    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
23420    where
23421        T: std::iter::IntoIterator<Item = (K, V)>,
23422        K: std::convert::Into<std::string::String>,
23423        V: std::convert::Into<std::string::String>,
23424    {
23425        use std::iter::Iterator;
23426        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
23427        self
23428    }
23429
23430    /// Sets the value of [state][crate::model::DataScan::state].
23431    ///
23432    /// # Example
23433    /// ```ignore,no_run
23434    /// # use google_cloud_dataplex_v1::model::DataScan;
23435    /// use google_cloud_dataplex_v1::model::State;
23436    /// let x0 = DataScan::new().set_state(State::Active);
23437    /// let x1 = DataScan::new().set_state(State::Creating);
23438    /// let x2 = DataScan::new().set_state(State::Deleting);
23439    /// ```
23440    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
23441        self.state = v.into();
23442        self
23443    }
23444
23445    /// Sets the value of [create_time][crate::model::DataScan::create_time].
23446    ///
23447    /// # Example
23448    /// ```ignore,no_run
23449    /// # use google_cloud_dataplex_v1::model::DataScan;
23450    /// use wkt::Timestamp;
23451    /// let x = DataScan::new().set_create_time(Timestamp::default()/* use setters */);
23452    /// ```
23453    pub fn set_create_time<T>(mut self, v: T) -> Self
23454    where
23455        T: std::convert::Into<wkt::Timestamp>,
23456    {
23457        self.create_time = std::option::Option::Some(v.into());
23458        self
23459    }
23460
23461    /// Sets or clears the value of [create_time][crate::model::DataScan::create_time].
23462    ///
23463    /// # Example
23464    /// ```ignore,no_run
23465    /// # use google_cloud_dataplex_v1::model::DataScan;
23466    /// use wkt::Timestamp;
23467    /// let x = DataScan::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
23468    /// let x = DataScan::new().set_or_clear_create_time(None::<Timestamp>);
23469    /// ```
23470    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
23471    where
23472        T: std::convert::Into<wkt::Timestamp>,
23473    {
23474        self.create_time = v.map(|x| x.into());
23475        self
23476    }
23477
23478    /// Sets the value of [update_time][crate::model::DataScan::update_time].
23479    ///
23480    /// # Example
23481    /// ```ignore,no_run
23482    /// # use google_cloud_dataplex_v1::model::DataScan;
23483    /// use wkt::Timestamp;
23484    /// let x = DataScan::new().set_update_time(Timestamp::default()/* use setters */);
23485    /// ```
23486    pub fn set_update_time<T>(mut self, v: T) -> Self
23487    where
23488        T: std::convert::Into<wkt::Timestamp>,
23489    {
23490        self.update_time = std::option::Option::Some(v.into());
23491        self
23492    }
23493
23494    /// Sets or clears the value of [update_time][crate::model::DataScan::update_time].
23495    ///
23496    /// # Example
23497    /// ```ignore,no_run
23498    /// # use google_cloud_dataplex_v1::model::DataScan;
23499    /// use wkt::Timestamp;
23500    /// let x = DataScan::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
23501    /// let x = DataScan::new().set_or_clear_update_time(None::<Timestamp>);
23502    /// ```
23503    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
23504    where
23505        T: std::convert::Into<wkt::Timestamp>,
23506    {
23507        self.update_time = v.map(|x| x.into());
23508        self
23509    }
23510
23511    /// Sets the value of [data][crate::model::DataScan::data].
23512    ///
23513    /// # Example
23514    /// ```ignore,no_run
23515    /// # use google_cloud_dataplex_v1::model::DataScan;
23516    /// use google_cloud_dataplex_v1::model::DataSource;
23517    /// let x = DataScan::new().set_data(DataSource::default()/* use setters */);
23518    /// ```
23519    pub fn set_data<T>(mut self, v: T) -> Self
23520    where
23521        T: std::convert::Into<crate::model::DataSource>,
23522    {
23523        self.data = std::option::Option::Some(v.into());
23524        self
23525    }
23526
23527    /// Sets or clears the value of [data][crate::model::DataScan::data].
23528    ///
23529    /// # Example
23530    /// ```ignore,no_run
23531    /// # use google_cloud_dataplex_v1::model::DataScan;
23532    /// use google_cloud_dataplex_v1::model::DataSource;
23533    /// let x = DataScan::new().set_or_clear_data(Some(DataSource::default()/* use setters */));
23534    /// let x = DataScan::new().set_or_clear_data(None::<DataSource>);
23535    /// ```
23536    pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
23537    where
23538        T: std::convert::Into<crate::model::DataSource>,
23539    {
23540        self.data = v.map(|x| x.into());
23541        self
23542    }
23543
23544    /// Sets the value of [execution_spec][crate::model::DataScan::execution_spec].
23545    ///
23546    /// # Example
23547    /// ```ignore,no_run
23548    /// # use google_cloud_dataplex_v1::model::DataScan;
23549    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
23550    /// let x = DataScan::new().set_execution_spec(ExecutionSpec::default()/* use setters */);
23551    /// ```
23552    pub fn set_execution_spec<T>(mut self, v: T) -> Self
23553    where
23554        T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
23555    {
23556        self.execution_spec = std::option::Option::Some(v.into());
23557        self
23558    }
23559
23560    /// Sets or clears the value of [execution_spec][crate::model::DataScan::execution_spec].
23561    ///
23562    /// # Example
23563    /// ```ignore,no_run
23564    /// # use google_cloud_dataplex_v1::model::DataScan;
23565    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
23566    /// let x = DataScan::new().set_or_clear_execution_spec(Some(ExecutionSpec::default()/* use setters */));
23567    /// let x = DataScan::new().set_or_clear_execution_spec(None::<ExecutionSpec>);
23568    /// ```
23569    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
23570    where
23571        T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
23572    {
23573        self.execution_spec = v.map(|x| x.into());
23574        self
23575    }
23576
23577    /// Sets the value of [execution_status][crate::model::DataScan::execution_status].
23578    ///
23579    /// # Example
23580    /// ```ignore,no_run
23581    /// # use google_cloud_dataplex_v1::model::DataScan;
23582    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
23583    /// let x = DataScan::new().set_execution_status(ExecutionStatus::default()/* use setters */);
23584    /// ```
23585    pub fn set_execution_status<T>(mut self, v: T) -> Self
23586    where
23587        T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
23588    {
23589        self.execution_status = std::option::Option::Some(v.into());
23590        self
23591    }
23592
23593    /// Sets or clears the value of [execution_status][crate::model::DataScan::execution_status].
23594    ///
23595    /// # Example
23596    /// ```ignore,no_run
23597    /// # use google_cloud_dataplex_v1::model::DataScan;
23598    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
23599    /// let x = DataScan::new().set_or_clear_execution_status(Some(ExecutionStatus::default()/* use setters */));
23600    /// let x = DataScan::new().set_or_clear_execution_status(None::<ExecutionStatus>);
23601    /// ```
23602    pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
23603    where
23604        T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
23605    {
23606        self.execution_status = v.map(|x| x.into());
23607        self
23608    }
23609
23610    /// Sets the value of [r#type][crate::model::DataScan::type].
23611    ///
23612    /// # Example
23613    /// ```ignore,no_run
23614    /// # use google_cloud_dataplex_v1::model::DataScan;
23615    /// use google_cloud_dataplex_v1::model::DataScanType;
23616    /// let x0 = DataScan::new().set_type(DataScanType::DataQuality);
23617    /// let x1 = DataScan::new().set_type(DataScanType::DataProfile);
23618    /// let x2 = DataScan::new().set_type(DataScanType::DataDiscovery);
23619    /// ```
23620    pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
23621        self.r#type = v.into();
23622        self
23623    }
23624
23625    /// Sets the value of [spec][crate::model::DataScan::spec].
23626    ///
23627    /// Note that all the setters affecting `spec` are mutually
23628    /// exclusive.
23629    ///
23630    /// # Example
23631    /// ```ignore,no_run
23632    /// # use google_cloud_dataplex_v1::model::DataScan;
23633    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
23634    /// let x = DataScan::new().set_spec(Some(
23635    ///     google_cloud_dataplex_v1::model::data_scan::Spec::DataQualitySpec(DataQualitySpec::default().into())));
23636    /// ```
23637    pub fn set_spec<T: std::convert::Into<std::option::Option<crate::model::data_scan::Spec>>>(
23638        mut self,
23639        v: T,
23640    ) -> Self {
23641        self.spec = v.into();
23642        self
23643    }
23644
23645    /// The value of [spec][crate::model::DataScan::spec]
23646    /// if it holds a `DataQualitySpec`, `None` if the field is not set or
23647    /// holds a different branch.
23648    pub fn data_quality_spec(
23649        &self,
23650    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
23651        #[allow(unreachable_patterns)]
23652        self.spec.as_ref().and_then(|v| match v {
23653            crate::model::data_scan::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
23654            _ => std::option::Option::None,
23655        })
23656    }
23657
23658    /// Sets the value of [spec][crate::model::DataScan::spec]
23659    /// to hold a `DataQualitySpec`.
23660    ///
23661    /// Note that all the setters affecting `spec` are
23662    /// mutually exclusive.
23663    ///
23664    /// # Example
23665    /// ```ignore,no_run
23666    /// # use google_cloud_dataplex_v1::model::DataScan;
23667    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
23668    /// let x = DataScan::new().set_data_quality_spec(DataQualitySpec::default()/* use setters */);
23669    /// assert!(x.data_quality_spec().is_some());
23670    /// assert!(x.data_profile_spec().is_none());
23671    /// assert!(x.data_discovery_spec().is_none());
23672    /// assert!(x.data_documentation_spec().is_none());
23673    /// ```
23674    pub fn set_data_quality_spec<
23675        T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
23676    >(
23677        mut self,
23678        v: T,
23679    ) -> Self {
23680        self.spec =
23681            std::option::Option::Some(crate::model::data_scan::Spec::DataQualitySpec(v.into()));
23682        self
23683    }
23684
23685    /// The value of [spec][crate::model::DataScan::spec]
23686    /// if it holds a `DataProfileSpec`, `None` if the field is not set or
23687    /// holds a different branch.
23688    pub fn data_profile_spec(
23689        &self,
23690    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
23691        #[allow(unreachable_patterns)]
23692        self.spec.as_ref().and_then(|v| match v {
23693            crate::model::data_scan::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
23694            _ => std::option::Option::None,
23695        })
23696    }
23697
23698    /// Sets the value of [spec][crate::model::DataScan::spec]
23699    /// to hold a `DataProfileSpec`.
23700    ///
23701    /// Note that all the setters affecting `spec` are
23702    /// mutually exclusive.
23703    ///
23704    /// # Example
23705    /// ```ignore,no_run
23706    /// # use google_cloud_dataplex_v1::model::DataScan;
23707    /// use google_cloud_dataplex_v1::model::DataProfileSpec;
23708    /// let x = DataScan::new().set_data_profile_spec(DataProfileSpec::default()/* use setters */);
23709    /// assert!(x.data_profile_spec().is_some());
23710    /// assert!(x.data_quality_spec().is_none());
23711    /// assert!(x.data_discovery_spec().is_none());
23712    /// assert!(x.data_documentation_spec().is_none());
23713    /// ```
23714    pub fn set_data_profile_spec<
23715        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
23716    >(
23717        mut self,
23718        v: T,
23719    ) -> Self {
23720        self.spec =
23721            std::option::Option::Some(crate::model::data_scan::Spec::DataProfileSpec(v.into()));
23722        self
23723    }
23724
23725    /// The value of [spec][crate::model::DataScan::spec]
23726    /// if it holds a `DataDiscoverySpec`, `None` if the field is not set or
23727    /// holds a different branch.
23728    pub fn data_discovery_spec(
23729        &self,
23730    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
23731        #[allow(unreachable_patterns)]
23732        self.spec.as_ref().and_then(|v| match v {
23733            crate::model::data_scan::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
23734            _ => std::option::Option::None,
23735        })
23736    }
23737
23738    /// Sets the value of [spec][crate::model::DataScan::spec]
23739    /// to hold a `DataDiscoverySpec`.
23740    ///
23741    /// Note that all the setters affecting `spec` are
23742    /// mutually exclusive.
23743    ///
23744    /// # Example
23745    /// ```ignore,no_run
23746    /// # use google_cloud_dataplex_v1::model::DataScan;
23747    /// use google_cloud_dataplex_v1::model::DataDiscoverySpec;
23748    /// let x = DataScan::new().set_data_discovery_spec(DataDiscoverySpec::default()/* use setters */);
23749    /// assert!(x.data_discovery_spec().is_some());
23750    /// assert!(x.data_quality_spec().is_none());
23751    /// assert!(x.data_profile_spec().is_none());
23752    /// assert!(x.data_documentation_spec().is_none());
23753    /// ```
23754    pub fn set_data_discovery_spec<
23755        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
23756    >(
23757        mut self,
23758        v: T,
23759    ) -> Self {
23760        self.spec =
23761            std::option::Option::Some(crate::model::data_scan::Spec::DataDiscoverySpec(v.into()));
23762        self
23763    }
23764
23765    /// The value of [spec][crate::model::DataScan::spec]
23766    /// if it holds a `DataDocumentationSpec`, `None` if the field is not set or
23767    /// holds a different branch.
23768    pub fn data_documentation_spec(
23769        &self,
23770    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
23771        #[allow(unreachable_patterns)]
23772        self.spec.as_ref().and_then(|v| match v {
23773            crate::model::data_scan::Spec::DataDocumentationSpec(v) => std::option::Option::Some(v),
23774            _ => std::option::Option::None,
23775        })
23776    }
23777
23778    /// Sets the value of [spec][crate::model::DataScan::spec]
23779    /// to hold a `DataDocumentationSpec`.
23780    ///
23781    /// Note that all the setters affecting `spec` are
23782    /// mutually exclusive.
23783    ///
23784    /// # Example
23785    /// ```ignore,no_run
23786    /// # use google_cloud_dataplex_v1::model::DataScan;
23787    /// use google_cloud_dataplex_v1::model::DataDocumentationSpec;
23788    /// let x = DataScan::new().set_data_documentation_spec(DataDocumentationSpec::default()/* use setters */);
23789    /// assert!(x.data_documentation_spec().is_some());
23790    /// assert!(x.data_quality_spec().is_none());
23791    /// assert!(x.data_profile_spec().is_none());
23792    /// assert!(x.data_discovery_spec().is_none());
23793    /// ```
23794    pub fn set_data_documentation_spec<
23795        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
23796    >(
23797        mut self,
23798        v: T,
23799    ) -> Self {
23800        self.spec = std::option::Option::Some(
23801            crate::model::data_scan::Spec::DataDocumentationSpec(v.into()),
23802        );
23803        self
23804    }
23805
23806    /// Sets the value of [result][crate::model::DataScan::result].
23807    ///
23808    /// Note that all the setters affecting `result` are mutually
23809    /// exclusive.
23810    ///
23811    /// # Example
23812    /// ```ignore,no_run
23813    /// # use google_cloud_dataplex_v1::model::DataScan;
23814    /// use google_cloud_dataplex_v1::model::DataQualityResult;
23815    /// let x = DataScan::new().set_result(Some(
23816    ///     google_cloud_dataplex_v1::model::data_scan::Result::DataQualityResult(DataQualityResult::default().into())));
23817    /// ```
23818    pub fn set_result<
23819        T: std::convert::Into<std::option::Option<crate::model::data_scan::Result>>,
23820    >(
23821        mut self,
23822        v: T,
23823    ) -> Self {
23824        self.result = v.into();
23825        self
23826    }
23827
23828    /// The value of [result][crate::model::DataScan::result]
23829    /// if it holds a `DataQualityResult`, `None` if the field is not set or
23830    /// holds a different branch.
23831    pub fn data_quality_result(
23832        &self,
23833    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
23834        #[allow(unreachable_patterns)]
23835        self.result.as_ref().and_then(|v| match v {
23836            crate::model::data_scan::Result::DataQualityResult(v) => std::option::Option::Some(v),
23837            _ => std::option::Option::None,
23838        })
23839    }
23840
23841    /// Sets the value of [result][crate::model::DataScan::result]
23842    /// to hold a `DataQualityResult`.
23843    ///
23844    /// Note that all the setters affecting `result` are
23845    /// mutually exclusive.
23846    ///
23847    /// # Example
23848    /// ```ignore,no_run
23849    /// # use google_cloud_dataplex_v1::model::DataScan;
23850    /// use google_cloud_dataplex_v1::model::DataQualityResult;
23851    /// let x = DataScan::new().set_data_quality_result(DataQualityResult::default()/* use setters */);
23852    /// assert!(x.data_quality_result().is_some());
23853    /// assert!(x.data_profile_result().is_none());
23854    /// assert!(x.data_discovery_result().is_none());
23855    /// assert!(x.data_documentation_result().is_none());
23856    /// ```
23857    pub fn set_data_quality_result<
23858        T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
23859    >(
23860        mut self,
23861        v: T,
23862    ) -> Self {
23863        self.result =
23864            std::option::Option::Some(crate::model::data_scan::Result::DataQualityResult(v.into()));
23865        self
23866    }
23867
23868    /// The value of [result][crate::model::DataScan::result]
23869    /// if it holds a `DataProfileResult`, `None` if the field is not set or
23870    /// holds a different branch.
23871    pub fn data_profile_result(
23872        &self,
23873    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
23874        #[allow(unreachable_patterns)]
23875        self.result.as_ref().and_then(|v| match v {
23876            crate::model::data_scan::Result::DataProfileResult(v) => std::option::Option::Some(v),
23877            _ => std::option::Option::None,
23878        })
23879    }
23880
23881    /// Sets the value of [result][crate::model::DataScan::result]
23882    /// to hold a `DataProfileResult`.
23883    ///
23884    /// Note that all the setters affecting `result` are
23885    /// mutually exclusive.
23886    ///
23887    /// # Example
23888    /// ```ignore,no_run
23889    /// # use google_cloud_dataplex_v1::model::DataScan;
23890    /// use google_cloud_dataplex_v1::model::DataProfileResult;
23891    /// let x = DataScan::new().set_data_profile_result(DataProfileResult::default()/* use setters */);
23892    /// assert!(x.data_profile_result().is_some());
23893    /// assert!(x.data_quality_result().is_none());
23894    /// assert!(x.data_discovery_result().is_none());
23895    /// assert!(x.data_documentation_result().is_none());
23896    /// ```
23897    pub fn set_data_profile_result<
23898        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
23899    >(
23900        mut self,
23901        v: T,
23902    ) -> Self {
23903        self.result =
23904            std::option::Option::Some(crate::model::data_scan::Result::DataProfileResult(v.into()));
23905        self
23906    }
23907
23908    /// The value of [result][crate::model::DataScan::result]
23909    /// if it holds a `DataDiscoveryResult`, `None` if the field is not set or
23910    /// holds a different branch.
23911    pub fn data_discovery_result(
23912        &self,
23913    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
23914        #[allow(unreachable_patterns)]
23915        self.result.as_ref().and_then(|v| match v {
23916            crate::model::data_scan::Result::DataDiscoveryResult(v) => std::option::Option::Some(v),
23917            _ => std::option::Option::None,
23918        })
23919    }
23920
23921    /// Sets the value of [result][crate::model::DataScan::result]
23922    /// to hold a `DataDiscoveryResult`.
23923    ///
23924    /// Note that all the setters affecting `result` are
23925    /// mutually exclusive.
23926    ///
23927    /// # Example
23928    /// ```ignore,no_run
23929    /// # use google_cloud_dataplex_v1::model::DataScan;
23930    /// use google_cloud_dataplex_v1::model::DataDiscoveryResult;
23931    /// let x = DataScan::new().set_data_discovery_result(DataDiscoveryResult::default()/* use setters */);
23932    /// assert!(x.data_discovery_result().is_some());
23933    /// assert!(x.data_quality_result().is_none());
23934    /// assert!(x.data_profile_result().is_none());
23935    /// assert!(x.data_documentation_result().is_none());
23936    /// ```
23937    pub fn set_data_discovery_result<
23938        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
23939    >(
23940        mut self,
23941        v: T,
23942    ) -> Self {
23943        self.result = std::option::Option::Some(
23944            crate::model::data_scan::Result::DataDiscoveryResult(v.into()),
23945        );
23946        self
23947    }
23948
23949    /// The value of [result][crate::model::DataScan::result]
23950    /// if it holds a `DataDocumentationResult`, `None` if the field is not set or
23951    /// holds a different branch.
23952    pub fn data_documentation_result(
23953        &self,
23954    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
23955        #[allow(unreachable_patterns)]
23956        self.result.as_ref().and_then(|v| match v {
23957            crate::model::data_scan::Result::DataDocumentationResult(v) => {
23958                std::option::Option::Some(v)
23959            }
23960            _ => std::option::Option::None,
23961        })
23962    }
23963
23964    /// Sets the value of [result][crate::model::DataScan::result]
23965    /// to hold a `DataDocumentationResult`.
23966    ///
23967    /// Note that all the setters affecting `result` are
23968    /// mutually exclusive.
23969    ///
23970    /// # Example
23971    /// ```ignore,no_run
23972    /// # use google_cloud_dataplex_v1::model::DataScan;
23973    /// use google_cloud_dataplex_v1::model::DataDocumentationResult;
23974    /// let x = DataScan::new().set_data_documentation_result(DataDocumentationResult::default()/* use setters */);
23975    /// assert!(x.data_documentation_result().is_some());
23976    /// assert!(x.data_quality_result().is_none());
23977    /// assert!(x.data_profile_result().is_none());
23978    /// assert!(x.data_discovery_result().is_none());
23979    /// ```
23980    pub fn set_data_documentation_result<
23981        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
23982    >(
23983        mut self,
23984        v: T,
23985    ) -> Self {
23986        self.result = std::option::Option::Some(
23987            crate::model::data_scan::Result::DataDocumentationResult(v.into()),
23988        );
23989        self
23990    }
23991}
23992
23993impl wkt::message::Message for DataScan {
23994    fn typename() -> &'static str {
23995        "type.googleapis.com/google.cloud.dataplex.v1.DataScan"
23996    }
23997}
23998
23999/// Defines additional types related to [DataScan].
24000pub mod data_scan {
24001    #[allow(unused_imports)]
24002    use super::*;
24003
24004    /// DataScan execution settings.
24005    #[derive(Clone, Default, PartialEq)]
24006    #[non_exhaustive]
24007    pub struct ExecutionSpec {
24008        /// Optional. Spec related to how often and when a scan should be triggered.
24009        ///
24010        /// If not specified, the default is `OnDemand`, which means the scan will
24011        /// not run until the user calls `RunDataScan` API.
24012        pub trigger: std::option::Option<crate::model::Trigger>,
24013
24014        /// Spec related to incremental scan of the data
24015        ///
24016        /// When an option is selected for incremental scan, it cannot be unset or
24017        /// changed. If not specified, a data scan will run for all data in the
24018        /// table.
24019        pub incremental: std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
24020
24021        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24022    }
24023
24024    impl ExecutionSpec {
24025        pub fn new() -> Self {
24026            std::default::Default::default()
24027        }
24028
24029        /// Sets the value of [trigger][crate::model::data_scan::ExecutionSpec::trigger].
24030        ///
24031        /// # Example
24032        /// ```ignore,no_run
24033        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24034        /// use google_cloud_dataplex_v1::model::Trigger;
24035        /// let x = ExecutionSpec::new().set_trigger(Trigger::default()/* use setters */);
24036        /// ```
24037        pub fn set_trigger<T>(mut self, v: T) -> Self
24038        where
24039            T: std::convert::Into<crate::model::Trigger>,
24040        {
24041            self.trigger = std::option::Option::Some(v.into());
24042            self
24043        }
24044
24045        /// Sets or clears the value of [trigger][crate::model::data_scan::ExecutionSpec::trigger].
24046        ///
24047        /// # Example
24048        /// ```ignore,no_run
24049        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24050        /// use google_cloud_dataplex_v1::model::Trigger;
24051        /// let x = ExecutionSpec::new().set_or_clear_trigger(Some(Trigger::default()/* use setters */));
24052        /// let x = ExecutionSpec::new().set_or_clear_trigger(None::<Trigger>);
24053        /// ```
24054        pub fn set_or_clear_trigger<T>(mut self, v: std::option::Option<T>) -> Self
24055        where
24056            T: std::convert::Into<crate::model::Trigger>,
24057        {
24058            self.trigger = v.map(|x| x.into());
24059            self
24060        }
24061
24062        /// Sets the value of [incremental][crate::model::data_scan::ExecutionSpec::incremental].
24063        ///
24064        /// Note that all the setters affecting `incremental` are mutually
24065        /// exclusive.
24066        ///
24067        /// # Example
24068        /// ```ignore,no_run
24069        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24070        /// use google_cloud_dataplex_v1::model::data_scan::execution_spec::Incremental;
24071        /// let x = ExecutionSpec::new().set_incremental(Some(Incremental::Field("example".to_string())));
24072        /// ```
24073        pub fn set_incremental<
24074            T: std::convert::Into<
24075                    std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
24076                >,
24077        >(
24078            mut self,
24079            v: T,
24080        ) -> Self {
24081            self.incremental = v.into();
24082            self
24083        }
24084
24085        /// The value of [incremental][crate::model::data_scan::ExecutionSpec::incremental]
24086        /// if it holds a `Field`, `None` if the field is not set or
24087        /// holds a different branch.
24088        pub fn field(&self) -> std::option::Option<&std::string::String> {
24089            #[allow(unreachable_patterns)]
24090            self.incremental.as_ref().and_then(|v| match v {
24091                crate::model::data_scan::execution_spec::Incremental::Field(v) => {
24092                    std::option::Option::Some(v)
24093                }
24094                _ => std::option::Option::None,
24095            })
24096        }
24097
24098        /// Sets the value of [incremental][crate::model::data_scan::ExecutionSpec::incremental]
24099        /// to hold a `Field`.
24100        ///
24101        /// Note that all the setters affecting `incremental` are
24102        /// mutually exclusive.
24103        ///
24104        /// # Example
24105        /// ```ignore,no_run
24106        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24107        /// let x = ExecutionSpec::new().set_field("example");
24108        /// assert!(x.field().is_some());
24109        /// ```
24110        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24111            self.incremental = std::option::Option::Some(
24112                crate::model::data_scan::execution_spec::Incremental::Field(v.into()),
24113            );
24114            self
24115        }
24116    }
24117
24118    impl wkt::message::Message for ExecutionSpec {
24119        fn typename() -> &'static str {
24120            "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionSpec"
24121        }
24122    }
24123
24124    /// Defines additional types related to [ExecutionSpec].
24125    pub mod execution_spec {
24126        #[allow(unused_imports)]
24127        use super::*;
24128
24129        /// Spec related to incremental scan of the data
24130        ///
24131        /// When an option is selected for incremental scan, it cannot be unset or
24132        /// changed. If not specified, a data scan will run for all data in the
24133        /// table.
24134        #[derive(Clone, Debug, PartialEq)]
24135        #[non_exhaustive]
24136        pub enum Incremental {
24137            /// Immutable. The unnested field (of type *Date* or *Timestamp*) that
24138            /// contains values which monotonically increase over time.
24139            ///
24140            /// If not specified, a data scan will run for all data in the table.
24141            Field(std::string::String),
24142        }
24143    }
24144
24145    /// Status of the data scan execution.
24146    #[derive(Clone, Default, PartialEq)]
24147    #[non_exhaustive]
24148    pub struct ExecutionStatus {
24149        /// Optional. The time when the latest DataScanJob started.
24150        pub latest_job_start_time: std::option::Option<wkt::Timestamp>,
24151
24152        /// Optional. The time when the latest DataScanJob ended.
24153        pub latest_job_end_time: std::option::Option<wkt::Timestamp>,
24154
24155        /// Optional. The time when the DataScanJob execution was created.
24156        pub latest_job_create_time: std::option::Option<wkt::Timestamp>,
24157
24158        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24159    }
24160
24161    impl ExecutionStatus {
24162        pub fn new() -> Self {
24163            std::default::Default::default()
24164        }
24165
24166        /// Sets the value of [latest_job_start_time][crate::model::data_scan::ExecutionStatus::latest_job_start_time].
24167        ///
24168        /// # Example
24169        /// ```ignore,no_run
24170        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24171        /// use wkt::Timestamp;
24172        /// let x = ExecutionStatus::new().set_latest_job_start_time(Timestamp::default()/* use setters */);
24173        /// ```
24174        pub fn set_latest_job_start_time<T>(mut self, v: T) -> Self
24175        where
24176            T: std::convert::Into<wkt::Timestamp>,
24177        {
24178            self.latest_job_start_time = std::option::Option::Some(v.into());
24179            self
24180        }
24181
24182        /// Sets or clears the value of [latest_job_start_time][crate::model::data_scan::ExecutionStatus::latest_job_start_time].
24183        ///
24184        /// # Example
24185        /// ```ignore,no_run
24186        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24187        /// use wkt::Timestamp;
24188        /// let x = ExecutionStatus::new().set_or_clear_latest_job_start_time(Some(Timestamp::default()/* use setters */));
24189        /// let x = ExecutionStatus::new().set_or_clear_latest_job_start_time(None::<Timestamp>);
24190        /// ```
24191        pub fn set_or_clear_latest_job_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24192        where
24193            T: std::convert::Into<wkt::Timestamp>,
24194        {
24195            self.latest_job_start_time = v.map(|x| x.into());
24196            self
24197        }
24198
24199        /// Sets the value of [latest_job_end_time][crate::model::data_scan::ExecutionStatus::latest_job_end_time].
24200        ///
24201        /// # Example
24202        /// ```ignore,no_run
24203        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24204        /// use wkt::Timestamp;
24205        /// let x = ExecutionStatus::new().set_latest_job_end_time(Timestamp::default()/* use setters */);
24206        /// ```
24207        pub fn set_latest_job_end_time<T>(mut self, v: T) -> Self
24208        where
24209            T: std::convert::Into<wkt::Timestamp>,
24210        {
24211            self.latest_job_end_time = std::option::Option::Some(v.into());
24212            self
24213        }
24214
24215        /// Sets or clears the value of [latest_job_end_time][crate::model::data_scan::ExecutionStatus::latest_job_end_time].
24216        ///
24217        /// # Example
24218        /// ```ignore,no_run
24219        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24220        /// use wkt::Timestamp;
24221        /// let x = ExecutionStatus::new().set_or_clear_latest_job_end_time(Some(Timestamp::default()/* use setters */));
24222        /// let x = ExecutionStatus::new().set_or_clear_latest_job_end_time(None::<Timestamp>);
24223        /// ```
24224        pub fn set_or_clear_latest_job_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24225        where
24226            T: std::convert::Into<wkt::Timestamp>,
24227        {
24228            self.latest_job_end_time = v.map(|x| x.into());
24229            self
24230        }
24231
24232        /// Sets the value of [latest_job_create_time][crate::model::data_scan::ExecutionStatus::latest_job_create_time].
24233        ///
24234        /// # Example
24235        /// ```ignore,no_run
24236        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24237        /// use wkt::Timestamp;
24238        /// let x = ExecutionStatus::new().set_latest_job_create_time(Timestamp::default()/* use setters */);
24239        /// ```
24240        pub fn set_latest_job_create_time<T>(mut self, v: T) -> Self
24241        where
24242            T: std::convert::Into<wkt::Timestamp>,
24243        {
24244            self.latest_job_create_time = std::option::Option::Some(v.into());
24245            self
24246        }
24247
24248        /// Sets or clears the value of [latest_job_create_time][crate::model::data_scan::ExecutionStatus::latest_job_create_time].
24249        ///
24250        /// # Example
24251        /// ```ignore,no_run
24252        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24253        /// use wkt::Timestamp;
24254        /// let x = ExecutionStatus::new().set_or_clear_latest_job_create_time(Some(Timestamp::default()/* use setters */));
24255        /// let x = ExecutionStatus::new().set_or_clear_latest_job_create_time(None::<Timestamp>);
24256        /// ```
24257        pub fn set_or_clear_latest_job_create_time<T>(mut self, v: std::option::Option<T>) -> Self
24258        where
24259            T: std::convert::Into<wkt::Timestamp>,
24260        {
24261            self.latest_job_create_time = v.map(|x| x.into());
24262            self
24263        }
24264    }
24265
24266    impl wkt::message::Message for ExecutionStatus {
24267        fn typename() -> &'static str {
24268            "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionStatus"
24269        }
24270    }
24271
24272    /// Data scan related setting.
24273    /// The settings are required and immutable. After you configure the settings
24274    /// for one type of data scan, you can't change the data scan to a different
24275    /// type of data scan.
24276    #[derive(Clone, Debug, PartialEq)]
24277    #[non_exhaustive]
24278    pub enum Spec {
24279        /// Settings for a data quality scan.
24280        DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
24281        /// Settings for a data profile scan.
24282        DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
24283        /// Settings for a data discovery scan.
24284        DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
24285        /// Settings for a data documentation scan.
24286        DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
24287    }
24288
24289    /// The result of the data scan.
24290    #[derive(Clone, Debug, PartialEq)]
24291    #[non_exhaustive]
24292    pub enum Result {
24293        /// Output only. The result of a data quality scan.
24294        DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
24295        /// Output only. The result of a data profile scan.
24296        DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
24297        /// Output only. The result of a data discovery scan.
24298        DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
24299        /// Output only. The result of a data documentation scan.
24300        DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
24301    }
24302}
24303
24304/// A DataScanJob represents an instance of DataScan execution.
24305#[derive(Clone, Default, PartialEq)]
24306#[non_exhaustive]
24307pub struct DataScanJob {
24308    /// Output only. Identifier. The relative resource name of the DataScanJob, of
24309    /// the form:
24310    /// `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`,
24311    /// where `project` refers to a *project_id* or *project_number* and
24312    /// `location_id` refers to a Google Cloud region.
24313    pub name: std::string::String,
24314
24315    /// Output only. System generated globally unique ID for the DataScanJob.
24316    pub uid: std::string::String,
24317
24318    /// Output only. The time when the DataScanJob was created.
24319    pub create_time: std::option::Option<wkt::Timestamp>,
24320
24321    /// Output only. The time when the DataScanJob was started.
24322    pub start_time: std::option::Option<wkt::Timestamp>,
24323
24324    /// Output only. The time when the DataScanJob ended.
24325    pub end_time: std::option::Option<wkt::Timestamp>,
24326
24327    /// Output only. Execution state for the DataScanJob.
24328    pub state: crate::model::data_scan_job::State,
24329
24330    /// Output only. Additional information about the current state.
24331    pub message: std::string::String,
24332
24333    /// Output only. The type of the parent DataScan.
24334    pub r#type: crate::model::DataScanType,
24335
24336    /// Data scan related setting.
24337    pub spec: std::option::Option<crate::model::data_scan_job::Spec>,
24338
24339    /// The result of the data scan.
24340    pub result: std::option::Option<crate::model::data_scan_job::Result>,
24341
24342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24343}
24344
24345impl DataScanJob {
24346    pub fn new() -> Self {
24347        std::default::Default::default()
24348    }
24349
24350    /// Sets the value of [name][crate::model::DataScanJob::name].
24351    ///
24352    /// # Example
24353    /// ```ignore,no_run
24354    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24355    /// let x = DataScanJob::new().set_name("example");
24356    /// ```
24357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24358        self.name = v.into();
24359        self
24360    }
24361
24362    /// Sets the value of [uid][crate::model::DataScanJob::uid].
24363    ///
24364    /// # Example
24365    /// ```ignore,no_run
24366    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24367    /// let x = DataScanJob::new().set_uid("example");
24368    /// ```
24369    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24370        self.uid = v.into();
24371        self
24372    }
24373
24374    /// Sets the value of [create_time][crate::model::DataScanJob::create_time].
24375    ///
24376    /// # Example
24377    /// ```ignore,no_run
24378    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24379    /// use wkt::Timestamp;
24380    /// let x = DataScanJob::new().set_create_time(Timestamp::default()/* use setters */);
24381    /// ```
24382    pub fn set_create_time<T>(mut self, v: T) -> Self
24383    where
24384        T: std::convert::Into<wkt::Timestamp>,
24385    {
24386        self.create_time = std::option::Option::Some(v.into());
24387        self
24388    }
24389
24390    /// Sets or clears the value of [create_time][crate::model::DataScanJob::create_time].
24391    ///
24392    /// # Example
24393    /// ```ignore,no_run
24394    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24395    /// use wkt::Timestamp;
24396    /// let x = DataScanJob::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
24397    /// let x = DataScanJob::new().set_or_clear_create_time(None::<Timestamp>);
24398    /// ```
24399    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
24400    where
24401        T: std::convert::Into<wkt::Timestamp>,
24402    {
24403        self.create_time = v.map(|x| x.into());
24404        self
24405    }
24406
24407    /// Sets the value of [start_time][crate::model::DataScanJob::start_time].
24408    ///
24409    /// # Example
24410    /// ```ignore,no_run
24411    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24412    /// use wkt::Timestamp;
24413    /// let x = DataScanJob::new().set_start_time(Timestamp::default()/* use setters */);
24414    /// ```
24415    pub fn set_start_time<T>(mut self, v: T) -> Self
24416    where
24417        T: std::convert::Into<wkt::Timestamp>,
24418    {
24419        self.start_time = std::option::Option::Some(v.into());
24420        self
24421    }
24422
24423    /// Sets or clears the value of [start_time][crate::model::DataScanJob::start_time].
24424    ///
24425    /// # Example
24426    /// ```ignore,no_run
24427    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24428    /// use wkt::Timestamp;
24429    /// let x = DataScanJob::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
24430    /// let x = DataScanJob::new().set_or_clear_start_time(None::<Timestamp>);
24431    /// ```
24432    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24433    where
24434        T: std::convert::Into<wkt::Timestamp>,
24435    {
24436        self.start_time = v.map(|x| x.into());
24437        self
24438    }
24439
24440    /// Sets the value of [end_time][crate::model::DataScanJob::end_time].
24441    ///
24442    /// # Example
24443    /// ```ignore,no_run
24444    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24445    /// use wkt::Timestamp;
24446    /// let x = DataScanJob::new().set_end_time(Timestamp::default()/* use setters */);
24447    /// ```
24448    pub fn set_end_time<T>(mut self, v: T) -> Self
24449    where
24450        T: std::convert::Into<wkt::Timestamp>,
24451    {
24452        self.end_time = std::option::Option::Some(v.into());
24453        self
24454    }
24455
24456    /// Sets or clears the value of [end_time][crate::model::DataScanJob::end_time].
24457    ///
24458    /// # Example
24459    /// ```ignore,no_run
24460    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24461    /// use wkt::Timestamp;
24462    /// let x = DataScanJob::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
24463    /// let x = DataScanJob::new().set_or_clear_end_time(None::<Timestamp>);
24464    /// ```
24465    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24466    where
24467        T: std::convert::Into<wkt::Timestamp>,
24468    {
24469        self.end_time = v.map(|x| x.into());
24470        self
24471    }
24472
24473    /// Sets the value of [state][crate::model::DataScanJob::state].
24474    ///
24475    /// # Example
24476    /// ```ignore,no_run
24477    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24478    /// use google_cloud_dataplex_v1::model::data_scan_job::State;
24479    /// let x0 = DataScanJob::new().set_state(State::Running);
24480    /// let x1 = DataScanJob::new().set_state(State::Canceling);
24481    /// let x2 = DataScanJob::new().set_state(State::Cancelled);
24482    /// ```
24483    pub fn set_state<T: std::convert::Into<crate::model::data_scan_job::State>>(
24484        mut self,
24485        v: T,
24486    ) -> Self {
24487        self.state = v.into();
24488        self
24489    }
24490
24491    /// Sets the value of [message][crate::model::DataScanJob::message].
24492    ///
24493    /// # Example
24494    /// ```ignore,no_run
24495    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24496    /// let x = DataScanJob::new().set_message("example");
24497    /// ```
24498    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24499        self.message = v.into();
24500        self
24501    }
24502
24503    /// Sets the value of [r#type][crate::model::DataScanJob::type].
24504    ///
24505    /// # Example
24506    /// ```ignore,no_run
24507    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24508    /// use google_cloud_dataplex_v1::model::DataScanType;
24509    /// let x0 = DataScanJob::new().set_type(DataScanType::DataQuality);
24510    /// let x1 = DataScanJob::new().set_type(DataScanType::DataProfile);
24511    /// let x2 = DataScanJob::new().set_type(DataScanType::DataDiscovery);
24512    /// ```
24513    pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
24514        self.r#type = v.into();
24515        self
24516    }
24517
24518    /// Sets the value of [spec][crate::model::DataScanJob::spec].
24519    ///
24520    /// Note that all the setters affecting `spec` are mutually
24521    /// exclusive.
24522    ///
24523    /// # Example
24524    /// ```ignore,no_run
24525    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24526    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
24527    /// let x = DataScanJob::new().set_spec(Some(
24528    ///     google_cloud_dataplex_v1::model::data_scan_job::Spec::DataQualitySpec(DataQualitySpec::default().into())));
24529    /// ```
24530    pub fn set_spec<
24531        T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Spec>>,
24532    >(
24533        mut self,
24534        v: T,
24535    ) -> Self {
24536        self.spec = v.into();
24537        self
24538    }
24539
24540    /// The value of [spec][crate::model::DataScanJob::spec]
24541    /// if it holds a `DataQualitySpec`, `None` if the field is not set or
24542    /// holds a different branch.
24543    pub fn data_quality_spec(
24544        &self,
24545    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
24546        #[allow(unreachable_patterns)]
24547        self.spec.as_ref().and_then(|v| match v {
24548            crate::model::data_scan_job::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
24549            _ => std::option::Option::None,
24550        })
24551    }
24552
24553    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24554    /// to hold a `DataQualitySpec`.
24555    ///
24556    /// Note that all the setters affecting `spec` are
24557    /// mutually exclusive.
24558    ///
24559    /// # Example
24560    /// ```ignore,no_run
24561    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24562    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
24563    /// let x = DataScanJob::new().set_data_quality_spec(DataQualitySpec::default()/* use setters */);
24564    /// assert!(x.data_quality_spec().is_some());
24565    /// assert!(x.data_profile_spec().is_none());
24566    /// assert!(x.data_discovery_spec().is_none());
24567    /// assert!(x.data_documentation_spec().is_none());
24568    /// ```
24569    pub fn set_data_quality_spec<
24570        T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
24571    >(
24572        mut self,
24573        v: T,
24574    ) -> Self {
24575        self.spec =
24576            std::option::Option::Some(crate::model::data_scan_job::Spec::DataQualitySpec(v.into()));
24577        self
24578    }
24579
24580    /// The value of [spec][crate::model::DataScanJob::spec]
24581    /// if it holds a `DataProfileSpec`, `None` if the field is not set or
24582    /// holds a different branch.
24583    pub fn data_profile_spec(
24584        &self,
24585    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
24586        #[allow(unreachable_patterns)]
24587        self.spec.as_ref().and_then(|v| match v {
24588            crate::model::data_scan_job::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
24589            _ => std::option::Option::None,
24590        })
24591    }
24592
24593    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24594    /// to hold a `DataProfileSpec`.
24595    ///
24596    /// Note that all the setters affecting `spec` are
24597    /// mutually exclusive.
24598    ///
24599    /// # Example
24600    /// ```ignore,no_run
24601    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24602    /// use google_cloud_dataplex_v1::model::DataProfileSpec;
24603    /// let x = DataScanJob::new().set_data_profile_spec(DataProfileSpec::default()/* use setters */);
24604    /// assert!(x.data_profile_spec().is_some());
24605    /// assert!(x.data_quality_spec().is_none());
24606    /// assert!(x.data_discovery_spec().is_none());
24607    /// assert!(x.data_documentation_spec().is_none());
24608    /// ```
24609    pub fn set_data_profile_spec<
24610        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
24611    >(
24612        mut self,
24613        v: T,
24614    ) -> Self {
24615        self.spec =
24616            std::option::Option::Some(crate::model::data_scan_job::Spec::DataProfileSpec(v.into()));
24617        self
24618    }
24619
24620    /// The value of [spec][crate::model::DataScanJob::spec]
24621    /// if it holds a `DataDiscoverySpec`, `None` if the field is not set or
24622    /// holds a different branch.
24623    pub fn data_discovery_spec(
24624        &self,
24625    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
24626        #[allow(unreachable_patterns)]
24627        self.spec.as_ref().and_then(|v| match v {
24628            crate::model::data_scan_job::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
24629            _ => std::option::Option::None,
24630        })
24631    }
24632
24633    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24634    /// to hold a `DataDiscoverySpec`.
24635    ///
24636    /// Note that all the setters affecting `spec` are
24637    /// mutually exclusive.
24638    ///
24639    /// # Example
24640    /// ```ignore,no_run
24641    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24642    /// use google_cloud_dataplex_v1::model::DataDiscoverySpec;
24643    /// let x = DataScanJob::new().set_data_discovery_spec(DataDiscoverySpec::default()/* use setters */);
24644    /// assert!(x.data_discovery_spec().is_some());
24645    /// assert!(x.data_quality_spec().is_none());
24646    /// assert!(x.data_profile_spec().is_none());
24647    /// assert!(x.data_documentation_spec().is_none());
24648    /// ```
24649    pub fn set_data_discovery_spec<
24650        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
24651    >(
24652        mut self,
24653        v: T,
24654    ) -> Self {
24655        self.spec = std::option::Option::Some(
24656            crate::model::data_scan_job::Spec::DataDiscoverySpec(v.into()),
24657        );
24658        self
24659    }
24660
24661    /// The value of [spec][crate::model::DataScanJob::spec]
24662    /// if it holds a `DataDocumentationSpec`, `None` if the field is not set or
24663    /// holds a different branch.
24664    pub fn data_documentation_spec(
24665        &self,
24666    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
24667        #[allow(unreachable_patterns)]
24668        self.spec.as_ref().and_then(|v| match v {
24669            crate::model::data_scan_job::Spec::DataDocumentationSpec(v) => {
24670                std::option::Option::Some(v)
24671            }
24672            _ => std::option::Option::None,
24673        })
24674    }
24675
24676    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24677    /// to hold a `DataDocumentationSpec`.
24678    ///
24679    /// Note that all the setters affecting `spec` are
24680    /// mutually exclusive.
24681    ///
24682    /// # Example
24683    /// ```ignore,no_run
24684    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24685    /// use google_cloud_dataplex_v1::model::DataDocumentationSpec;
24686    /// let x = DataScanJob::new().set_data_documentation_spec(DataDocumentationSpec::default()/* use setters */);
24687    /// assert!(x.data_documentation_spec().is_some());
24688    /// assert!(x.data_quality_spec().is_none());
24689    /// assert!(x.data_profile_spec().is_none());
24690    /// assert!(x.data_discovery_spec().is_none());
24691    /// ```
24692    pub fn set_data_documentation_spec<
24693        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
24694    >(
24695        mut self,
24696        v: T,
24697    ) -> Self {
24698        self.spec = std::option::Option::Some(
24699            crate::model::data_scan_job::Spec::DataDocumentationSpec(v.into()),
24700        );
24701        self
24702    }
24703
24704    /// Sets the value of [result][crate::model::DataScanJob::result].
24705    ///
24706    /// Note that all the setters affecting `result` are mutually
24707    /// exclusive.
24708    ///
24709    /// # Example
24710    /// ```ignore,no_run
24711    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24712    /// use google_cloud_dataplex_v1::model::DataQualityResult;
24713    /// let x = DataScanJob::new().set_result(Some(
24714    ///     google_cloud_dataplex_v1::model::data_scan_job::Result::DataQualityResult(DataQualityResult::default().into())));
24715    /// ```
24716    pub fn set_result<
24717        T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Result>>,
24718    >(
24719        mut self,
24720        v: T,
24721    ) -> Self {
24722        self.result = v.into();
24723        self
24724    }
24725
24726    /// The value of [result][crate::model::DataScanJob::result]
24727    /// if it holds a `DataQualityResult`, `None` if the field is not set or
24728    /// holds a different branch.
24729    pub fn data_quality_result(
24730        &self,
24731    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
24732        #[allow(unreachable_patterns)]
24733        self.result.as_ref().and_then(|v| match v {
24734            crate::model::data_scan_job::Result::DataQualityResult(v) => {
24735                std::option::Option::Some(v)
24736            }
24737            _ => std::option::Option::None,
24738        })
24739    }
24740
24741    /// Sets the value of [result][crate::model::DataScanJob::result]
24742    /// to hold a `DataQualityResult`.
24743    ///
24744    /// Note that all the setters affecting `result` are
24745    /// mutually exclusive.
24746    ///
24747    /// # Example
24748    /// ```ignore,no_run
24749    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24750    /// use google_cloud_dataplex_v1::model::DataQualityResult;
24751    /// let x = DataScanJob::new().set_data_quality_result(DataQualityResult::default()/* use setters */);
24752    /// assert!(x.data_quality_result().is_some());
24753    /// assert!(x.data_profile_result().is_none());
24754    /// assert!(x.data_discovery_result().is_none());
24755    /// assert!(x.data_documentation_result().is_none());
24756    /// ```
24757    pub fn set_data_quality_result<
24758        T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
24759    >(
24760        mut self,
24761        v: T,
24762    ) -> Self {
24763        self.result = std::option::Option::Some(
24764            crate::model::data_scan_job::Result::DataQualityResult(v.into()),
24765        );
24766        self
24767    }
24768
24769    /// The value of [result][crate::model::DataScanJob::result]
24770    /// if it holds a `DataProfileResult`, `None` if the field is not set or
24771    /// holds a different branch.
24772    pub fn data_profile_result(
24773        &self,
24774    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
24775        #[allow(unreachable_patterns)]
24776        self.result.as_ref().and_then(|v| match v {
24777            crate::model::data_scan_job::Result::DataProfileResult(v) => {
24778                std::option::Option::Some(v)
24779            }
24780            _ => std::option::Option::None,
24781        })
24782    }
24783
24784    /// Sets the value of [result][crate::model::DataScanJob::result]
24785    /// to hold a `DataProfileResult`.
24786    ///
24787    /// Note that all the setters affecting `result` are
24788    /// mutually exclusive.
24789    ///
24790    /// # Example
24791    /// ```ignore,no_run
24792    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24793    /// use google_cloud_dataplex_v1::model::DataProfileResult;
24794    /// let x = DataScanJob::new().set_data_profile_result(DataProfileResult::default()/* use setters */);
24795    /// assert!(x.data_profile_result().is_some());
24796    /// assert!(x.data_quality_result().is_none());
24797    /// assert!(x.data_discovery_result().is_none());
24798    /// assert!(x.data_documentation_result().is_none());
24799    /// ```
24800    pub fn set_data_profile_result<
24801        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
24802    >(
24803        mut self,
24804        v: T,
24805    ) -> Self {
24806        self.result = std::option::Option::Some(
24807            crate::model::data_scan_job::Result::DataProfileResult(v.into()),
24808        );
24809        self
24810    }
24811
24812    /// The value of [result][crate::model::DataScanJob::result]
24813    /// if it holds a `DataDiscoveryResult`, `None` if the field is not set or
24814    /// holds a different branch.
24815    pub fn data_discovery_result(
24816        &self,
24817    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
24818        #[allow(unreachable_patterns)]
24819        self.result.as_ref().and_then(|v| match v {
24820            crate::model::data_scan_job::Result::DataDiscoveryResult(v) => {
24821                std::option::Option::Some(v)
24822            }
24823            _ => std::option::Option::None,
24824        })
24825    }
24826
24827    /// Sets the value of [result][crate::model::DataScanJob::result]
24828    /// to hold a `DataDiscoveryResult`.
24829    ///
24830    /// Note that all the setters affecting `result` are
24831    /// mutually exclusive.
24832    ///
24833    /// # Example
24834    /// ```ignore,no_run
24835    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24836    /// use google_cloud_dataplex_v1::model::DataDiscoveryResult;
24837    /// let x = DataScanJob::new().set_data_discovery_result(DataDiscoveryResult::default()/* use setters */);
24838    /// assert!(x.data_discovery_result().is_some());
24839    /// assert!(x.data_quality_result().is_none());
24840    /// assert!(x.data_profile_result().is_none());
24841    /// assert!(x.data_documentation_result().is_none());
24842    /// ```
24843    pub fn set_data_discovery_result<
24844        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
24845    >(
24846        mut self,
24847        v: T,
24848    ) -> Self {
24849        self.result = std::option::Option::Some(
24850            crate::model::data_scan_job::Result::DataDiscoveryResult(v.into()),
24851        );
24852        self
24853    }
24854
24855    /// The value of [result][crate::model::DataScanJob::result]
24856    /// if it holds a `DataDocumentationResult`, `None` if the field is not set or
24857    /// holds a different branch.
24858    pub fn data_documentation_result(
24859        &self,
24860    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
24861        #[allow(unreachable_patterns)]
24862        self.result.as_ref().and_then(|v| match v {
24863            crate::model::data_scan_job::Result::DataDocumentationResult(v) => {
24864                std::option::Option::Some(v)
24865            }
24866            _ => std::option::Option::None,
24867        })
24868    }
24869
24870    /// Sets the value of [result][crate::model::DataScanJob::result]
24871    /// to hold a `DataDocumentationResult`.
24872    ///
24873    /// Note that all the setters affecting `result` are
24874    /// mutually exclusive.
24875    ///
24876    /// # Example
24877    /// ```ignore,no_run
24878    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24879    /// use google_cloud_dataplex_v1::model::DataDocumentationResult;
24880    /// let x = DataScanJob::new().set_data_documentation_result(DataDocumentationResult::default()/* use setters */);
24881    /// assert!(x.data_documentation_result().is_some());
24882    /// assert!(x.data_quality_result().is_none());
24883    /// assert!(x.data_profile_result().is_none());
24884    /// assert!(x.data_discovery_result().is_none());
24885    /// ```
24886    pub fn set_data_documentation_result<
24887        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
24888    >(
24889        mut self,
24890        v: T,
24891    ) -> Self {
24892        self.result = std::option::Option::Some(
24893            crate::model::data_scan_job::Result::DataDocumentationResult(v.into()),
24894        );
24895        self
24896    }
24897}
24898
24899impl wkt::message::Message for DataScanJob {
24900    fn typename() -> &'static str {
24901        "type.googleapis.com/google.cloud.dataplex.v1.DataScanJob"
24902    }
24903}
24904
24905/// Defines additional types related to [DataScanJob].
24906pub mod data_scan_job {
24907    #[allow(unused_imports)]
24908    use super::*;
24909
24910    /// Execution state for the DataScanJob.
24911    ///
24912    /// # Working with unknown values
24913    ///
24914    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24915    /// additional enum variants at any time. Adding new variants is not considered
24916    /// a breaking change. Applications should write their code in anticipation of:
24917    ///
24918    /// - New values appearing in future releases of the client library, **and**
24919    /// - New values received dynamically, without application changes.
24920    ///
24921    /// Please consult the [Working with enums] section in the user guide for some
24922    /// guidelines.
24923    ///
24924    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24925    #[derive(Clone, Debug, PartialEq)]
24926    #[non_exhaustive]
24927    pub enum State {
24928        /// The DataScanJob state is unspecified.
24929        Unspecified,
24930        /// The DataScanJob is running.
24931        Running,
24932        /// The DataScanJob is canceling.
24933        Canceling,
24934        /// The DataScanJob cancellation was successful.
24935        Cancelled,
24936        /// The DataScanJob completed successfully.
24937        Succeeded,
24938        /// The DataScanJob is no longer running due to an error.
24939        Failed,
24940        /// The DataScanJob has been created but not started to run yet.
24941        Pending,
24942        /// If set, the enum was initialized with an unknown value.
24943        ///
24944        /// Applications can examine the value using [State::value] or
24945        /// [State::name].
24946        UnknownValue(state::UnknownValue),
24947    }
24948
24949    #[doc(hidden)]
24950    pub mod state {
24951        #[allow(unused_imports)]
24952        use super::*;
24953        #[derive(Clone, Debug, PartialEq)]
24954        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24955    }
24956
24957    impl State {
24958        /// Gets the enum value.
24959        ///
24960        /// Returns `None` if the enum contains an unknown value deserialized from
24961        /// the string representation of enums.
24962        pub fn value(&self) -> std::option::Option<i32> {
24963            match self {
24964                Self::Unspecified => std::option::Option::Some(0),
24965                Self::Running => std::option::Option::Some(1),
24966                Self::Canceling => std::option::Option::Some(2),
24967                Self::Cancelled => std::option::Option::Some(3),
24968                Self::Succeeded => std::option::Option::Some(4),
24969                Self::Failed => std::option::Option::Some(5),
24970                Self::Pending => std::option::Option::Some(7),
24971                Self::UnknownValue(u) => u.0.value(),
24972            }
24973        }
24974
24975        /// Gets the enum value as a string.
24976        ///
24977        /// Returns `None` if the enum contains an unknown value deserialized from
24978        /// the integer representation of enums.
24979        pub fn name(&self) -> std::option::Option<&str> {
24980            match self {
24981                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
24982                Self::Running => std::option::Option::Some("RUNNING"),
24983                Self::Canceling => std::option::Option::Some("CANCELING"),
24984                Self::Cancelled => std::option::Option::Some("CANCELLED"),
24985                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
24986                Self::Failed => std::option::Option::Some("FAILED"),
24987                Self::Pending => std::option::Option::Some("PENDING"),
24988                Self::UnknownValue(u) => u.0.name(),
24989            }
24990        }
24991    }
24992
24993    impl std::default::Default for State {
24994        fn default() -> Self {
24995            use std::convert::From;
24996            Self::from(0)
24997        }
24998    }
24999
25000    impl std::fmt::Display for State {
25001        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25002            wkt::internal::display_enum(f, self.name(), self.value())
25003        }
25004    }
25005
25006    impl std::convert::From<i32> for State {
25007        fn from(value: i32) -> Self {
25008            match value {
25009                0 => Self::Unspecified,
25010                1 => Self::Running,
25011                2 => Self::Canceling,
25012                3 => Self::Cancelled,
25013                4 => Self::Succeeded,
25014                5 => Self::Failed,
25015                7 => Self::Pending,
25016                _ => Self::UnknownValue(state::UnknownValue(
25017                    wkt::internal::UnknownEnumValue::Integer(value),
25018                )),
25019            }
25020        }
25021    }
25022
25023    impl std::convert::From<&str> for State {
25024        fn from(value: &str) -> Self {
25025            use std::string::ToString;
25026            match value {
25027                "STATE_UNSPECIFIED" => Self::Unspecified,
25028                "RUNNING" => Self::Running,
25029                "CANCELING" => Self::Canceling,
25030                "CANCELLED" => Self::Cancelled,
25031                "SUCCEEDED" => Self::Succeeded,
25032                "FAILED" => Self::Failed,
25033                "PENDING" => Self::Pending,
25034                _ => Self::UnknownValue(state::UnknownValue(
25035                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25036                )),
25037            }
25038        }
25039    }
25040
25041    impl serde::ser::Serialize for State {
25042        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25043        where
25044            S: serde::Serializer,
25045        {
25046            match self {
25047                Self::Unspecified => serializer.serialize_i32(0),
25048                Self::Running => serializer.serialize_i32(1),
25049                Self::Canceling => serializer.serialize_i32(2),
25050                Self::Cancelled => serializer.serialize_i32(3),
25051                Self::Succeeded => serializer.serialize_i32(4),
25052                Self::Failed => serializer.serialize_i32(5),
25053                Self::Pending => serializer.serialize_i32(7),
25054                Self::UnknownValue(u) => u.0.serialize(serializer),
25055            }
25056        }
25057    }
25058
25059    impl<'de> serde::de::Deserialize<'de> for State {
25060        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25061        where
25062            D: serde::Deserializer<'de>,
25063        {
25064            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
25065                ".google.cloud.dataplex.v1.DataScanJob.State",
25066            ))
25067        }
25068    }
25069
25070    /// Data scan related setting.
25071    #[derive(Clone, Debug, PartialEq)]
25072    #[non_exhaustive]
25073    pub enum Spec {
25074        /// Output only. Settings for a data quality scan.
25075        DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
25076        /// Output only. Settings for a data profile scan.
25077        DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
25078        /// Output only. Settings for a data discovery scan.
25079        DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
25080        /// Output only. Settings for a data documentation scan.
25081        DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
25082    }
25083
25084    /// The result of the data scan.
25085    #[derive(Clone, Debug, PartialEq)]
25086    #[non_exhaustive]
25087    pub enum Result {
25088        /// Output only. The result of a data quality scan.
25089        DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
25090        /// Output only. The result of a data profile scan.
25091        DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
25092        /// Output only. The result of a data discovery scan.
25093        DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
25094        /// Output only. The result of a data documentation scan.
25095        DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
25096    }
25097}
25098
25099/// The status of publishing the data scan result as Dataplex Universal Catalog
25100/// metadata.
25101#[derive(Clone, Default, PartialEq)]
25102#[non_exhaustive]
25103pub struct DataScanCatalogPublishingStatus {
25104    /// Output only. Execution state for catalog publishing.
25105    pub state: crate::model::data_scan_catalog_publishing_status::State,
25106
25107    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25108}
25109
25110impl DataScanCatalogPublishingStatus {
25111    pub fn new() -> Self {
25112        std::default::Default::default()
25113    }
25114
25115    /// Sets the value of [state][crate::model::DataScanCatalogPublishingStatus::state].
25116    ///
25117    /// # Example
25118    /// ```ignore,no_run
25119    /// # use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
25120    /// use google_cloud_dataplex_v1::model::data_scan_catalog_publishing_status::State;
25121    /// let x0 = DataScanCatalogPublishingStatus::new().set_state(State::Succeeded);
25122    /// let x1 = DataScanCatalogPublishingStatus::new().set_state(State::Failed);
25123    /// ```
25124    pub fn set_state<
25125        T: std::convert::Into<crate::model::data_scan_catalog_publishing_status::State>,
25126    >(
25127        mut self,
25128        v: T,
25129    ) -> Self {
25130        self.state = v.into();
25131        self
25132    }
25133}
25134
25135impl wkt::message::Message for DataScanCatalogPublishingStatus {
25136    fn typename() -> &'static str {
25137        "type.googleapis.com/google.cloud.dataplex.v1.DataScanCatalogPublishingStatus"
25138    }
25139}
25140
25141/// Defines additional types related to [DataScanCatalogPublishingStatus].
25142pub mod data_scan_catalog_publishing_status {
25143    #[allow(unused_imports)]
25144    use super::*;
25145
25146    /// Execution state for the publishing.
25147    ///
25148    /// # Working with unknown values
25149    ///
25150    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25151    /// additional enum variants at any time. Adding new variants is not considered
25152    /// a breaking change. Applications should write their code in anticipation of:
25153    ///
25154    /// - New values appearing in future releases of the client library, **and**
25155    /// - New values received dynamically, without application changes.
25156    ///
25157    /// Please consult the [Working with enums] section in the user guide for some
25158    /// guidelines.
25159    ///
25160    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25161    #[derive(Clone, Debug, PartialEq)]
25162    #[non_exhaustive]
25163    pub enum State {
25164        /// The publishing state is unspecified.
25165        Unspecified,
25166        /// Publish to catalog completed successfully.
25167        Succeeded,
25168        /// Publish to catalog failed.
25169        Failed,
25170        /// If set, the enum was initialized with an unknown value.
25171        ///
25172        /// Applications can examine the value using [State::value] or
25173        /// [State::name].
25174        UnknownValue(state::UnknownValue),
25175    }
25176
25177    #[doc(hidden)]
25178    pub mod state {
25179        #[allow(unused_imports)]
25180        use super::*;
25181        #[derive(Clone, Debug, PartialEq)]
25182        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25183    }
25184
25185    impl State {
25186        /// Gets the enum value.
25187        ///
25188        /// Returns `None` if the enum contains an unknown value deserialized from
25189        /// the string representation of enums.
25190        pub fn value(&self) -> std::option::Option<i32> {
25191            match self {
25192                Self::Unspecified => std::option::Option::Some(0),
25193                Self::Succeeded => std::option::Option::Some(1),
25194                Self::Failed => std::option::Option::Some(2),
25195                Self::UnknownValue(u) => u.0.value(),
25196            }
25197        }
25198
25199        /// Gets the enum value as a string.
25200        ///
25201        /// Returns `None` if the enum contains an unknown value deserialized from
25202        /// the integer representation of enums.
25203        pub fn name(&self) -> std::option::Option<&str> {
25204            match self {
25205                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
25206                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
25207                Self::Failed => std::option::Option::Some("FAILED"),
25208                Self::UnknownValue(u) => u.0.name(),
25209            }
25210        }
25211    }
25212
25213    impl std::default::Default for State {
25214        fn default() -> Self {
25215            use std::convert::From;
25216            Self::from(0)
25217        }
25218    }
25219
25220    impl std::fmt::Display for State {
25221        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25222            wkt::internal::display_enum(f, self.name(), self.value())
25223        }
25224    }
25225
25226    impl std::convert::From<i32> for State {
25227        fn from(value: i32) -> Self {
25228            match value {
25229                0 => Self::Unspecified,
25230                1 => Self::Succeeded,
25231                2 => Self::Failed,
25232                _ => Self::UnknownValue(state::UnknownValue(
25233                    wkt::internal::UnknownEnumValue::Integer(value),
25234                )),
25235            }
25236        }
25237    }
25238
25239    impl std::convert::From<&str> for State {
25240        fn from(value: &str) -> Self {
25241            use std::string::ToString;
25242            match value {
25243                "STATE_UNSPECIFIED" => Self::Unspecified,
25244                "SUCCEEDED" => Self::Succeeded,
25245                "FAILED" => Self::Failed,
25246                _ => Self::UnknownValue(state::UnknownValue(
25247                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25248                )),
25249            }
25250        }
25251    }
25252
25253    impl serde::ser::Serialize for State {
25254        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25255        where
25256            S: serde::Serializer,
25257        {
25258            match self {
25259                Self::Unspecified => serializer.serialize_i32(0),
25260                Self::Succeeded => serializer.serialize_i32(1),
25261                Self::Failed => serializer.serialize_i32(2),
25262                Self::UnknownValue(u) => u.0.serialize(serializer),
25263            }
25264        }
25265    }
25266
25267    impl<'de> serde::de::Deserialize<'de> for State {
25268        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25269        where
25270            D: serde::Deserializer<'de>,
25271        {
25272            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
25273                ".google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.State",
25274            ))
25275        }
25276    }
25277}
25278
25279/// The payload associated with Discovery data processing.
25280#[derive(Clone, Default, PartialEq)]
25281#[non_exhaustive]
25282pub struct DiscoveryEvent {
25283    /// The log message.
25284    pub message: std::string::String,
25285
25286    /// The id of the associated lake.
25287    pub lake_id: std::string::String,
25288
25289    /// The id of the associated zone.
25290    pub zone_id: std::string::String,
25291
25292    /// The id of the associated asset.
25293    pub asset_id: std::string::String,
25294
25295    /// The data location associated with the event.
25296    pub data_location: std::string::String,
25297
25298    /// The id of the associated datascan for standalone discovery.
25299    pub datascan_id: std::string::String,
25300
25301    /// The type of the event being logged.
25302    pub r#type: crate::model::discovery_event::EventType,
25303
25304    /// Additional details about the event.
25305    pub details: std::option::Option<crate::model::discovery_event::Details>,
25306
25307    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25308}
25309
25310impl DiscoveryEvent {
25311    pub fn new() -> Self {
25312        std::default::Default::default()
25313    }
25314
25315    /// Sets the value of [message][crate::model::DiscoveryEvent::message].
25316    ///
25317    /// # Example
25318    /// ```ignore,no_run
25319    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25320    /// let x = DiscoveryEvent::new().set_message("example");
25321    /// ```
25322    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25323        self.message = v.into();
25324        self
25325    }
25326
25327    /// Sets the value of [lake_id][crate::model::DiscoveryEvent::lake_id].
25328    ///
25329    /// # Example
25330    /// ```ignore,no_run
25331    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25332    /// let x = DiscoveryEvent::new().set_lake_id("example");
25333    /// ```
25334    pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25335        self.lake_id = v.into();
25336        self
25337    }
25338
25339    /// Sets the value of [zone_id][crate::model::DiscoveryEvent::zone_id].
25340    ///
25341    /// # Example
25342    /// ```ignore,no_run
25343    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25344    /// let x = DiscoveryEvent::new().set_zone_id("example");
25345    /// ```
25346    pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25347        self.zone_id = v.into();
25348        self
25349    }
25350
25351    /// Sets the value of [asset_id][crate::model::DiscoveryEvent::asset_id].
25352    ///
25353    /// # Example
25354    /// ```ignore,no_run
25355    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25356    /// let x = DiscoveryEvent::new().set_asset_id("example");
25357    /// ```
25358    pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25359        self.asset_id = v.into();
25360        self
25361    }
25362
25363    /// Sets the value of [data_location][crate::model::DiscoveryEvent::data_location].
25364    ///
25365    /// # Example
25366    /// ```ignore,no_run
25367    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25368    /// let x = DiscoveryEvent::new().set_data_location("example");
25369    /// ```
25370    pub fn set_data_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25371        self.data_location = v.into();
25372        self
25373    }
25374
25375    /// Sets the value of [datascan_id][crate::model::DiscoveryEvent::datascan_id].
25376    ///
25377    /// # Example
25378    /// ```ignore,no_run
25379    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25380    /// let x = DiscoveryEvent::new().set_datascan_id("example");
25381    /// ```
25382    pub fn set_datascan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25383        self.datascan_id = v.into();
25384        self
25385    }
25386
25387    /// Sets the value of [r#type][crate::model::DiscoveryEvent::type].
25388    ///
25389    /// # Example
25390    /// ```ignore,no_run
25391    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25392    /// use google_cloud_dataplex_v1::model::discovery_event::EventType;
25393    /// let x0 = DiscoveryEvent::new().set_type(EventType::Config);
25394    /// let x1 = DiscoveryEvent::new().set_type(EventType::EntityCreated);
25395    /// let x2 = DiscoveryEvent::new().set_type(EventType::EntityUpdated);
25396    /// ```
25397    pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EventType>>(
25398        mut self,
25399        v: T,
25400    ) -> Self {
25401        self.r#type = v.into();
25402        self
25403    }
25404
25405    /// Sets the value of [details][crate::model::DiscoveryEvent::details].
25406    ///
25407    /// Note that all the setters affecting `details` are mutually
25408    /// exclusive.
25409    ///
25410    /// # Example
25411    /// ```ignore,no_run
25412    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25413    /// use google_cloud_dataplex_v1::model::discovery_event::ConfigDetails;
25414    /// let x = DiscoveryEvent::new().set_details(Some(
25415    ///     google_cloud_dataplex_v1::model::discovery_event::Details::Config(ConfigDetails::default().into())));
25416    /// ```
25417    pub fn set_details<
25418        T: std::convert::Into<std::option::Option<crate::model::discovery_event::Details>>,
25419    >(
25420        mut self,
25421        v: T,
25422    ) -> Self {
25423        self.details = v.into();
25424        self
25425    }
25426
25427    /// The value of [details][crate::model::DiscoveryEvent::details]
25428    /// if it holds a `Config`, `None` if the field is not set or
25429    /// holds a different branch.
25430    pub fn config(
25431        &self,
25432    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ConfigDetails>> {
25433        #[allow(unreachable_patterns)]
25434        self.details.as_ref().and_then(|v| match v {
25435            crate::model::discovery_event::Details::Config(v) => std::option::Option::Some(v),
25436            _ => std::option::Option::None,
25437        })
25438    }
25439
25440    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25441    /// to hold a `Config`.
25442    ///
25443    /// Note that all the setters affecting `details` are
25444    /// mutually exclusive.
25445    ///
25446    /// # Example
25447    /// ```ignore,no_run
25448    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25449    /// use google_cloud_dataplex_v1::model::discovery_event::ConfigDetails;
25450    /// let x = DiscoveryEvent::new().set_config(ConfigDetails::default()/* use setters */);
25451    /// assert!(x.config().is_some());
25452    /// assert!(x.entity().is_none());
25453    /// assert!(x.partition().is_none());
25454    /// assert!(x.action().is_none());
25455    /// assert!(x.table().is_none());
25456    /// ```
25457    pub fn set_config<
25458        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ConfigDetails>>,
25459    >(
25460        mut self,
25461        v: T,
25462    ) -> Self {
25463        self.details =
25464            std::option::Option::Some(crate::model::discovery_event::Details::Config(v.into()));
25465        self
25466    }
25467
25468    /// The value of [details][crate::model::DiscoveryEvent::details]
25469    /// if it holds a `Entity`, `None` if the field is not set or
25470    /// holds a different branch.
25471    pub fn entity(
25472        &self,
25473    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::EntityDetails>> {
25474        #[allow(unreachable_patterns)]
25475        self.details.as_ref().and_then(|v| match v {
25476            crate::model::discovery_event::Details::Entity(v) => std::option::Option::Some(v),
25477            _ => std::option::Option::None,
25478        })
25479    }
25480
25481    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25482    /// to hold a `Entity`.
25483    ///
25484    /// Note that all the setters affecting `details` are
25485    /// mutually exclusive.
25486    ///
25487    /// # Example
25488    /// ```ignore,no_run
25489    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25490    /// use google_cloud_dataplex_v1::model::discovery_event::EntityDetails;
25491    /// let x = DiscoveryEvent::new().set_entity(EntityDetails::default()/* use setters */);
25492    /// assert!(x.entity().is_some());
25493    /// assert!(x.config().is_none());
25494    /// assert!(x.partition().is_none());
25495    /// assert!(x.action().is_none());
25496    /// assert!(x.table().is_none());
25497    /// ```
25498    pub fn set_entity<
25499        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::EntityDetails>>,
25500    >(
25501        mut self,
25502        v: T,
25503    ) -> Self {
25504        self.details =
25505            std::option::Option::Some(crate::model::discovery_event::Details::Entity(v.into()));
25506        self
25507    }
25508
25509    /// The value of [details][crate::model::DiscoveryEvent::details]
25510    /// if it holds a `Partition`, `None` if the field is not set or
25511    /// holds a different branch.
25512    pub fn partition(
25513        &self,
25514    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::PartitionDetails>>
25515    {
25516        #[allow(unreachable_patterns)]
25517        self.details.as_ref().and_then(|v| match v {
25518            crate::model::discovery_event::Details::Partition(v) => std::option::Option::Some(v),
25519            _ => std::option::Option::None,
25520        })
25521    }
25522
25523    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25524    /// to hold a `Partition`.
25525    ///
25526    /// Note that all the setters affecting `details` are
25527    /// mutually exclusive.
25528    ///
25529    /// # Example
25530    /// ```ignore,no_run
25531    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25532    /// use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25533    /// let x = DiscoveryEvent::new().set_partition(PartitionDetails::default()/* use setters */);
25534    /// assert!(x.partition().is_some());
25535    /// assert!(x.config().is_none());
25536    /// assert!(x.entity().is_none());
25537    /// assert!(x.action().is_none());
25538    /// assert!(x.table().is_none());
25539    /// ```
25540    pub fn set_partition<
25541        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::PartitionDetails>>,
25542    >(
25543        mut self,
25544        v: T,
25545    ) -> Self {
25546        self.details =
25547            std::option::Option::Some(crate::model::discovery_event::Details::Partition(v.into()));
25548        self
25549    }
25550
25551    /// The value of [details][crate::model::DiscoveryEvent::details]
25552    /// if it holds a `Action`, `None` if the field is not set or
25553    /// holds a different branch.
25554    pub fn action(
25555        &self,
25556    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ActionDetails>> {
25557        #[allow(unreachable_patterns)]
25558        self.details.as_ref().and_then(|v| match v {
25559            crate::model::discovery_event::Details::Action(v) => std::option::Option::Some(v),
25560            _ => std::option::Option::None,
25561        })
25562    }
25563
25564    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25565    /// to hold a `Action`.
25566    ///
25567    /// Note that all the setters affecting `details` are
25568    /// mutually exclusive.
25569    ///
25570    /// # Example
25571    /// ```ignore,no_run
25572    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25573    /// use google_cloud_dataplex_v1::model::discovery_event::ActionDetails;
25574    /// let x = DiscoveryEvent::new().set_action(ActionDetails::default()/* use setters */);
25575    /// assert!(x.action().is_some());
25576    /// assert!(x.config().is_none());
25577    /// assert!(x.entity().is_none());
25578    /// assert!(x.partition().is_none());
25579    /// assert!(x.table().is_none());
25580    /// ```
25581    pub fn set_action<
25582        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ActionDetails>>,
25583    >(
25584        mut self,
25585        v: T,
25586    ) -> Self {
25587        self.details =
25588            std::option::Option::Some(crate::model::discovery_event::Details::Action(v.into()));
25589        self
25590    }
25591
25592    /// The value of [details][crate::model::DiscoveryEvent::details]
25593    /// if it holds a `Table`, `None` if the field is not set or
25594    /// holds a different branch.
25595    pub fn table(
25596        &self,
25597    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::TableDetails>> {
25598        #[allow(unreachable_patterns)]
25599        self.details.as_ref().and_then(|v| match v {
25600            crate::model::discovery_event::Details::Table(v) => std::option::Option::Some(v),
25601            _ => std::option::Option::None,
25602        })
25603    }
25604
25605    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25606    /// to hold a `Table`.
25607    ///
25608    /// Note that all the setters affecting `details` are
25609    /// mutually exclusive.
25610    ///
25611    /// # Example
25612    /// ```ignore,no_run
25613    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25614    /// use google_cloud_dataplex_v1::model::discovery_event::TableDetails;
25615    /// let x = DiscoveryEvent::new().set_table(TableDetails::default()/* use setters */);
25616    /// assert!(x.table().is_some());
25617    /// assert!(x.config().is_none());
25618    /// assert!(x.entity().is_none());
25619    /// assert!(x.partition().is_none());
25620    /// assert!(x.action().is_none());
25621    /// ```
25622    pub fn set_table<
25623        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::TableDetails>>,
25624    >(
25625        mut self,
25626        v: T,
25627    ) -> Self {
25628        self.details =
25629            std::option::Option::Some(crate::model::discovery_event::Details::Table(v.into()));
25630        self
25631    }
25632}
25633
25634impl wkt::message::Message for DiscoveryEvent {
25635    fn typename() -> &'static str {
25636        "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent"
25637    }
25638}
25639
25640/// Defines additional types related to [DiscoveryEvent].
25641pub mod discovery_event {
25642    #[allow(unused_imports)]
25643    use super::*;
25644
25645    /// Details about configuration events.
25646    #[derive(Clone, Default, PartialEq)]
25647    #[non_exhaustive]
25648    pub struct ConfigDetails {
25649        /// A list of discovery configuration parameters in effect.
25650        /// The keys are the field paths within DiscoverySpec.
25651        /// Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference,
25652        /// etc.
25653        pub parameters: std::collections::HashMap<std::string::String, std::string::String>,
25654
25655        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25656    }
25657
25658    impl ConfigDetails {
25659        pub fn new() -> Self {
25660            std::default::Default::default()
25661        }
25662
25663        /// Sets the value of [parameters][crate::model::discovery_event::ConfigDetails::parameters].
25664        ///
25665        /// # Example
25666        /// ```ignore,no_run
25667        /// # use google_cloud_dataplex_v1::model::discovery_event::ConfigDetails;
25668        /// let x = ConfigDetails::new().set_parameters([
25669        ///     ("key0", "abc"),
25670        ///     ("key1", "xyz"),
25671        /// ]);
25672        /// ```
25673        pub fn set_parameters<T, K, V>(mut self, v: T) -> Self
25674        where
25675            T: std::iter::IntoIterator<Item = (K, V)>,
25676            K: std::convert::Into<std::string::String>,
25677            V: std::convert::Into<std::string::String>,
25678        {
25679            use std::iter::Iterator;
25680            self.parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
25681            self
25682        }
25683    }
25684
25685    impl wkt::message::Message for ConfigDetails {
25686        fn typename() -> &'static str {
25687            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"
25688        }
25689    }
25690
25691    /// Details about the entity.
25692    #[derive(Clone, Default, PartialEq)]
25693    #[non_exhaustive]
25694    pub struct EntityDetails {
25695        /// The name of the entity resource.
25696        /// The name is the fully-qualified resource name.
25697        pub entity: std::string::String,
25698
25699        /// The type of the entity resource.
25700        pub r#type: crate::model::discovery_event::EntityType,
25701
25702        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25703    }
25704
25705    impl EntityDetails {
25706        pub fn new() -> Self {
25707            std::default::Default::default()
25708        }
25709
25710        /// Sets the value of [entity][crate::model::discovery_event::EntityDetails::entity].
25711        ///
25712        /// # Example
25713        /// ```ignore,no_run
25714        /// # use google_cloud_dataplex_v1::model::discovery_event::EntityDetails;
25715        /// let x = EntityDetails::new().set_entity("example");
25716        /// ```
25717        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25718            self.entity = v.into();
25719            self
25720        }
25721
25722        /// Sets the value of [r#type][crate::model::discovery_event::EntityDetails::type].
25723        ///
25724        /// # Example
25725        /// ```ignore,no_run
25726        /// # use google_cloud_dataplex_v1::model::discovery_event::EntityDetails;
25727        /// use google_cloud_dataplex_v1::model::discovery_event::EntityType;
25728        /// let x0 = EntityDetails::new().set_type(EntityType::Table);
25729        /// let x1 = EntityDetails::new().set_type(EntityType::Fileset);
25730        /// ```
25731        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
25732            mut self,
25733            v: T,
25734        ) -> Self {
25735            self.r#type = v.into();
25736            self
25737        }
25738    }
25739
25740    impl wkt::message::Message for EntityDetails {
25741        fn typename() -> &'static str {
25742            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"
25743        }
25744    }
25745
25746    /// Details about the published table.
25747    #[derive(Clone, Default, PartialEq)]
25748    #[non_exhaustive]
25749    pub struct TableDetails {
25750        /// The fully-qualified resource name of the table resource.
25751        pub table: std::string::String,
25752
25753        /// The type of the table resource.
25754        pub r#type: crate::model::discovery_event::TableType,
25755
25756        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25757    }
25758
25759    impl TableDetails {
25760        pub fn new() -> Self {
25761            std::default::Default::default()
25762        }
25763
25764        /// Sets the value of [table][crate::model::discovery_event::TableDetails::table].
25765        ///
25766        /// # Example
25767        /// ```ignore,no_run
25768        /// # use google_cloud_dataplex_v1::model::discovery_event::TableDetails;
25769        /// let x = TableDetails::new().set_table("example");
25770        /// ```
25771        pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25772            self.table = v.into();
25773            self
25774        }
25775
25776        /// Sets the value of [r#type][crate::model::discovery_event::TableDetails::type].
25777        ///
25778        /// # Example
25779        /// ```ignore,no_run
25780        /// # use google_cloud_dataplex_v1::model::discovery_event::TableDetails;
25781        /// use google_cloud_dataplex_v1::model::discovery_event::TableType;
25782        /// let x0 = TableDetails::new().set_type(TableType::ExternalTable);
25783        /// let x1 = TableDetails::new().set_type(TableType::BiglakeTable);
25784        /// let x2 = TableDetails::new().set_type(TableType::ObjectTable);
25785        /// ```
25786        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::TableType>>(
25787            mut self,
25788            v: T,
25789        ) -> Self {
25790            self.r#type = v.into();
25791            self
25792        }
25793    }
25794
25795    impl wkt::message::Message for TableDetails {
25796        fn typename() -> &'static str {
25797            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.TableDetails"
25798        }
25799    }
25800
25801    /// Details about the partition.
25802    #[derive(Clone, Default, PartialEq)]
25803    #[non_exhaustive]
25804    pub struct PartitionDetails {
25805        /// The name to the partition resource.
25806        /// The name is the fully-qualified resource name.
25807        pub partition: std::string::String,
25808
25809        /// The name to the containing entity resource.
25810        /// The name is the fully-qualified resource name.
25811        pub entity: std::string::String,
25812
25813        /// The type of the containing entity resource.
25814        pub r#type: crate::model::discovery_event::EntityType,
25815
25816        /// The locations of the data items (e.g., a Cloud Storage objects) sampled
25817        /// for metadata inference.
25818        pub sampled_data_locations: std::vec::Vec<std::string::String>,
25819
25820        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25821    }
25822
25823    impl PartitionDetails {
25824        pub fn new() -> Self {
25825            std::default::Default::default()
25826        }
25827
25828        /// Sets the value of [partition][crate::model::discovery_event::PartitionDetails::partition].
25829        ///
25830        /// # Example
25831        /// ```ignore,no_run
25832        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25833        /// let x = PartitionDetails::new().set_partition("example");
25834        /// ```
25835        pub fn set_partition<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25836            self.partition = v.into();
25837            self
25838        }
25839
25840        /// Sets the value of [entity][crate::model::discovery_event::PartitionDetails::entity].
25841        ///
25842        /// # Example
25843        /// ```ignore,no_run
25844        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25845        /// let x = PartitionDetails::new().set_entity("example");
25846        /// ```
25847        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25848            self.entity = v.into();
25849            self
25850        }
25851
25852        /// Sets the value of [r#type][crate::model::discovery_event::PartitionDetails::type].
25853        ///
25854        /// # Example
25855        /// ```ignore,no_run
25856        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25857        /// use google_cloud_dataplex_v1::model::discovery_event::EntityType;
25858        /// let x0 = PartitionDetails::new().set_type(EntityType::Table);
25859        /// let x1 = PartitionDetails::new().set_type(EntityType::Fileset);
25860        /// ```
25861        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
25862            mut self,
25863            v: T,
25864        ) -> Self {
25865            self.r#type = v.into();
25866            self
25867        }
25868
25869        /// Sets the value of [sampled_data_locations][crate::model::discovery_event::PartitionDetails::sampled_data_locations].
25870        ///
25871        /// # Example
25872        /// ```ignore,no_run
25873        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25874        /// let x = PartitionDetails::new().set_sampled_data_locations(["a", "b", "c"]);
25875        /// ```
25876        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
25877        where
25878            T: std::iter::IntoIterator<Item = V>,
25879            V: std::convert::Into<std::string::String>,
25880        {
25881            use std::iter::Iterator;
25882            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
25883            self
25884        }
25885    }
25886
25887    impl wkt::message::Message for PartitionDetails {
25888        fn typename() -> &'static str {
25889            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"
25890        }
25891    }
25892
25893    /// Details about the action.
25894    #[derive(Clone, Default, PartialEq)]
25895    #[non_exhaustive]
25896    pub struct ActionDetails {
25897        /// The type of action.
25898        /// Eg. IncompatibleDataSchema, InvalidDataFormat
25899        pub r#type: std::string::String,
25900
25901        /// The human readable issue associated with the action.
25902        pub issue: std::string::String,
25903
25904        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25905    }
25906
25907    impl ActionDetails {
25908        pub fn new() -> Self {
25909            std::default::Default::default()
25910        }
25911
25912        /// Sets the value of [r#type][crate::model::discovery_event::ActionDetails::type].
25913        ///
25914        /// # Example
25915        /// ```ignore,no_run
25916        /// # use google_cloud_dataplex_v1::model::discovery_event::ActionDetails;
25917        /// let x = ActionDetails::new().set_type("example");
25918        /// ```
25919        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25920            self.r#type = v.into();
25921            self
25922        }
25923
25924        /// Sets the value of [issue][crate::model::discovery_event::ActionDetails::issue].
25925        ///
25926        /// # Example
25927        /// ```ignore,no_run
25928        /// # use google_cloud_dataplex_v1::model::discovery_event::ActionDetails;
25929        /// let x = ActionDetails::new().set_issue("example");
25930        /// ```
25931        pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25932            self.issue = v.into();
25933            self
25934        }
25935    }
25936
25937    impl wkt::message::Message for ActionDetails {
25938        fn typename() -> &'static str {
25939            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"
25940        }
25941    }
25942
25943    /// The type of the event.
25944    ///
25945    /// # Working with unknown values
25946    ///
25947    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25948    /// additional enum variants at any time. Adding new variants is not considered
25949    /// a breaking change. Applications should write their code in anticipation of:
25950    ///
25951    /// - New values appearing in future releases of the client library, **and**
25952    /// - New values received dynamically, without application changes.
25953    ///
25954    /// Please consult the [Working with enums] section in the user guide for some
25955    /// guidelines.
25956    ///
25957    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25958    #[derive(Clone, Debug, PartialEq)]
25959    #[non_exhaustive]
25960    pub enum EventType {
25961        /// An unspecified event type.
25962        Unspecified,
25963        /// An event representing discovery configuration in effect.
25964        Config,
25965        /// An event representing a metadata entity being created.
25966        EntityCreated,
25967        /// An event representing a metadata entity being updated.
25968        EntityUpdated,
25969        /// An event representing a metadata entity being deleted.
25970        EntityDeleted,
25971        /// An event representing a partition being created.
25972        PartitionCreated,
25973        /// An event representing a partition being updated.
25974        PartitionUpdated,
25975        /// An event representing a partition being deleted.
25976        PartitionDeleted,
25977        /// An event representing a table being published.
25978        TablePublished,
25979        /// An event representing a table being updated.
25980        TableUpdated,
25981        /// An event representing a table being skipped in publishing.
25982        TableIgnored,
25983        /// An event representing a table being deleted.
25984        TableDeleted,
25985        /// If set, the enum was initialized with an unknown value.
25986        ///
25987        /// Applications can examine the value using [EventType::value] or
25988        /// [EventType::name].
25989        UnknownValue(event_type::UnknownValue),
25990    }
25991
25992    #[doc(hidden)]
25993    pub mod event_type {
25994        #[allow(unused_imports)]
25995        use super::*;
25996        #[derive(Clone, Debug, PartialEq)]
25997        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25998    }
25999
26000    impl EventType {
26001        /// Gets the enum value.
26002        ///
26003        /// Returns `None` if the enum contains an unknown value deserialized from
26004        /// the string representation of enums.
26005        pub fn value(&self) -> std::option::Option<i32> {
26006            match self {
26007                Self::Unspecified => std::option::Option::Some(0),
26008                Self::Config => std::option::Option::Some(1),
26009                Self::EntityCreated => std::option::Option::Some(2),
26010                Self::EntityUpdated => std::option::Option::Some(3),
26011                Self::EntityDeleted => std::option::Option::Some(4),
26012                Self::PartitionCreated => std::option::Option::Some(5),
26013                Self::PartitionUpdated => std::option::Option::Some(6),
26014                Self::PartitionDeleted => std::option::Option::Some(7),
26015                Self::TablePublished => std::option::Option::Some(10),
26016                Self::TableUpdated => std::option::Option::Some(11),
26017                Self::TableIgnored => std::option::Option::Some(12),
26018                Self::TableDeleted => std::option::Option::Some(13),
26019                Self::UnknownValue(u) => u.0.value(),
26020            }
26021        }
26022
26023        /// Gets the enum value as a string.
26024        ///
26025        /// Returns `None` if the enum contains an unknown value deserialized from
26026        /// the integer representation of enums.
26027        pub fn name(&self) -> std::option::Option<&str> {
26028            match self {
26029                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
26030                Self::Config => std::option::Option::Some("CONFIG"),
26031                Self::EntityCreated => std::option::Option::Some("ENTITY_CREATED"),
26032                Self::EntityUpdated => std::option::Option::Some("ENTITY_UPDATED"),
26033                Self::EntityDeleted => std::option::Option::Some("ENTITY_DELETED"),
26034                Self::PartitionCreated => std::option::Option::Some("PARTITION_CREATED"),
26035                Self::PartitionUpdated => std::option::Option::Some("PARTITION_UPDATED"),
26036                Self::PartitionDeleted => std::option::Option::Some("PARTITION_DELETED"),
26037                Self::TablePublished => std::option::Option::Some("TABLE_PUBLISHED"),
26038                Self::TableUpdated => std::option::Option::Some("TABLE_UPDATED"),
26039                Self::TableIgnored => std::option::Option::Some("TABLE_IGNORED"),
26040                Self::TableDeleted => std::option::Option::Some("TABLE_DELETED"),
26041                Self::UnknownValue(u) => u.0.name(),
26042            }
26043        }
26044    }
26045
26046    impl std::default::Default for EventType {
26047        fn default() -> Self {
26048            use std::convert::From;
26049            Self::from(0)
26050        }
26051    }
26052
26053    impl std::fmt::Display for EventType {
26054        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26055            wkt::internal::display_enum(f, self.name(), self.value())
26056        }
26057    }
26058
26059    impl std::convert::From<i32> for EventType {
26060        fn from(value: i32) -> Self {
26061            match value {
26062                0 => Self::Unspecified,
26063                1 => Self::Config,
26064                2 => Self::EntityCreated,
26065                3 => Self::EntityUpdated,
26066                4 => Self::EntityDeleted,
26067                5 => Self::PartitionCreated,
26068                6 => Self::PartitionUpdated,
26069                7 => Self::PartitionDeleted,
26070                10 => Self::TablePublished,
26071                11 => Self::TableUpdated,
26072                12 => Self::TableIgnored,
26073                13 => Self::TableDeleted,
26074                _ => Self::UnknownValue(event_type::UnknownValue(
26075                    wkt::internal::UnknownEnumValue::Integer(value),
26076                )),
26077            }
26078        }
26079    }
26080
26081    impl std::convert::From<&str> for EventType {
26082        fn from(value: &str) -> Self {
26083            use std::string::ToString;
26084            match value {
26085                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
26086                "CONFIG" => Self::Config,
26087                "ENTITY_CREATED" => Self::EntityCreated,
26088                "ENTITY_UPDATED" => Self::EntityUpdated,
26089                "ENTITY_DELETED" => Self::EntityDeleted,
26090                "PARTITION_CREATED" => Self::PartitionCreated,
26091                "PARTITION_UPDATED" => Self::PartitionUpdated,
26092                "PARTITION_DELETED" => Self::PartitionDeleted,
26093                "TABLE_PUBLISHED" => Self::TablePublished,
26094                "TABLE_UPDATED" => Self::TableUpdated,
26095                "TABLE_IGNORED" => Self::TableIgnored,
26096                "TABLE_DELETED" => Self::TableDeleted,
26097                _ => Self::UnknownValue(event_type::UnknownValue(
26098                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26099                )),
26100            }
26101        }
26102    }
26103
26104    impl serde::ser::Serialize for EventType {
26105        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26106        where
26107            S: serde::Serializer,
26108        {
26109            match self {
26110                Self::Unspecified => serializer.serialize_i32(0),
26111                Self::Config => serializer.serialize_i32(1),
26112                Self::EntityCreated => serializer.serialize_i32(2),
26113                Self::EntityUpdated => serializer.serialize_i32(3),
26114                Self::EntityDeleted => serializer.serialize_i32(4),
26115                Self::PartitionCreated => serializer.serialize_i32(5),
26116                Self::PartitionUpdated => serializer.serialize_i32(6),
26117                Self::PartitionDeleted => serializer.serialize_i32(7),
26118                Self::TablePublished => serializer.serialize_i32(10),
26119                Self::TableUpdated => serializer.serialize_i32(11),
26120                Self::TableIgnored => serializer.serialize_i32(12),
26121                Self::TableDeleted => serializer.serialize_i32(13),
26122                Self::UnknownValue(u) => u.0.serialize(serializer),
26123            }
26124        }
26125    }
26126
26127    impl<'de> serde::de::Deserialize<'de> for EventType {
26128        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26129        where
26130            D: serde::Deserializer<'de>,
26131        {
26132            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
26133                ".google.cloud.dataplex.v1.DiscoveryEvent.EventType",
26134            ))
26135        }
26136    }
26137
26138    /// The type of the entity.
26139    ///
26140    /// # Working with unknown values
26141    ///
26142    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26143    /// additional enum variants at any time. Adding new variants is not considered
26144    /// a breaking change. Applications should write their code in anticipation of:
26145    ///
26146    /// - New values appearing in future releases of the client library, **and**
26147    /// - New values received dynamically, without application changes.
26148    ///
26149    /// Please consult the [Working with enums] section in the user guide for some
26150    /// guidelines.
26151    ///
26152    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26153    #[derive(Clone, Debug, PartialEq)]
26154    #[non_exhaustive]
26155    pub enum EntityType {
26156        /// An unspecified event type.
26157        Unspecified,
26158        /// Entities representing structured data.
26159        Table,
26160        /// Entities representing unstructured data.
26161        Fileset,
26162        /// If set, the enum was initialized with an unknown value.
26163        ///
26164        /// Applications can examine the value using [EntityType::value] or
26165        /// [EntityType::name].
26166        UnknownValue(entity_type::UnknownValue),
26167    }
26168
26169    #[doc(hidden)]
26170    pub mod entity_type {
26171        #[allow(unused_imports)]
26172        use super::*;
26173        #[derive(Clone, Debug, PartialEq)]
26174        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26175    }
26176
26177    impl EntityType {
26178        /// Gets the enum value.
26179        ///
26180        /// Returns `None` if the enum contains an unknown value deserialized from
26181        /// the string representation of enums.
26182        pub fn value(&self) -> std::option::Option<i32> {
26183            match self {
26184                Self::Unspecified => std::option::Option::Some(0),
26185                Self::Table => std::option::Option::Some(1),
26186                Self::Fileset => std::option::Option::Some(2),
26187                Self::UnknownValue(u) => u.0.value(),
26188            }
26189        }
26190
26191        /// Gets the enum value as a string.
26192        ///
26193        /// Returns `None` if the enum contains an unknown value deserialized from
26194        /// the integer representation of enums.
26195        pub fn name(&self) -> std::option::Option<&str> {
26196            match self {
26197                Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
26198                Self::Table => std::option::Option::Some("TABLE"),
26199                Self::Fileset => std::option::Option::Some("FILESET"),
26200                Self::UnknownValue(u) => u.0.name(),
26201            }
26202        }
26203    }
26204
26205    impl std::default::Default for EntityType {
26206        fn default() -> Self {
26207            use std::convert::From;
26208            Self::from(0)
26209        }
26210    }
26211
26212    impl std::fmt::Display for EntityType {
26213        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26214            wkt::internal::display_enum(f, self.name(), self.value())
26215        }
26216    }
26217
26218    impl std::convert::From<i32> for EntityType {
26219        fn from(value: i32) -> Self {
26220            match value {
26221                0 => Self::Unspecified,
26222                1 => Self::Table,
26223                2 => Self::Fileset,
26224                _ => Self::UnknownValue(entity_type::UnknownValue(
26225                    wkt::internal::UnknownEnumValue::Integer(value),
26226                )),
26227            }
26228        }
26229    }
26230
26231    impl std::convert::From<&str> for EntityType {
26232        fn from(value: &str) -> Self {
26233            use std::string::ToString;
26234            match value {
26235                "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
26236                "TABLE" => Self::Table,
26237                "FILESET" => Self::Fileset,
26238                _ => Self::UnknownValue(entity_type::UnknownValue(
26239                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26240                )),
26241            }
26242        }
26243    }
26244
26245    impl serde::ser::Serialize for EntityType {
26246        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26247        where
26248            S: serde::Serializer,
26249        {
26250            match self {
26251                Self::Unspecified => serializer.serialize_i32(0),
26252                Self::Table => serializer.serialize_i32(1),
26253                Self::Fileset => serializer.serialize_i32(2),
26254                Self::UnknownValue(u) => u.0.serialize(serializer),
26255            }
26256        }
26257    }
26258
26259    impl<'de> serde::de::Deserialize<'de> for EntityType {
26260        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26261        where
26262            D: serde::Deserializer<'de>,
26263        {
26264            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
26265                ".google.cloud.dataplex.v1.DiscoveryEvent.EntityType",
26266            ))
26267        }
26268    }
26269
26270    /// The type of the published table.
26271    ///
26272    /// # Working with unknown values
26273    ///
26274    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26275    /// additional enum variants at any time. Adding new variants is not considered
26276    /// a breaking change. Applications should write their code in anticipation of:
26277    ///
26278    /// - New values appearing in future releases of the client library, **and**
26279    /// - New values received dynamically, without application changes.
26280    ///
26281    /// Please consult the [Working with enums] section in the user guide for some
26282    /// guidelines.
26283    ///
26284    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26285    #[derive(Clone, Debug, PartialEq)]
26286    #[non_exhaustive]
26287    pub enum TableType {
26288        /// An unspecified table type.
26289        Unspecified,
26290        /// External table type.
26291        ExternalTable,
26292        /// BigLake table type.
26293        BiglakeTable,
26294        /// Object table type for unstructured data.
26295        ObjectTable,
26296        /// If set, the enum was initialized with an unknown value.
26297        ///
26298        /// Applications can examine the value using [TableType::value] or
26299        /// [TableType::name].
26300        UnknownValue(table_type::UnknownValue),
26301    }
26302
26303    #[doc(hidden)]
26304    pub mod table_type {
26305        #[allow(unused_imports)]
26306        use super::*;
26307        #[derive(Clone, Debug, PartialEq)]
26308        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26309    }
26310
26311    impl TableType {
26312        /// Gets the enum value.
26313        ///
26314        /// Returns `None` if the enum contains an unknown value deserialized from
26315        /// the string representation of enums.
26316        pub fn value(&self) -> std::option::Option<i32> {
26317            match self {
26318                Self::Unspecified => std::option::Option::Some(0),
26319                Self::ExternalTable => std::option::Option::Some(1),
26320                Self::BiglakeTable => std::option::Option::Some(2),
26321                Self::ObjectTable => std::option::Option::Some(3),
26322                Self::UnknownValue(u) => u.0.value(),
26323            }
26324        }
26325
26326        /// Gets the enum value as a string.
26327        ///
26328        /// Returns `None` if the enum contains an unknown value deserialized from
26329        /// the integer representation of enums.
26330        pub fn name(&self) -> std::option::Option<&str> {
26331            match self {
26332                Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
26333                Self::ExternalTable => std::option::Option::Some("EXTERNAL_TABLE"),
26334                Self::BiglakeTable => std::option::Option::Some("BIGLAKE_TABLE"),
26335                Self::ObjectTable => std::option::Option::Some("OBJECT_TABLE"),
26336                Self::UnknownValue(u) => u.0.name(),
26337            }
26338        }
26339    }
26340
26341    impl std::default::Default for TableType {
26342        fn default() -> Self {
26343            use std::convert::From;
26344            Self::from(0)
26345        }
26346    }
26347
26348    impl std::fmt::Display for TableType {
26349        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26350            wkt::internal::display_enum(f, self.name(), self.value())
26351        }
26352    }
26353
26354    impl std::convert::From<i32> for TableType {
26355        fn from(value: i32) -> Self {
26356            match value {
26357                0 => Self::Unspecified,
26358                1 => Self::ExternalTable,
26359                2 => Self::BiglakeTable,
26360                3 => Self::ObjectTable,
26361                _ => Self::UnknownValue(table_type::UnknownValue(
26362                    wkt::internal::UnknownEnumValue::Integer(value),
26363                )),
26364            }
26365        }
26366    }
26367
26368    impl std::convert::From<&str> for TableType {
26369        fn from(value: &str) -> Self {
26370            use std::string::ToString;
26371            match value {
26372                "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
26373                "EXTERNAL_TABLE" => Self::ExternalTable,
26374                "BIGLAKE_TABLE" => Self::BiglakeTable,
26375                "OBJECT_TABLE" => Self::ObjectTable,
26376                _ => Self::UnknownValue(table_type::UnknownValue(
26377                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26378                )),
26379            }
26380        }
26381    }
26382
26383    impl serde::ser::Serialize for TableType {
26384        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26385        where
26386            S: serde::Serializer,
26387        {
26388            match self {
26389                Self::Unspecified => serializer.serialize_i32(0),
26390                Self::ExternalTable => serializer.serialize_i32(1),
26391                Self::BiglakeTable => serializer.serialize_i32(2),
26392                Self::ObjectTable => serializer.serialize_i32(3),
26393                Self::UnknownValue(u) => u.0.serialize(serializer),
26394            }
26395        }
26396    }
26397
26398    impl<'de> serde::de::Deserialize<'de> for TableType {
26399        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26400        where
26401            D: serde::Deserializer<'de>,
26402        {
26403            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
26404                ".google.cloud.dataplex.v1.DiscoveryEvent.TableType",
26405            ))
26406        }
26407    }
26408
26409    /// Additional details about the event.
26410    #[derive(Clone, Debug, PartialEq)]
26411    #[non_exhaustive]
26412    pub enum Details {
26413        /// Details about discovery configuration in effect.
26414        Config(std::boxed::Box<crate::model::discovery_event::ConfigDetails>),
26415        /// Details about the entity associated with the event.
26416        Entity(std::boxed::Box<crate::model::discovery_event::EntityDetails>),
26417        /// Details about the partition associated with the event.
26418        Partition(std::boxed::Box<crate::model::discovery_event::PartitionDetails>),
26419        /// Details about the action associated with the event.
26420        Action(std::boxed::Box<crate::model::discovery_event::ActionDetails>),
26421        /// Details about the BigQuery table publishing associated with the event.
26422        Table(std::boxed::Box<crate::model::discovery_event::TableDetails>),
26423    }
26424}
26425
26426/// The payload associated with Job logs that contains events describing jobs
26427/// that have run within a Lake.
26428#[derive(Clone, Default, PartialEq)]
26429#[non_exhaustive]
26430pub struct JobEvent {
26431    /// The log message.
26432    pub message: std::string::String,
26433
26434    /// The unique id identifying the job.
26435    pub job_id: std::string::String,
26436
26437    /// The time when the job started running.
26438    pub start_time: std::option::Option<wkt::Timestamp>,
26439
26440    /// The time when the job ended running.
26441    pub end_time: std::option::Option<wkt::Timestamp>,
26442
26443    /// The job state on completion.
26444    pub state: crate::model::job_event::State,
26445
26446    /// The number of retries.
26447    pub retries: i32,
26448
26449    /// The type of the job.
26450    pub r#type: crate::model::job_event::Type,
26451
26452    /// The service used to execute the job.
26453    pub service: crate::model::job_event::Service,
26454
26455    /// The reference to the job within the service.
26456    pub service_job: std::string::String,
26457
26458    /// Job execution trigger.
26459    pub execution_trigger: crate::model::job_event::ExecutionTrigger,
26460
26461    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26462}
26463
26464impl JobEvent {
26465    pub fn new() -> Self {
26466        std::default::Default::default()
26467    }
26468
26469    /// Sets the value of [message][crate::model::JobEvent::message].
26470    ///
26471    /// # Example
26472    /// ```ignore,no_run
26473    /// # use google_cloud_dataplex_v1::model::JobEvent;
26474    /// let x = JobEvent::new().set_message("example");
26475    /// ```
26476    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26477        self.message = v.into();
26478        self
26479    }
26480
26481    /// Sets the value of [job_id][crate::model::JobEvent::job_id].
26482    ///
26483    /// # Example
26484    /// ```ignore,no_run
26485    /// # use google_cloud_dataplex_v1::model::JobEvent;
26486    /// let x = JobEvent::new().set_job_id("example");
26487    /// ```
26488    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26489        self.job_id = v.into();
26490        self
26491    }
26492
26493    /// Sets the value of [start_time][crate::model::JobEvent::start_time].
26494    ///
26495    /// # Example
26496    /// ```ignore,no_run
26497    /// # use google_cloud_dataplex_v1::model::JobEvent;
26498    /// use wkt::Timestamp;
26499    /// let x = JobEvent::new().set_start_time(Timestamp::default()/* use setters */);
26500    /// ```
26501    pub fn set_start_time<T>(mut self, v: T) -> Self
26502    where
26503        T: std::convert::Into<wkt::Timestamp>,
26504    {
26505        self.start_time = std::option::Option::Some(v.into());
26506        self
26507    }
26508
26509    /// Sets or clears the value of [start_time][crate::model::JobEvent::start_time].
26510    ///
26511    /// # Example
26512    /// ```ignore,no_run
26513    /// # use google_cloud_dataplex_v1::model::JobEvent;
26514    /// use wkt::Timestamp;
26515    /// let x = JobEvent::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
26516    /// let x = JobEvent::new().set_or_clear_start_time(None::<Timestamp>);
26517    /// ```
26518    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
26519    where
26520        T: std::convert::Into<wkt::Timestamp>,
26521    {
26522        self.start_time = v.map(|x| x.into());
26523        self
26524    }
26525
26526    /// Sets the value of [end_time][crate::model::JobEvent::end_time].
26527    ///
26528    /// # Example
26529    /// ```ignore,no_run
26530    /// # use google_cloud_dataplex_v1::model::JobEvent;
26531    /// use wkt::Timestamp;
26532    /// let x = JobEvent::new().set_end_time(Timestamp::default()/* use setters */);
26533    /// ```
26534    pub fn set_end_time<T>(mut self, v: T) -> Self
26535    where
26536        T: std::convert::Into<wkt::Timestamp>,
26537    {
26538        self.end_time = std::option::Option::Some(v.into());
26539        self
26540    }
26541
26542    /// Sets or clears the value of [end_time][crate::model::JobEvent::end_time].
26543    ///
26544    /// # Example
26545    /// ```ignore,no_run
26546    /// # use google_cloud_dataplex_v1::model::JobEvent;
26547    /// use wkt::Timestamp;
26548    /// let x = JobEvent::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
26549    /// let x = JobEvent::new().set_or_clear_end_time(None::<Timestamp>);
26550    /// ```
26551    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
26552    where
26553        T: std::convert::Into<wkt::Timestamp>,
26554    {
26555        self.end_time = v.map(|x| x.into());
26556        self
26557    }
26558
26559    /// Sets the value of [state][crate::model::JobEvent::state].
26560    ///
26561    /// # Example
26562    /// ```ignore,no_run
26563    /// # use google_cloud_dataplex_v1::model::JobEvent;
26564    /// use google_cloud_dataplex_v1::model::job_event::State;
26565    /// let x0 = JobEvent::new().set_state(State::Succeeded);
26566    /// let x1 = JobEvent::new().set_state(State::Failed);
26567    /// let x2 = JobEvent::new().set_state(State::Cancelled);
26568    /// ```
26569    pub fn set_state<T: std::convert::Into<crate::model::job_event::State>>(
26570        mut self,
26571        v: T,
26572    ) -> Self {
26573        self.state = v.into();
26574        self
26575    }
26576
26577    /// Sets the value of [retries][crate::model::JobEvent::retries].
26578    ///
26579    /// # Example
26580    /// ```ignore,no_run
26581    /// # use google_cloud_dataplex_v1::model::JobEvent;
26582    /// let x = JobEvent::new().set_retries(42);
26583    /// ```
26584    pub fn set_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
26585        self.retries = v.into();
26586        self
26587    }
26588
26589    /// Sets the value of [r#type][crate::model::JobEvent::type].
26590    ///
26591    /// # Example
26592    /// ```ignore,no_run
26593    /// # use google_cloud_dataplex_v1::model::JobEvent;
26594    /// use google_cloud_dataplex_v1::model::job_event::Type;
26595    /// let x0 = JobEvent::new().set_type(Type::Spark);
26596    /// let x1 = JobEvent::new().set_type(Type::Notebook);
26597    /// ```
26598    pub fn set_type<T: std::convert::Into<crate::model::job_event::Type>>(mut self, v: T) -> Self {
26599        self.r#type = v.into();
26600        self
26601    }
26602
26603    /// Sets the value of [service][crate::model::JobEvent::service].
26604    ///
26605    /// # Example
26606    /// ```ignore,no_run
26607    /// # use google_cloud_dataplex_v1::model::JobEvent;
26608    /// use google_cloud_dataplex_v1::model::job_event::Service;
26609    /// let x0 = JobEvent::new().set_service(Service::Dataproc);
26610    /// ```
26611    pub fn set_service<T: std::convert::Into<crate::model::job_event::Service>>(
26612        mut self,
26613        v: T,
26614    ) -> Self {
26615        self.service = v.into();
26616        self
26617    }
26618
26619    /// Sets the value of [service_job][crate::model::JobEvent::service_job].
26620    ///
26621    /// # Example
26622    /// ```ignore,no_run
26623    /// # use google_cloud_dataplex_v1::model::JobEvent;
26624    /// let x = JobEvent::new().set_service_job("example");
26625    /// ```
26626    pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26627        self.service_job = v.into();
26628        self
26629    }
26630
26631    /// Sets the value of [execution_trigger][crate::model::JobEvent::execution_trigger].
26632    ///
26633    /// # Example
26634    /// ```ignore,no_run
26635    /// # use google_cloud_dataplex_v1::model::JobEvent;
26636    /// use google_cloud_dataplex_v1::model::job_event::ExecutionTrigger;
26637    /// let x0 = JobEvent::new().set_execution_trigger(ExecutionTrigger::TaskConfig);
26638    /// let x1 = JobEvent::new().set_execution_trigger(ExecutionTrigger::RunRequest);
26639    /// ```
26640    pub fn set_execution_trigger<
26641        T: std::convert::Into<crate::model::job_event::ExecutionTrigger>,
26642    >(
26643        mut self,
26644        v: T,
26645    ) -> Self {
26646        self.execution_trigger = v.into();
26647        self
26648    }
26649}
26650
26651impl wkt::message::Message for JobEvent {
26652    fn typename() -> &'static str {
26653        "type.googleapis.com/google.cloud.dataplex.v1.JobEvent"
26654    }
26655}
26656
26657/// Defines additional types related to [JobEvent].
26658pub mod job_event {
26659    #[allow(unused_imports)]
26660    use super::*;
26661
26662    /// The type of the job.
26663    ///
26664    /// # Working with unknown values
26665    ///
26666    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26667    /// additional enum variants at any time. Adding new variants is not considered
26668    /// a breaking change. Applications should write their code in anticipation of:
26669    ///
26670    /// - New values appearing in future releases of the client library, **and**
26671    /// - New values received dynamically, without application changes.
26672    ///
26673    /// Please consult the [Working with enums] section in the user guide for some
26674    /// guidelines.
26675    ///
26676    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26677    #[derive(Clone, Debug, PartialEq)]
26678    #[non_exhaustive]
26679    pub enum Type {
26680        /// Unspecified job type.
26681        Unspecified,
26682        /// Spark jobs.
26683        Spark,
26684        /// Notebook jobs.
26685        Notebook,
26686        /// If set, the enum was initialized with an unknown value.
26687        ///
26688        /// Applications can examine the value using [Type::value] or
26689        /// [Type::name].
26690        UnknownValue(r#type::UnknownValue),
26691    }
26692
26693    #[doc(hidden)]
26694    pub mod r#type {
26695        #[allow(unused_imports)]
26696        use super::*;
26697        #[derive(Clone, Debug, PartialEq)]
26698        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26699    }
26700
26701    impl Type {
26702        /// Gets the enum value.
26703        ///
26704        /// Returns `None` if the enum contains an unknown value deserialized from
26705        /// the string representation of enums.
26706        pub fn value(&self) -> std::option::Option<i32> {
26707            match self {
26708                Self::Unspecified => std::option::Option::Some(0),
26709                Self::Spark => std::option::Option::Some(1),
26710                Self::Notebook => std::option::Option::Some(2),
26711                Self::UnknownValue(u) => u.0.value(),
26712            }
26713        }
26714
26715        /// Gets the enum value as a string.
26716        ///
26717        /// Returns `None` if the enum contains an unknown value deserialized from
26718        /// the integer representation of enums.
26719        pub fn name(&self) -> std::option::Option<&str> {
26720            match self {
26721                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
26722                Self::Spark => std::option::Option::Some("SPARK"),
26723                Self::Notebook => std::option::Option::Some("NOTEBOOK"),
26724                Self::UnknownValue(u) => u.0.name(),
26725            }
26726        }
26727    }
26728
26729    impl std::default::Default for Type {
26730        fn default() -> Self {
26731            use std::convert::From;
26732            Self::from(0)
26733        }
26734    }
26735
26736    impl std::fmt::Display for Type {
26737        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26738            wkt::internal::display_enum(f, self.name(), self.value())
26739        }
26740    }
26741
26742    impl std::convert::From<i32> for Type {
26743        fn from(value: i32) -> Self {
26744            match value {
26745                0 => Self::Unspecified,
26746                1 => Self::Spark,
26747                2 => Self::Notebook,
26748                _ => Self::UnknownValue(r#type::UnknownValue(
26749                    wkt::internal::UnknownEnumValue::Integer(value),
26750                )),
26751            }
26752        }
26753    }
26754
26755    impl std::convert::From<&str> for Type {
26756        fn from(value: &str) -> Self {
26757            use std::string::ToString;
26758            match value {
26759                "TYPE_UNSPECIFIED" => Self::Unspecified,
26760                "SPARK" => Self::Spark,
26761                "NOTEBOOK" => Self::Notebook,
26762                _ => Self::UnknownValue(r#type::UnknownValue(
26763                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26764                )),
26765            }
26766        }
26767    }
26768
26769    impl serde::ser::Serialize for Type {
26770        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26771        where
26772            S: serde::Serializer,
26773        {
26774            match self {
26775                Self::Unspecified => serializer.serialize_i32(0),
26776                Self::Spark => serializer.serialize_i32(1),
26777                Self::Notebook => serializer.serialize_i32(2),
26778                Self::UnknownValue(u) => u.0.serialize(serializer),
26779            }
26780        }
26781    }
26782
26783    impl<'de> serde::de::Deserialize<'de> for Type {
26784        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26785        where
26786            D: serde::Deserializer<'de>,
26787        {
26788            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
26789                ".google.cloud.dataplex.v1.JobEvent.Type",
26790            ))
26791        }
26792    }
26793
26794    /// The completion status of the job.
26795    ///
26796    /// # Working with unknown values
26797    ///
26798    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26799    /// additional enum variants at any time. Adding new variants is not considered
26800    /// a breaking change. Applications should write their code in anticipation of:
26801    ///
26802    /// - New values appearing in future releases of the client library, **and**
26803    /// - New values received dynamically, without application changes.
26804    ///
26805    /// Please consult the [Working with enums] section in the user guide for some
26806    /// guidelines.
26807    ///
26808    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26809    #[derive(Clone, Debug, PartialEq)]
26810    #[non_exhaustive]
26811    pub enum State {
26812        /// Unspecified job state.
26813        Unspecified,
26814        /// Job successfully completed.
26815        Succeeded,
26816        /// Job was unsuccessful.
26817        Failed,
26818        /// Job was cancelled by the user.
26819        Cancelled,
26820        /// Job was cancelled or aborted via the service executing the job.
26821        Aborted,
26822        /// If set, the enum was initialized with an unknown value.
26823        ///
26824        /// Applications can examine the value using [State::value] or
26825        /// [State::name].
26826        UnknownValue(state::UnknownValue),
26827    }
26828
26829    #[doc(hidden)]
26830    pub mod state {
26831        #[allow(unused_imports)]
26832        use super::*;
26833        #[derive(Clone, Debug, PartialEq)]
26834        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26835    }
26836
26837    impl State {
26838        /// Gets the enum value.
26839        ///
26840        /// Returns `None` if the enum contains an unknown value deserialized from
26841        /// the string representation of enums.
26842        pub fn value(&self) -> std::option::Option<i32> {
26843            match self {
26844                Self::Unspecified => std::option::Option::Some(0),
26845                Self::Succeeded => std::option::Option::Some(1),
26846                Self::Failed => std::option::Option::Some(2),
26847                Self::Cancelled => std::option::Option::Some(3),
26848                Self::Aborted => std::option::Option::Some(4),
26849                Self::UnknownValue(u) => u.0.value(),
26850            }
26851        }
26852
26853        /// Gets the enum value as a string.
26854        ///
26855        /// Returns `None` if the enum contains an unknown value deserialized from
26856        /// the integer representation of enums.
26857        pub fn name(&self) -> std::option::Option<&str> {
26858            match self {
26859                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
26860                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
26861                Self::Failed => std::option::Option::Some("FAILED"),
26862                Self::Cancelled => std::option::Option::Some("CANCELLED"),
26863                Self::Aborted => std::option::Option::Some("ABORTED"),
26864                Self::UnknownValue(u) => u.0.name(),
26865            }
26866        }
26867    }
26868
26869    impl std::default::Default for State {
26870        fn default() -> Self {
26871            use std::convert::From;
26872            Self::from(0)
26873        }
26874    }
26875
26876    impl std::fmt::Display for State {
26877        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26878            wkt::internal::display_enum(f, self.name(), self.value())
26879        }
26880    }
26881
26882    impl std::convert::From<i32> for State {
26883        fn from(value: i32) -> Self {
26884            match value {
26885                0 => Self::Unspecified,
26886                1 => Self::Succeeded,
26887                2 => Self::Failed,
26888                3 => Self::Cancelled,
26889                4 => Self::Aborted,
26890                _ => Self::UnknownValue(state::UnknownValue(
26891                    wkt::internal::UnknownEnumValue::Integer(value),
26892                )),
26893            }
26894        }
26895    }
26896
26897    impl std::convert::From<&str> for State {
26898        fn from(value: &str) -> Self {
26899            use std::string::ToString;
26900            match value {
26901                "STATE_UNSPECIFIED" => Self::Unspecified,
26902                "SUCCEEDED" => Self::Succeeded,
26903                "FAILED" => Self::Failed,
26904                "CANCELLED" => Self::Cancelled,
26905                "ABORTED" => Self::Aborted,
26906                _ => Self::UnknownValue(state::UnknownValue(
26907                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26908                )),
26909            }
26910        }
26911    }
26912
26913    impl serde::ser::Serialize for State {
26914        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26915        where
26916            S: serde::Serializer,
26917        {
26918            match self {
26919                Self::Unspecified => serializer.serialize_i32(0),
26920                Self::Succeeded => serializer.serialize_i32(1),
26921                Self::Failed => serializer.serialize_i32(2),
26922                Self::Cancelled => serializer.serialize_i32(3),
26923                Self::Aborted => serializer.serialize_i32(4),
26924                Self::UnknownValue(u) => u.0.serialize(serializer),
26925            }
26926        }
26927    }
26928
26929    impl<'de> serde::de::Deserialize<'de> for State {
26930        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26931        where
26932            D: serde::Deserializer<'de>,
26933        {
26934            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
26935                ".google.cloud.dataplex.v1.JobEvent.State",
26936            ))
26937        }
26938    }
26939
26940    /// The service used to execute the job.
26941    ///
26942    /// # Working with unknown values
26943    ///
26944    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26945    /// additional enum variants at any time. Adding new variants is not considered
26946    /// a breaking change. Applications should write their code in anticipation of:
26947    ///
26948    /// - New values appearing in future releases of the client library, **and**
26949    /// - New values received dynamically, without application changes.
26950    ///
26951    /// Please consult the [Working with enums] section in the user guide for some
26952    /// guidelines.
26953    ///
26954    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26955    #[derive(Clone, Debug, PartialEq)]
26956    #[non_exhaustive]
26957    pub enum Service {
26958        /// Unspecified service.
26959        Unspecified,
26960        /// Cloud Dataproc.
26961        Dataproc,
26962        /// If set, the enum was initialized with an unknown value.
26963        ///
26964        /// Applications can examine the value using [Service::value] or
26965        /// [Service::name].
26966        UnknownValue(service::UnknownValue),
26967    }
26968
26969    #[doc(hidden)]
26970    pub mod service {
26971        #[allow(unused_imports)]
26972        use super::*;
26973        #[derive(Clone, Debug, PartialEq)]
26974        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26975    }
26976
26977    impl Service {
26978        /// Gets the enum value.
26979        ///
26980        /// Returns `None` if the enum contains an unknown value deserialized from
26981        /// the string representation of enums.
26982        pub fn value(&self) -> std::option::Option<i32> {
26983            match self {
26984                Self::Unspecified => std::option::Option::Some(0),
26985                Self::Dataproc => std::option::Option::Some(1),
26986                Self::UnknownValue(u) => u.0.value(),
26987            }
26988        }
26989
26990        /// Gets the enum value as a string.
26991        ///
26992        /// Returns `None` if the enum contains an unknown value deserialized from
26993        /// the integer representation of enums.
26994        pub fn name(&self) -> std::option::Option<&str> {
26995            match self {
26996                Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
26997                Self::Dataproc => std::option::Option::Some("DATAPROC"),
26998                Self::UnknownValue(u) => u.0.name(),
26999            }
27000        }
27001    }
27002
27003    impl std::default::Default for Service {
27004        fn default() -> Self {
27005            use std::convert::From;
27006            Self::from(0)
27007        }
27008    }
27009
27010    impl std::fmt::Display for Service {
27011        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27012            wkt::internal::display_enum(f, self.name(), self.value())
27013        }
27014    }
27015
27016    impl std::convert::From<i32> for Service {
27017        fn from(value: i32) -> Self {
27018            match value {
27019                0 => Self::Unspecified,
27020                1 => Self::Dataproc,
27021                _ => Self::UnknownValue(service::UnknownValue(
27022                    wkt::internal::UnknownEnumValue::Integer(value),
27023                )),
27024            }
27025        }
27026    }
27027
27028    impl std::convert::From<&str> for Service {
27029        fn from(value: &str) -> Self {
27030            use std::string::ToString;
27031            match value {
27032                "SERVICE_UNSPECIFIED" => Self::Unspecified,
27033                "DATAPROC" => Self::Dataproc,
27034                _ => Self::UnknownValue(service::UnknownValue(
27035                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27036                )),
27037            }
27038        }
27039    }
27040
27041    impl serde::ser::Serialize for Service {
27042        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27043        where
27044            S: serde::Serializer,
27045        {
27046            match self {
27047                Self::Unspecified => serializer.serialize_i32(0),
27048                Self::Dataproc => serializer.serialize_i32(1),
27049                Self::UnknownValue(u) => u.0.serialize(serializer),
27050            }
27051        }
27052    }
27053
27054    impl<'de> serde::de::Deserialize<'de> for Service {
27055        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27056        where
27057            D: serde::Deserializer<'de>,
27058        {
27059            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
27060                ".google.cloud.dataplex.v1.JobEvent.Service",
27061            ))
27062        }
27063    }
27064
27065    /// Job Execution trigger.
27066    ///
27067    /// # Working with unknown values
27068    ///
27069    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27070    /// additional enum variants at any time. Adding new variants is not considered
27071    /// a breaking change. Applications should write their code in anticipation of:
27072    ///
27073    /// - New values appearing in future releases of the client library, **and**
27074    /// - New values received dynamically, without application changes.
27075    ///
27076    /// Please consult the [Working with enums] section in the user guide for some
27077    /// guidelines.
27078    ///
27079    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27080    #[derive(Clone, Debug, PartialEq)]
27081    #[non_exhaustive]
27082    pub enum ExecutionTrigger {
27083        /// The job execution trigger is unspecified.
27084        Unspecified,
27085        /// The job was triggered by Dataplex Universal Catalog based on trigger spec
27086        /// from task definition.
27087        TaskConfig,
27088        /// The job was triggered by the explicit call of Task API.
27089        RunRequest,
27090        /// If set, the enum was initialized with an unknown value.
27091        ///
27092        /// Applications can examine the value using [ExecutionTrigger::value] or
27093        /// [ExecutionTrigger::name].
27094        UnknownValue(execution_trigger::UnknownValue),
27095    }
27096
27097    #[doc(hidden)]
27098    pub mod execution_trigger {
27099        #[allow(unused_imports)]
27100        use super::*;
27101        #[derive(Clone, Debug, PartialEq)]
27102        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27103    }
27104
27105    impl ExecutionTrigger {
27106        /// Gets the enum value.
27107        ///
27108        /// Returns `None` if the enum contains an unknown value deserialized from
27109        /// the string representation of enums.
27110        pub fn value(&self) -> std::option::Option<i32> {
27111            match self {
27112                Self::Unspecified => std::option::Option::Some(0),
27113                Self::TaskConfig => std::option::Option::Some(1),
27114                Self::RunRequest => std::option::Option::Some(2),
27115                Self::UnknownValue(u) => u.0.value(),
27116            }
27117        }
27118
27119        /// Gets the enum value as a string.
27120        ///
27121        /// Returns `None` if the enum contains an unknown value deserialized from
27122        /// the integer representation of enums.
27123        pub fn name(&self) -> std::option::Option<&str> {
27124            match self {
27125                Self::Unspecified => std::option::Option::Some("EXECUTION_TRIGGER_UNSPECIFIED"),
27126                Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
27127                Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
27128                Self::UnknownValue(u) => u.0.name(),
27129            }
27130        }
27131    }
27132
27133    impl std::default::Default for ExecutionTrigger {
27134        fn default() -> Self {
27135            use std::convert::From;
27136            Self::from(0)
27137        }
27138    }
27139
27140    impl std::fmt::Display for ExecutionTrigger {
27141        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27142            wkt::internal::display_enum(f, self.name(), self.value())
27143        }
27144    }
27145
27146    impl std::convert::From<i32> for ExecutionTrigger {
27147        fn from(value: i32) -> Self {
27148            match value {
27149                0 => Self::Unspecified,
27150                1 => Self::TaskConfig,
27151                2 => Self::RunRequest,
27152                _ => Self::UnknownValue(execution_trigger::UnknownValue(
27153                    wkt::internal::UnknownEnumValue::Integer(value),
27154                )),
27155            }
27156        }
27157    }
27158
27159    impl std::convert::From<&str> for ExecutionTrigger {
27160        fn from(value: &str) -> Self {
27161            use std::string::ToString;
27162            match value {
27163                "EXECUTION_TRIGGER_UNSPECIFIED" => Self::Unspecified,
27164                "TASK_CONFIG" => Self::TaskConfig,
27165                "RUN_REQUEST" => Self::RunRequest,
27166                _ => Self::UnknownValue(execution_trigger::UnknownValue(
27167                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27168                )),
27169            }
27170        }
27171    }
27172
27173    impl serde::ser::Serialize for ExecutionTrigger {
27174        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27175        where
27176            S: serde::Serializer,
27177        {
27178            match self {
27179                Self::Unspecified => serializer.serialize_i32(0),
27180                Self::TaskConfig => serializer.serialize_i32(1),
27181                Self::RunRequest => serializer.serialize_i32(2),
27182                Self::UnknownValue(u) => u.0.serialize(serializer),
27183            }
27184        }
27185    }
27186
27187    impl<'de> serde::de::Deserialize<'de> for ExecutionTrigger {
27188        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27189        where
27190            D: serde::Deserializer<'de>,
27191        {
27192            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExecutionTrigger>::new(
27193                ".google.cloud.dataplex.v1.JobEvent.ExecutionTrigger",
27194            ))
27195        }
27196    }
27197}
27198
27199/// These messages contain information about sessions within an environment.
27200/// The monitored resource is 'Environment'.
27201#[derive(Clone, Default, PartialEq)]
27202#[non_exhaustive]
27203pub struct SessionEvent {
27204    /// The log message.
27205    pub message: std::string::String,
27206
27207    /// The information about the user that created the session. It will be the
27208    /// email address of the user.
27209    pub user_id: std::string::String,
27210
27211    /// Unique identifier for the session.
27212    pub session_id: std::string::String,
27213
27214    /// The type of the event.
27215    pub r#type: crate::model::session_event::EventType,
27216
27217    /// The status of the event.
27218    pub event_succeeded: bool,
27219
27220    /// If the session is associated with an environment with fast startup enabled,
27221    /// and was created before being assigned to a user.
27222    pub fast_startup_enabled: bool,
27223
27224    /// The idle duration of a warm pooled session before it is assigned to user.
27225    pub unassigned_duration: std::option::Option<wkt::Duration>,
27226
27227    /// Additional information about the Query metadata.
27228    pub detail: std::option::Option<crate::model::session_event::Detail>,
27229
27230    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27231}
27232
27233impl SessionEvent {
27234    pub fn new() -> Self {
27235        std::default::Default::default()
27236    }
27237
27238    /// Sets the value of [message][crate::model::SessionEvent::message].
27239    ///
27240    /// # Example
27241    /// ```ignore,no_run
27242    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27243    /// let x = SessionEvent::new().set_message("example");
27244    /// ```
27245    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27246        self.message = v.into();
27247        self
27248    }
27249
27250    /// Sets the value of [user_id][crate::model::SessionEvent::user_id].
27251    ///
27252    /// # Example
27253    /// ```ignore,no_run
27254    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27255    /// let x = SessionEvent::new().set_user_id("example");
27256    /// ```
27257    pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27258        self.user_id = v.into();
27259        self
27260    }
27261
27262    /// Sets the value of [session_id][crate::model::SessionEvent::session_id].
27263    ///
27264    /// # Example
27265    /// ```ignore,no_run
27266    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27267    /// let x = SessionEvent::new().set_session_id("example");
27268    /// ```
27269    pub fn set_session_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27270        self.session_id = v.into();
27271        self
27272    }
27273
27274    /// Sets the value of [r#type][crate::model::SessionEvent::type].
27275    ///
27276    /// # Example
27277    /// ```ignore,no_run
27278    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27279    /// use google_cloud_dataplex_v1::model::session_event::EventType;
27280    /// let x0 = SessionEvent::new().set_type(EventType::Start);
27281    /// let x1 = SessionEvent::new().set_type(EventType::Stop);
27282    /// let x2 = SessionEvent::new().set_type(EventType::Query);
27283    /// ```
27284    pub fn set_type<T: std::convert::Into<crate::model::session_event::EventType>>(
27285        mut self,
27286        v: T,
27287    ) -> Self {
27288        self.r#type = v.into();
27289        self
27290    }
27291
27292    /// Sets the value of [event_succeeded][crate::model::SessionEvent::event_succeeded].
27293    ///
27294    /// # Example
27295    /// ```ignore,no_run
27296    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27297    /// let x = SessionEvent::new().set_event_succeeded(true);
27298    /// ```
27299    pub fn set_event_succeeded<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
27300        self.event_succeeded = v.into();
27301        self
27302    }
27303
27304    /// Sets the value of [fast_startup_enabled][crate::model::SessionEvent::fast_startup_enabled].
27305    ///
27306    /// # Example
27307    /// ```ignore,no_run
27308    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27309    /// let x = SessionEvent::new().set_fast_startup_enabled(true);
27310    /// ```
27311    pub fn set_fast_startup_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
27312        self.fast_startup_enabled = v.into();
27313        self
27314    }
27315
27316    /// Sets the value of [unassigned_duration][crate::model::SessionEvent::unassigned_duration].
27317    ///
27318    /// # Example
27319    /// ```ignore,no_run
27320    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27321    /// use wkt::Duration;
27322    /// let x = SessionEvent::new().set_unassigned_duration(Duration::default()/* use setters */);
27323    /// ```
27324    pub fn set_unassigned_duration<T>(mut self, v: T) -> Self
27325    where
27326        T: std::convert::Into<wkt::Duration>,
27327    {
27328        self.unassigned_duration = std::option::Option::Some(v.into());
27329        self
27330    }
27331
27332    /// Sets or clears the value of [unassigned_duration][crate::model::SessionEvent::unassigned_duration].
27333    ///
27334    /// # Example
27335    /// ```ignore,no_run
27336    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27337    /// use wkt::Duration;
27338    /// let x = SessionEvent::new().set_or_clear_unassigned_duration(Some(Duration::default()/* use setters */));
27339    /// let x = SessionEvent::new().set_or_clear_unassigned_duration(None::<Duration>);
27340    /// ```
27341    pub fn set_or_clear_unassigned_duration<T>(mut self, v: std::option::Option<T>) -> Self
27342    where
27343        T: std::convert::Into<wkt::Duration>,
27344    {
27345        self.unassigned_duration = v.map(|x| x.into());
27346        self
27347    }
27348
27349    /// Sets the value of [detail][crate::model::SessionEvent::detail].
27350    ///
27351    /// Note that all the setters affecting `detail` are mutually
27352    /// exclusive.
27353    ///
27354    /// # Example
27355    /// ```ignore,no_run
27356    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27357    /// use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27358    /// let x = SessionEvent::new().set_detail(Some(
27359    ///     google_cloud_dataplex_v1::model::session_event::Detail::Query(QueryDetail::default().into())));
27360    /// ```
27361    pub fn set_detail<
27362        T: std::convert::Into<std::option::Option<crate::model::session_event::Detail>>,
27363    >(
27364        mut self,
27365        v: T,
27366    ) -> Self {
27367        self.detail = v.into();
27368        self
27369    }
27370
27371    /// The value of [detail][crate::model::SessionEvent::detail]
27372    /// if it holds a `Query`, `None` if the field is not set or
27373    /// holds a different branch.
27374    pub fn query(
27375        &self,
27376    ) -> std::option::Option<&std::boxed::Box<crate::model::session_event::QueryDetail>> {
27377        #[allow(unreachable_patterns)]
27378        self.detail.as_ref().and_then(|v| match v {
27379            crate::model::session_event::Detail::Query(v) => std::option::Option::Some(v),
27380            _ => std::option::Option::None,
27381        })
27382    }
27383
27384    /// Sets the value of [detail][crate::model::SessionEvent::detail]
27385    /// to hold a `Query`.
27386    ///
27387    /// Note that all the setters affecting `detail` are
27388    /// mutually exclusive.
27389    ///
27390    /// # Example
27391    /// ```ignore,no_run
27392    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27393    /// use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27394    /// let x = SessionEvent::new().set_query(QueryDetail::default()/* use setters */);
27395    /// assert!(x.query().is_some());
27396    /// ```
27397    pub fn set_query<
27398        T: std::convert::Into<std::boxed::Box<crate::model::session_event::QueryDetail>>,
27399    >(
27400        mut self,
27401        v: T,
27402    ) -> Self {
27403        self.detail =
27404            std::option::Option::Some(crate::model::session_event::Detail::Query(v.into()));
27405        self
27406    }
27407}
27408
27409impl wkt::message::Message for SessionEvent {
27410    fn typename() -> &'static str {
27411        "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent"
27412    }
27413}
27414
27415/// Defines additional types related to [SessionEvent].
27416pub mod session_event {
27417    #[allow(unused_imports)]
27418    use super::*;
27419
27420    /// Execution details of the query.
27421    #[derive(Clone, Default, PartialEq)]
27422    #[non_exhaustive]
27423    pub struct QueryDetail {
27424        /// The unique Query id identifying the query.
27425        pub query_id: std::string::String,
27426
27427        /// The query text executed.
27428        pub query_text: std::string::String,
27429
27430        /// Query Execution engine.
27431        pub engine: crate::model::session_event::query_detail::Engine,
27432
27433        /// Time taken for execution of the query.
27434        pub duration: std::option::Option<wkt::Duration>,
27435
27436        /// The size of results the query produced.
27437        pub result_size_bytes: i64,
27438
27439        /// The data processed by the query.
27440        pub data_processed_bytes: i64,
27441
27442        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27443    }
27444
27445    impl QueryDetail {
27446        pub fn new() -> Self {
27447            std::default::Default::default()
27448        }
27449
27450        /// Sets the value of [query_id][crate::model::session_event::QueryDetail::query_id].
27451        ///
27452        /// # Example
27453        /// ```ignore,no_run
27454        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27455        /// let x = QueryDetail::new().set_query_id("example");
27456        /// ```
27457        pub fn set_query_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27458            self.query_id = v.into();
27459            self
27460        }
27461
27462        /// Sets the value of [query_text][crate::model::session_event::QueryDetail::query_text].
27463        ///
27464        /// # Example
27465        /// ```ignore,no_run
27466        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27467        /// let x = QueryDetail::new().set_query_text("example");
27468        /// ```
27469        pub fn set_query_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27470            self.query_text = v.into();
27471            self
27472        }
27473
27474        /// Sets the value of [engine][crate::model::session_event::QueryDetail::engine].
27475        ///
27476        /// # Example
27477        /// ```ignore,no_run
27478        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27479        /// use google_cloud_dataplex_v1::model::session_event::query_detail::Engine;
27480        /// let x0 = QueryDetail::new().set_engine(Engine::SparkSql);
27481        /// let x1 = QueryDetail::new().set_engine(Engine::Bigquery);
27482        /// ```
27483        pub fn set_engine<
27484            T: std::convert::Into<crate::model::session_event::query_detail::Engine>,
27485        >(
27486            mut self,
27487            v: T,
27488        ) -> Self {
27489            self.engine = v.into();
27490            self
27491        }
27492
27493        /// Sets the value of [duration][crate::model::session_event::QueryDetail::duration].
27494        ///
27495        /// # Example
27496        /// ```ignore,no_run
27497        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27498        /// use wkt::Duration;
27499        /// let x = QueryDetail::new().set_duration(Duration::default()/* use setters */);
27500        /// ```
27501        pub fn set_duration<T>(mut self, v: T) -> Self
27502        where
27503            T: std::convert::Into<wkt::Duration>,
27504        {
27505            self.duration = std::option::Option::Some(v.into());
27506            self
27507        }
27508
27509        /// Sets or clears the value of [duration][crate::model::session_event::QueryDetail::duration].
27510        ///
27511        /// # Example
27512        /// ```ignore,no_run
27513        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27514        /// use wkt::Duration;
27515        /// let x = QueryDetail::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
27516        /// let x = QueryDetail::new().set_or_clear_duration(None::<Duration>);
27517        /// ```
27518        pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
27519        where
27520            T: std::convert::Into<wkt::Duration>,
27521        {
27522            self.duration = v.map(|x| x.into());
27523            self
27524        }
27525
27526        /// Sets the value of [result_size_bytes][crate::model::session_event::QueryDetail::result_size_bytes].
27527        ///
27528        /// # Example
27529        /// ```ignore,no_run
27530        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27531        /// let x = QueryDetail::new().set_result_size_bytes(42);
27532        /// ```
27533        pub fn set_result_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
27534            self.result_size_bytes = v.into();
27535            self
27536        }
27537
27538        /// Sets the value of [data_processed_bytes][crate::model::session_event::QueryDetail::data_processed_bytes].
27539        ///
27540        /// # Example
27541        /// ```ignore,no_run
27542        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27543        /// let x = QueryDetail::new().set_data_processed_bytes(42);
27544        /// ```
27545        pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
27546            self.data_processed_bytes = v.into();
27547            self
27548        }
27549    }
27550
27551    impl wkt::message::Message for QueryDetail {
27552        fn typename() -> &'static str {
27553            "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent.QueryDetail"
27554        }
27555    }
27556
27557    /// Defines additional types related to [QueryDetail].
27558    pub mod query_detail {
27559        #[allow(unused_imports)]
27560        use super::*;
27561
27562        /// Query Execution engine.
27563        ///
27564        /// # Working with unknown values
27565        ///
27566        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27567        /// additional enum variants at any time. Adding new variants is not considered
27568        /// a breaking change. Applications should write their code in anticipation of:
27569        ///
27570        /// - New values appearing in future releases of the client library, **and**
27571        /// - New values received dynamically, without application changes.
27572        ///
27573        /// Please consult the [Working with enums] section in the user guide for some
27574        /// guidelines.
27575        ///
27576        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27577        #[derive(Clone, Debug, PartialEq)]
27578        #[non_exhaustive]
27579        pub enum Engine {
27580            /// An unspecified Engine type.
27581            Unspecified,
27582            /// Spark-sql engine is specified in Query.
27583            SparkSql,
27584            /// BigQuery engine is specified in Query.
27585            Bigquery,
27586            /// If set, the enum was initialized with an unknown value.
27587            ///
27588            /// Applications can examine the value using [Engine::value] or
27589            /// [Engine::name].
27590            UnknownValue(engine::UnknownValue),
27591        }
27592
27593        #[doc(hidden)]
27594        pub mod engine {
27595            #[allow(unused_imports)]
27596            use super::*;
27597            #[derive(Clone, Debug, PartialEq)]
27598            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27599        }
27600
27601        impl Engine {
27602            /// Gets the enum value.
27603            ///
27604            /// Returns `None` if the enum contains an unknown value deserialized from
27605            /// the string representation of enums.
27606            pub fn value(&self) -> std::option::Option<i32> {
27607                match self {
27608                    Self::Unspecified => std::option::Option::Some(0),
27609                    Self::SparkSql => std::option::Option::Some(1),
27610                    Self::Bigquery => std::option::Option::Some(2),
27611                    Self::UnknownValue(u) => u.0.value(),
27612                }
27613            }
27614
27615            /// Gets the enum value as a string.
27616            ///
27617            /// Returns `None` if the enum contains an unknown value deserialized from
27618            /// the integer representation of enums.
27619            pub fn name(&self) -> std::option::Option<&str> {
27620                match self {
27621                    Self::Unspecified => std::option::Option::Some("ENGINE_UNSPECIFIED"),
27622                    Self::SparkSql => std::option::Option::Some("SPARK_SQL"),
27623                    Self::Bigquery => std::option::Option::Some("BIGQUERY"),
27624                    Self::UnknownValue(u) => u.0.name(),
27625                }
27626            }
27627        }
27628
27629        impl std::default::Default for Engine {
27630            fn default() -> Self {
27631                use std::convert::From;
27632                Self::from(0)
27633            }
27634        }
27635
27636        impl std::fmt::Display for Engine {
27637            fn fmt(
27638                &self,
27639                f: &mut std::fmt::Formatter<'_>,
27640            ) -> std::result::Result<(), std::fmt::Error> {
27641                wkt::internal::display_enum(f, self.name(), self.value())
27642            }
27643        }
27644
27645        impl std::convert::From<i32> for Engine {
27646            fn from(value: i32) -> Self {
27647                match value {
27648                    0 => Self::Unspecified,
27649                    1 => Self::SparkSql,
27650                    2 => Self::Bigquery,
27651                    _ => Self::UnknownValue(engine::UnknownValue(
27652                        wkt::internal::UnknownEnumValue::Integer(value),
27653                    )),
27654                }
27655            }
27656        }
27657
27658        impl std::convert::From<&str> for Engine {
27659            fn from(value: &str) -> Self {
27660                use std::string::ToString;
27661                match value {
27662                    "ENGINE_UNSPECIFIED" => Self::Unspecified,
27663                    "SPARK_SQL" => Self::SparkSql,
27664                    "BIGQUERY" => Self::Bigquery,
27665                    _ => Self::UnknownValue(engine::UnknownValue(
27666                        wkt::internal::UnknownEnumValue::String(value.to_string()),
27667                    )),
27668                }
27669            }
27670        }
27671
27672        impl serde::ser::Serialize for Engine {
27673            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27674            where
27675                S: serde::Serializer,
27676            {
27677                match self {
27678                    Self::Unspecified => serializer.serialize_i32(0),
27679                    Self::SparkSql => serializer.serialize_i32(1),
27680                    Self::Bigquery => serializer.serialize_i32(2),
27681                    Self::UnknownValue(u) => u.0.serialize(serializer),
27682                }
27683            }
27684        }
27685
27686        impl<'de> serde::de::Deserialize<'de> for Engine {
27687            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27688            where
27689                D: serde::Deserializer<'de>,
27690            {
27691                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Engine>::new(
27692                    ".google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine",
27693                ))
27694            }
27695        }
27696    }
27697
27698    /// The type of the event.
27699    ///
27700    /// # Working with unknown values
27701    ///
27702    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27703    /// additional enum variants at any time. Adding new variants is not considered
27704    /// a breaking change. Applications should write their code in anticipation of:
27705    ///
27706    /// - New values appearing in future releases of the client library, **and**
27707    /// - New values received dynamically, without application changes.
27708    ///
27709    /// Please consult the [Working with enums] section in the user guide for some
27710    /// guidelines.
27711    ///
27712    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27713    #[derive(Clone, Debug, PartialEq)]
27714    #[non_exhaustive]
27715    pub enum EventType {
27716        /// An unspecified event type.
27717        Unspecified,
27718        /// Event when the session is assigned to a user.
27719        Start,
27720        /// Event for stop of a session.
27721        Stop,
27722        /// Query events in the session.
27723        Query,
27724        /// Event for creation of a cluster. It is not yet assigned to a user.
27725        /// This comes before START in the sequence
27726        Create,
27727        /// If set, the enum was initialized with an unknown value.
27728        ///
27729        /// Applications can examine the value using [EventType::value] or
27730        /// [EventType::name].
27731        UnknownValue(event_type::UnknownValue),
27732    }
27733
27734    #[doc(hidden)]
27735    pub mod event_type {
27736        #[allow(unused_imports)]
27737        use super::*;
27738        #[derive(Clone, Debug, PartialEq)]
27739        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27740    }
27741
27742    impl EventType {
27743        /// Gets the enum value.
27744        ///
27745        /// Returns `None` if the enum contains an unknown value deserialized from
27746        /// the string representation of enums.
27747        pub fn value(&self) -> std::option::Option<i32> {
27748            match self {
27749                Self::Unspecified => std::option::Option::Some(0),
27750                Self::Start => std::option::Option::Some(1),
27751                Self::Stop => std::option::Option::Some(2),
27752                Self::Query => std::option::Option::Some(3),
27753                Self::Create => std::option::Option::Some(4),
27754                Self::UnknownValue(u) => u.0.value(),
27755            }
27756        }
27757
27758        /// Gets the enum value as a string.
27759        ///
27760        /// Returns `None` if the enum contains an unknown value deserialized from
27761        /// the integer representation of enums.
27762        pub fn name(&self) -> std::option::Option<&str> {
27763            match self {
27764                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
27765                Self::Start => std::option::Option::Some("START"),
27766                Self::Stop => std::option::Option::Some("STOP"),
27767                Self::Query => std::option::Option::Some("QUERY"),
27768                Self::Create => std::option::Option::Some("CREATE"),
27769                Self::UnknownValue(u) => u.0.name(),
27770            }
27771        }
27772    }
27773
27774    impl std::default::Default for EventType {
27775        fn default() -> Self {
27776            use std::convert::From;
27777            Self::from(0)
27778        }
27779    }
27780
27781    impl std::fmt::Display for EventType {
27782        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27783            wkt::internal::display_enum(f, self.name(), self.value())
27784        }
27785    }
27786
27787    impl std::convert::From<i32> for EventType {
27788        fn from(value: i32) -> Self {
27789            match value {
27790                0 => Self::Unspecified,
27791                1 => Self::Start,
27792                2 => Self::Stop,
27793                3 => Self::Query,
27794                4 => Self::Create,
27795                _ => Self::UnknownValue(event_type::UnknownValue(
27796                    wkt::internal::UnknownEnumValue::Integer(value),
27797                )),
27798            }
27799        }
27800    }
27801
27802    impl std::convert::From<&str> for EventType {
27803        fn from(value: &str) -> Self {
27804            use std::string::ToString;
27805            match value {
27806                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
27807                "START" => Self::Start,
27808                "STOP" => Self::Stop,
27809                "QUERY" => Self::Query,
27810                "CREATE" => Self::Create,
27811                _ => Self::UnknownValue(event_type::UnknownValue(
27812                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27813                )),
27814            }
27815        }
27816    }
27817
27818    impl serde::ser::Serialize for EventType {
27819        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27820        where
27821            S: serde::Serializer,
27822        {
27823            match self {
27824                Self::Unspecified => serializer.serialize_i32(0),
27825                Self::Start => serializer.serialize_i32(1),
27826                Self::Stop => serializer.serialize_i32(2),
27827                Self::Query => serializer.serialize_i32(3),
27828                Self::Create => serializer.serialize_i32(4),
27829                Self::UnknownValue(u) => u.0.serialize(serializer),
27830            }
27831        }
27832    }
27833
27834    impl<'de> serde::de::Deserialize<'de> for EventType {
27835        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27836        where
27837            D: serde::Deserializer<'de>,
27838        {
27839            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
27840                ".google.cloud.dataplex.v1.SessionEvent.EventType",
27841            ))
27842        }
27843    }
27844
27845    /// Additional information about the Query metadata.
27846    #[derive(Clone, Debug, PartialEq)]
27847    #[non_exhaustive]
27848    pub enum Detail {
27849        /// The execution details of the query.
27850        Query(std::boxed::Box<crate::model::session_event::QueryDetail>),
27851    }
27852}
27853
27854/// Payload associated with Governance related log events.
27855#[derive(Clone, Default, PartialEq)]
27856#[non_exhaustive]
27857pub struct GovernanceEvent {
27858    /// The log message.
27859    pub message: std::string::String,
27860
27861    /// The type of the event.
27862    pub event_type: crate::model::governance_event::EventType,
27863
27864    /// Entity resource information if the log event is associated with a
27865    /// specific entity.
27866    pub entity: std::option::Option<crate::model::governance_event::Entity>,
27867
27868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27869}
27870
27871impl GovernanceEvent {
27872    pub fn new() -> Self {
27873        std::default::Default::default()
27874    }
27875
27876    /// Sets the value of [message][crate::model::GovernanceEvent::message].
27877    ///
27878    /// # Example
27879    /// ```ignore,no_run
27880    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27881    /// let x = GovernanceEvent::new().set_message("example");
27882    /// ```
27883    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27884        self.message = v.into();
27885        self
27886    }
27887
27888    /// Sets the value of [event_type][crate::model::GovernanceEvent::event_type].
27889    ///
27890    /// # Example
27891    /// ```ignore,no_run
27892    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27893    /// use google_cloud_dataplex_v1::model::governance_event::EventType;
27894    /// let x0 = GovernanceEvent::new().set_event_type(EventType::ResourceIamPolicyUpdate);
27895    /// let x1 = GovernanceEvent::new().set_event_type(EventType::BigqueryTableCreate);
27896    /// let x2 = GovernanceEvent::new().set_event_type(EventType::BigqueryTableUpdate);
27897    /// ```
27898    pub fn set_event_type<T: std::convert::Into<crate::model::governance_event::EventType>>(
27899        mut self,
27900        v: T,
27901    ) -> Self {
27902        self.event_type = v.into();
27903        self
27904    }
27905
27906    /// Sets the value of [entity][crate::model::GovernanceEvent::entity].
27907    ///
27908    /// # Example
27909    /// ```ignore,no_run
27910    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27911    /// use google_cloud_dataplex_v1::model::governance_event::Entity;
27912    /// let x = GovernanceEvent::new().set_entity(Entity::default()/* use setters */);
27913    /// ```
27914    pub fn set_entity<T>(mut self, v: T) -> Self
27915    where
27916        T: std::convert::Into<crate::model::governance_event::Entity>,
27917    {
27918        self.entity = std::option::Option::Some(v.into());
27919        self
27920    }
27921
27922    /// Sets or clears the value of [entity][crate::model::GovernanceEvent::entity].
27923    ///
27924    /// # Example
27925    /// ```ignore,no_run
27926    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27927    /// use google_cloud_dataplex_v1::model::governance_event::Entity;
27928    /// let x = GovernanceEvent::new().set_or_clear_entity(Some(Entity::default()/* use setters */));
27929    /// let x = GovernanceEvent::new().set_or_clear_entity(None::<Entity>);
27930    /// ```
27931    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
27932    where
27933        T: std::convert::Into<crate::model::governance_event::Entity>,
27934    {
27935        self.entity = v.map(|x| x.into());
27936        self
27937    }
27938}
27939
27940impl wkt::message::Message for GovernanceEvent {
27941    fn typename() -> &'static str {
27942        "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent"
27943    }
27944}
27945
27946/// Defines additional types related to [GovernanceEvent].
27947pub mod governance_event {
27948    #[allow(unused_imports)]
27949    use super::*;
27950
27951    /// Information about Entity resource that the log event is associated with.
27952    #[derive(Clone, Default, PartialEq)]
27953    #[non_exhaustive]
27954    pub struct Entity {
27955        /// The Entity resource the log event is associated with.
27956        /// Format:
27957        /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`
27958        pub entity: std::string::String,
27959
27960        /// Type of entity.
27961        pub entity_type: crate::model::governance_event::entity::EntityType,
27962
27963        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27964    }
27965
27966    impl Entity {
27967        pub fn new() -> Self {
27968            std::default::Default::default()
27969        }
27970
27971        /// Sets the value of [entity][crate::model::governance_event::Entity::entity].
27972        ///
27973        /// # Example
27974        /// ```ignore,no_run
27975        /// # use google_cloud_dataplex_v1::model::governance_event::Entity;
27976        /// let x = Entity::new().set_entity("example");
27977        /// ```
27978        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27979            self.entity = v.into();
27980            self
27981        }
27982
27983        /// Sets the value of [entity_type][crate::model::governance_event::Entity::entity_type].
27984        ///
27985        /// # Example
27986        /// ```ignore,no_run
27987        /// # use google_cloud_dataplex_v1::model::governance_event::Entity;
27988        /// use google_cloud_dataplex_v1::model::governance_event::entity::EntityType;
27989        /// let x0 = Entity::new().set_entity_type(EntityType::Table);
27990        /// let x1 = Entity::new().set_entity_type(EntityType::Fileset);
27991        /// ```
27992        pub fn set_entity_type<
27993            T: std::convert::Into<crate::model::governance_event::entity::EntityType>,
27994        >(
27995            mut self,
27996            v: T,
27997        ) -> Self {
27998            self.entity_type = v.into();
27999            self
28000        }
28001    }
28002
28003    impl wkt::message::Message for Entity {
28004        fn typename() -> &'static str {
28005            "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent.Entity"
28006        }
28007    }
28008
28009    /// Defines additional types related to [Entity].
28010    pub mod entity {
28011        #[allow(unused_imports)]
28012        use super::*;
28013
28014        /// Type of entity.
28015        ///
28016        /// # Working with unknown values
28017        ///
28018        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28019        /// additional enum variants at any time. Adding new variants is not considered
28020        /// a breaking change. Applications should write their code in anticipation of:
28021        ///
28022        /// - New values appearing in future releases of the client library, **and**
28023        /// - New values received dynamically, without application changes.
28024        ///
28025        /// Please consult the [Working with enums] section in the user guide for some
28026        /// guidelines.
28027        ///
28028        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28029        #[derive(Clone, Debug, PartialEq)]
28030        #[non_exhaustive]
28031        pub enum EntityType {
28032            /// An unspecified Entity type.
28033            Unspecified,
28034            /// Table entity type.
28035            Table,
28036            /// Fileset entity type.
28037            Fileset,
28038            /// If set, the enum was initialized with an unknown value.
28039            ///
28040            /// Applications can examine the value using [EntityType::value] or
28041            /// [EntityType::name].
28042            UnknownValue(entity_type::UnknownValue),
28043        }
28044
28045        #[doc(hidden)]
28046        pub mod entity_type {
28047            #[allow(unused_imports)]
28048            use super::*;
28049            #[derive(Clone, Debug, PartialEq)]
28050            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28051        }
28052
28053        impl EntityType {
28054            /// Gets the enum value.
28055            ///
28056            /// Returns `None` if the enum contains an unknown value deserialized from
28057            /// the string representation of enums.
28058            pub fn value(&self) -> std::option::Option<i32> {
28059                match self {
28060                    Self::Unspecified => std::option::Option::Some(0),
28061                    Self::Table => std::option::Option::Some(1),
28062                    Self::Fileset => std::option::Option::Some(2),
28063                    Self::UnknownValue(u) => u.0.value(),
28064                }
28065            }
28066
28067            /// Gets the enum value as a string.
28068            ///
28069            /// Returns `None` if the enum contains an unknown value deserialized from
28070            /// the integer representation of enums.
28071            pub fn name(&self) -> std::option::Option<&str> {
28072                match self {
28073                    Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
28074                    Self::Table => std::option::Option::Some("TABLE"),
28075                    Self::Fileset => std::option::Option::Some("FILESET"),
28076                    Self::UnknownValue(u) => u.0.name(),
28077                }
28078            }
28079        }
28080
28081        impl std::default::Default for EntityType {
28082            fn default() -> Self {
28083                use std::convert::From;
28084                Self::from(0)
28085            }
28086        }
28087
28088        impl std::fmt::Display for EntityType {
28089            fn fmt(
28090                &self,
28091                f: &mut std::fmt::Formatter<'_>,
28092            ) -> std::result::Result<(), std::fmt::Error> {
28093                wkt::internal::display_enum(f, self.name(), self.value())
28094            }
28095        }
28096
28097        impl std::convert::From<i32> for EntityType {
28098            fn from(value: i32) -> Self {
28099                match value {
28100                    0 => Self::Unspecified,
28101                    1 => Self::Table,
28102                    2 => Self::Fileset,
28103                    _ => Self::UnknownValue(entity_type::UnknownValue(
28104                        wkt::internal::UnknownEnumValue::Integer(value),
28105                    )),
28106                }
28107            }
28108        }
28109
28110        impl std::convert::From<&str> for EntityType {
28111            fn from(value: &str) -> Self {
28112                use std::string::ToString;
28113                match value {
28114                    "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
28115                    "TABLE" => Self::Table,
28116                    "FILESET" => Self::Fileset,
28117                    _ => Self::UnknownValue(entity_type::UnknownValue(
28118                        wkt::internal::UnknownEnumValue::String(value.to_string()),
28119                    )),
28120                }
28121            }
28122        }
28123
28124        impl serde::ser::Serialize for EntityType {
28125            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28126            where
28127                S: serde::Serializer,
28128            {
28129                match self {
28130                    Self::Unspecified => serializer.serialize_i32(0),
28131                    Self::Table => serializer.serialize_i32(1),
28132                    Self::Fileset => serializer.serialize_i32(2),
28133                    Self::UnknownValue(u) => u.0.serialize(serializer),
28134                }
28135            }
28136        }
28137
28138        impl<'de> serde::de::Deserialize<'de> for EntityType {
28139            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28140            where
28141                D: serde::Deserializer<'de>,
28142            {
28143                deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
28144                    ".google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType",
28145                ))
28146            }
28147        }
28148    }
28149
28150    /// Type of governance log event.
28151    ///
28152    /// # Working with unknown values
28153    ///
28154    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28155    /// additional enum variants at any time. Adding new variants is not considered
28156    /// a breaking change. Applications should write their code in anticipation of:
28157    ///
28158    /// - New values appearing in future releases of the client library, **and**
28159    /// - New values received dynamically, without application changes.
28160    ///
28161    /// Please consult the [Working with enums] section in the user guide for some
28162    /// guidelines.
28163    ///
28164    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28165    #[derive(Clone, Debug, PartialEq)]
28166    #[non_exhaustive]
28167    pub enum EventType {
28168        /// An unspecified event type.
28169        Unspecified,
28170        /// Resource IAM policy update event.
28171        ResourceIamPolicyUpdate,
28172        /// BigQuery table create event.
28173        BigqueryTableCreate,
28174        /// BigQuery table update event.
28175        BigqueryTableUpdate,
28176        /// BigQuery table delete event.
28177        BigqueryTableDelete,
28178        /// BigQuery connection create event.
28179        BigqueryConnectionCreate,
28180        /// BigQuery connection update event.
28181        BigqueryConnectionUpdate,
28182        /// BigQuery connection delete event.
28183        BigqueryConnectionDelete,
28184        /// BigQuery taxonomy created.
28185        BigqueryTaxonomyCreate,
28186        /// BigQuery policy tag created.
28187        BigqueryPolicyTagCreate,
28188        /// BigQuery policy tag deleted.
28189        BigqueryPolicyTagDelete,
28190        /// BigQuery set iam policy for policy tag.
28191        BigqueryPolicyTagSetIamPolicy,
28192        /// Access policy update event.
28193        AccessPolicyUpdate,
28194        /// Number of resources matched with particular Query.
28195        GovernanceRuleMatchedResources,
28196        /// Rule processing exceeds the allowed limit.
28197        GovernanceRuleSearchLimitExceeds,
28198        /// Rule processing errors.
28199        GovernanceRuleErrors,
28200        /// Governance rule processing Event.
28201        GovernanceRuleProcessing,
28202        /// If set, the enum was initialized with an unknown value.
28203        ///
28204        /// Applications can examine the value using [EventType::value] or
28205        /// [EventType::name].
28206        UnknownValue(event_type::UnknownValue),
28207    }
28208
28209    #[doc(hidden)]
28210    pub mod event_type {
28211        #[allow(unused_imports)]
28212        use super::*;
28213        #[derive(Clone, Debug, PartialEq)]
28214        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28215    }
28216
28217    impl EventType {
28218        /// Gets the enum value.
28219        ///
28220        /// Returns `None` if the enum contains an unknown value deserialized from
28221        /// the string representation of enums.
28222        pub fn value(&self) -> std::option::Option<i32> {
28223            match self {
28224                Self::Unspecified => std::option::Option::Some(0),
28225                Self::ResourceIamPolicyUpdate => std::option::Option::Some(1),
28226                Self::BigqueryTableCreate => std::option::Option::Some(2),
28227                Self::BigqueryTableUpdate => std::option::Option::Some(3),
28228                Self::BigqueryTableDelete => std::option::Option::Some(4),
28229                Self::BigqueryConnectionCreate => std::option::Option::Some(5),
28230                Self::BigqueryConnectionUpdate => std::option::Option::Some(6),
28231                Self::BigqueryConnectionDelete => std::option::Option::Some(7),
28232                Self::BigqueryTaxonomyCreate => std::option::Option::Some(10),
28233                Self::BigqueryPolicyTagCreate => std::option::Option::Some(11),
28234                Self::BigqueryPolicyTagDelete => std::option::Option::Some(12),
28235                Self::BigqueryPolicyTagSetIamPolicy => std::option::Option::Some(13),
28236                Self::AccessPolicyUpdate => std::option::Option::Some(14),
28237                Self::GovernanceRuleMatchedResources => std::option::Option::Some(15),
28238                Self::GovernanceRuleSearchLimitExceeds => std::option::Option::Some(16),
28239                Self::GovernanceRuleErrors => std::option::Option::Some(17),
28240                Self::GovernanceRuleProcessing => std::option::Option::Some(18),
28241                Self::UnknownValue(u) => u.0.value(),
28242            }
28243        }
28244
28245        /// Gets the enum value as a string.
28246        ///
28247        /// Returns `None` if the enum contains an unknown value deserialized from
28248        /// the integer representation of enums.
28249        pub fn name(&self) -> std::option::Option<&str> {
28250            match self {
28251                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
28252                Self::ResourceIamPolicyUpdate => {
28253                    std::option::Option::Some("RESOURCE_IAM_POLICY_UPDATE")
28254                }
28255                Self::BigqueryTableCreate => std::option::Option::Some("BIGQUERY_TABLE_CREATE"),
28256                Self::BigqueryTableUpdate => std::option::Option::Some("BIGQUERY_TABLE_UPDATE"),
28257                Self::BigqueryTableDelete => std::option::Option::Some("BIGQUERY_TABLE_DELETE"),
28258                Self::BigqueryConnectionCreate => {
28259                    std::option::Option::Some("BIGQUERY_CONNECTION_CREATE")
28260                }
28261                Self::BigqueryConnectionUpdate => {
28262                    std::option::Option::Some("BIGQUERY_CONNECTION_UPDATE")
28263                }
28264                Self::BigqueryConnectionDelete => {
28265                    std::option::Option::Some("BIGQUERY_CONNECTION_DELETE")
28266                }
28267                Self::BigqueryTaxonomyCreate => {
28268                    std::option::Option::Some("BIGQUERY_TAXONOMY_CREATE")
28269                }
28270                Self::BigqueryPolicyTagCreate => {
28271                    std::option::Option::Some("BIGQUERY_POLICY_TAG_CREATE")
28272                }
28273                Self::BigqueryPolicyTagDelete => {
28274                    std::option::Option::Some("BIGQUERY_POLICY_TAG_DELETE")
28275                }
28276                Self::BigqueryPolicyTagSetIamPolicy => {
28277                    std::option::Option::Some("BIGQUERY_POLICY_TAG_SET_IAM_POLICY")
28278                }
28279                Self::AccessPolicyUpdate => std::option::Option::Some("ACCESS_POLICY_UPDATE"),
28280                Self::GovernanceRuleMatchedResources => {
28281                    std::option::Option::Some("GOVERNANCE_RULE_MATCHED_RESOURCES")
28282                }
28283                Self::GovernanceRuleSearchLimitExceeds => {
28284                    std::option::Option::Some("GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS")
28285                }
28286                Self::GovernanceRuleErrors => std::option::Option::Some("GOVERNANCE_RULE_ERRORS"),
28287                Self::GovernanceRuleProcessing => {
28288                    std::option::Option::Some("GOVERNANCE_RULE_PROCESSING")
28289                }
28290                Self::UnknownValue(u) => u.0.name(),
28291            }
28292        }
28293    }
28294
28295    impl std::default::Default for EventType {
28296        fn default() -> Self {
28297            use std::convert::From;
28298            Self::from(0)
28299        }
28300    }
28301
28302    impl std::fmt::Display for EventType {
28303        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28304            wkt::internal::display_enum(f, self.name(), self.value())
28305        }
28306    }
28307
28308    impl std::convert::From<i32> for EventType {
28309        fn from(value: i32) -> Self {
28310            match value {
28311                0 => Self::Unspecified,
28312                1 => Self::ResourceIamPolicyUpdate,
28313                2 => Self::BigqueryTableCreate,
28314                3 => Self::BigqueryTableUpdate,
28315                4 => Self::BigqueryTableDelete,
28316                5 => Self::BigqueryConnectionCreate,
28317                6 => Self::BigqueryConnectionUpdate,
28318                7 => Self::BigqueryConnectionDelete,
28319                10 => Self::BigqueryTaxonomyCreate,
28320                11 => Self::BigqueryPolicyTagCreate,
28321                12 => Self::BigqueryPolicyTagDelete,
28322                13 => Self::BigqueryPolicyTagSetIamPolicy,
28323                14 => Self::AccessPolicyUpdate,
28324                15 => Self::GovernanceRuleMatchedResources,
28325                16 => Self::GovernanceRuleSearchLimitExceeds,
28326                17 => Self::GovernanceRuleErrors,
28327                18 => Self::GovernanceRuleProcessing,
28328                _ => Self::UnknownValue(event_type::UnknownValue(
28329                    wkt::internal::UnknownEnumValue::Integer(value),
28330                )),
28331            }
28332        }
28333    }
28334
28335    impl std::convert::From<&str> for EventType {
28336        fn from(value: &str) -> Self {
28337            use std::string::ToString;
28338            match value {
28339                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
28340                "RESOURCE_IAM_POLICY_UPDATE" => Self::ResourceIamPolicyUpdate,
28341                "BIGQUERY_TABLE_CREATE" => Self::BigqueryTableCreate,
28342                "BIGQUERY_TABLE_UPDATE" => Self::BigqueryTableUpdate,
28343                "BIGQUERY_TABLE_DELETE" => Self::BigqueryTableDelete,
28344                "BIGQUERY_CONNECTION_CREATE" => Self::BigqueryConnectionCreate,
28345                "BIGQUERY_CONNECTION_UPDATE" => Self::BigqueryConnectionUpdate,
28346                "BIGQUERY_CONNECTION_DELETE" => Self::BigqueryConnectionDelete,
28347                "BIGQUERY_TAXONOMY_CREATE" => Self::BigqueryTaxonomyCreate,
28348                "BIGQUERY_POLICY_TAG_CREATE" => Self::BigqueryPolicyTagCreate,
28349                "BIGQUERY_POLICY_TAG_DELETE" => Self::BigqueryPolicyTagDelete,
28350                "BIGQUERY_POLICY_TAG_SET_IAM_POLICY" => Self::BigqueryPolicyTagSetIamPolicy,
28351                "ACCESS_POLICY_UPDATE" => Self::AccessPolicyUpdate,
28352                "GOVERNANCE_RULE_MATCHED_RESOURCES" => Self::GovernanceRuleMatchedResources,
28353                "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS" => Self::GovernanceRuleSearchLimitExceeds,
28354                "GOVERNANCE_RULE_ERRORS" => Self::GovernanceRuleErrors,
28355                "GOVERNANCE_RULE_PROCESSING" => Self::GovernanceRuleProcessing,
28356                _ => Self::UnknownValue(event_type::UnknownValue(
28357                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28358                )),
28359            }
28360        }
28361    }
28362
28363    impl serde::ser::Serialize for EventType {
28364        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28365        where
28366            S: serde::Serializer,
28367        {
28368            match self {
28369                Self::Unspecified => serializer.serialize_i32(0),
28370                Self::ResourceIamPolicyUpdate => serializer.serialize_i32(1),
28371                Self::BigqueryTableCreate => serializer.serialize_i32(2),
28372                Self::BigqueryTableUpdate => serializer.serialize_i32(3),
28373                Self::BigqueryTableDelete => serializer.serialize_i32(4),
28374                Self::BigqueryConnectionCreate => serializer.serialize_i32(5),
28375                Self::BigqueryConnectionUpdate => serializer.serialize_i32(6),
28376                Self::BigqueryConnectionDelete => serializer.serialize_i32(7),
28377                Self::BigqueryTaxonomyCreate => serializer.serialize_i32(10),
28378                Self::BigqueryPolicyTagCreate => serializer.serialize_i32(11),
28379                Self::BigqueryPolicyTagDelete => serializer.serialize_i32(12),
28380                Self::BigqueryPolicyTagSetIamPolicy => serializer.serialize_i32(13),
28381                Self::AccessPolicyUpdate => serializer.serialize_i32(14),
28382                Self::GovernanceRuleMatchedResources => serializer.serialize_i32(15),
28383                Self::GovernanceRuleSearchLimitExceeds => serializer.serialize_i32(16),
28384                Self::GovernanceRuleErrors => serializer.serialize_i32(17),
28385                Self::GovernanceRuleProcessing => serializer.serialize_i32(18),
28386                Self::UnknownValue(u) => u.0.serialize(serializer),
28387            }
28388        }
28389    }
28390
28391    impl<'de> serde::de::Deserialize<'de> for EventType {
28392        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28393        where
28394            D: serde::Deserializer<'de>,
28395        {
28396            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
28397                ".google.cloud.dataplex.v1.GovernanceEvent.EventType",
28398            ))
28399        }
28400    }
28401}
28402
28403/// These messages contain information about the execution of a datascan.
28404/// The monitored resource is 'DataScan'
28405#[derive(Clone, Default, PartialEq)]
28406#[non_exhaustive]
28407pub struct DataScanEvent {
28408    /// The data source of the data scan
28409    pub data_source: std::string::String,
28410
28411    /// The identifier of the specific data scan job this log entry is for.
28412    pub job_id: std::string::String,
28413
28414    /// The time when the data scan job was created.
28415    pub create_time: std::option::Option<wkt::Timestamp>,
28416
28417    /// The time when the data scan job started to run.
28418    pub start_time: std::option::Option<wkt::Timestamp>,
28419
28420    /// The time when the data scan job finished.
28421    pub end_time: std::option::Option<wkt::Timestamp>,
28422
28423    /// The type of the data scan.
28424    pub r#type: crate::model::data_scan_event::ScanType,
28425
28426    /// The status of the data scan job.
28427    pub state: crate::model::data_scan_event::State,
28428
28429    /// The message describing the data scan job event.
28430    pub message: std::string::String,
28431
28432    /// A version identifier of the spec which was used to execute this job.
28433    pub spec_version: std::string::String,
28434
28435    /// The trigger type of the data scan job.
28436    pub trigger: crate::model::data_scan_event::Trigger,
28437
28438    /// The scope of the data scan (e.g. full, incremental).
28439    pub scope: crate::model::data_scan_event::Scope,
28440
28441    /// The result of post scan actions.
28442    pub post_scan_actions_result:
28443        std::option::Option<crate::model::data_scan_event::PostScanActionsResult>,
28444
28445    /// The status of publishing the data scan as Dataplex Universal Catalog
28446    /// metadata.
28447    pub catalog_publishing_status:
28448        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
28449
28450    /// The result of the data scan job.
28451    pub result: std::option::Option<crate::model::data_scan_event::Result>,
28452
28453    /// The applied configs in the data scan job.
28454    pub applied_configs: std::option::Option<crate::model::data_scan_event::AppliedConfigs>,
28455
28456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28457}
28458
28459impl DataScanEvent {
28460    pub fn new() -> Self {
28461        std::default::Default::default()
28462    }
28463
28464    /// Sets the value of [data_source][crate::model::DataScanEvent::data_source].
28465    ///
28466    /// # Example
28467    /// ```ignore,no_run
28468    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28469    /// let x = DataScanEvent::new().set_data_source("example");
28470    /// ```
28471    pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28472        self.data_source = v.into();
28473        self
28474    }
28475
28476    /// Sets the value of [job_id][crate::model::DataScanEvent::job_id].
28477    ///
28478    /// # Example
28479    /// ```ignore,no_run
28480    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28481    /// let x = DataScanEvent::new().set_job_id("example");
28482    /// ```
28483    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28484        self.job_id = v.into();
28485        self
28486    }
28487
28488    /// Sets the value of [create_time][crate::model::DataScanEvent::create_time].
28489    ///
28490    /// # Example
28491    /// ```ignore,no_run
28492    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28493    /// use wkt::Timestamp;
28494    /// let x = DataScanEvent::new().set_create_time(Timestamp::default()/* use setters */);
28495    /// ```
28496    pub fn set_create_time<T>(mut self, v: T) -> Self
28497    where
28498        T: std::convert::Into<wkt::Timestamp>,
28499    {
28500        self.create_time = std::option::Option::Some(v.into());
28501        self
28502    }
28503
28504    /// Sets or clears the value of [create_time][crate::model::DataScanEvent::create_time].
28505    ///
28506    /// # Example
28507    /// ```ignore,no_run
28508    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28509    /// use wkt::Timestamp;
28510    /// let x = DataScanEvent::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
28511    /// let x = DataScanEvent::new().set_or_clear_create_time(None::<Timestamp>);
28512    /// ```
28513    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
28514    where
28515        T: std::convert::Into<wkt::Timestamp>,
28516    {
28517        self.create_time = v.map(|x| x.into());
28518        self
28519    }
28520
28521    /// Sets the value of [start_time][crate::model::DataScanEvent::start_time].
28522    ///
28523    /// # Example
28524    /// ```ignore,no_run
28525    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28526    /// use wkt::Timestamp;
28527    /// let x = DataScanEvent::new().set_start_time(Timestamp::default()/* use setters */);
28528    /// ```
28529    pub fn set_start_time<T>(mut self, v: T) -> Self
28530    where
28531        T: std::convert::Into<wkt::Timestamp>,
28532    {
28533        self.start_time = std::option::Option::Some(v.into());
28534        self
28535    }
28536
28537    /// Sets or clears the value of [start_time][crate::model::DataScanEvent::start_time].
28538    ///
28539    /// # Example
28540    /// ```ignore,no_run
28541    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28542    /// use wkt::Timestamp;
28543    /// let x = DataScanEvent::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
28544    /// let x = DataScanEvent::new().set_or_clear_start_time(None::<Timestamp>);
28545    /// ```
28546    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
28547    where
28548        T: std::convert::Into<wkt::Timestamp>,
28549    {
28550        self.start_time = v.map(|x| x.into());
28551        self
28552    }
28553
28554    /// Sets the value of [end_time][crate::model::DataScanEvent::end_time].
28555    ///
28556    /// # Example
28557    /// ```ignore,no_run
28558    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28559    /// use wkt::Timestamp;
28560    /// let x = DataScanEvent::new().set_end_time(Timestamp::default()/* use setters */);
28561    /// ```
28562    pub fn set_end_time<T>(mut self, v: T) -> Self
28563    where
28564        T: std::convert::Into<wkt::Timestamp>,
28565    {
28566        self.end_time = std::option::Option::Some(v.into());
28567        self
28568    }
28569
28570    /// Sets or clears the value of [end_time][crate::model::DataScanEvent::end_time].
28571    ///
28572    /// # Example
28573    /// ```ignore,no_run
28574    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28575    /// use wkt::Timestamp;
28576    /// let x = DataScanEvent::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
28577    /// let x = DataScanEvent::new().set_or_clear_end_time(None::<Timestamp>);
28578    /// ```
28579    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
28580    where
28581        T: std::convert::Into<wkt::Timestamp>,
28582    {
28583        self.end_time = v.map(|x| x.into());
28584        self
28585    }
28586
28587    /// Sets the value of [r#type][crate::model::DataScanEvent::type].
28588    ///
28589    /// # Example
28590    /// ```ignore,no_run
28591    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28592    /// use google_cloud_dataplex_v1::model::data_scan_event::ScanType;
28593    /// let x0 = DataScanEvent::new().set_type(ScanType::DataProfile);
28594    /// let x1 = DataScanEvent::new().set_type(ScanType::DataQuality);
28595    /// let x2 = DataScanEvent::new().set_type(ScanType::DataDiscovery);
28596    /// ```
28597    pub fn set_type<T: std::convert::Into<crate::model::data_scan_event::ScanType>>(
28598        mut self,
28599        v: T,
28600    ) -> Self {
28601        self.r#type = v.into();
28602        self
28603    }
28604
28605    /// Sets the value of [state][crate::model::DataScanEvent::state].
28606    ///
28607    /// # Example
28608    /// ```ignore,no_run
28609    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28610    /// use google_cloud_dataplex_v1::model::data_scan_event::State;
28611    /// let x0 = DataScanEvent::new().set_state(State::Started);
28612    /// let x1 = DataScanEvent::new().set_state(State::Succeeded);
28613    /// let x2 = DataScanEvent::new().set_state(State::Failed);
28614    /// ```
28615    pub fn set_state<T: std::convert::Into<crate::model::data_scan_event::State>>(
28616        mut self,
28617        v: T,
28618    ) -> Self {
28619        self.state = v.into();
28620        self
28621    }
28622
28623    /// Sets the value of [message][crate::model::DataScanEvent::message].
28624    ///
28625    /// # Example
28626    /// ```ignore,no_run
28627    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28628    /// let x = DataScanEvent::new().set_message("example");
28629    /// ```
28630    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28631        self.message = v.into();
28632        self
28633    }
28634
28635    /// Sets the value of [spec_version][crate::model::DataScanEvent::spec_version].
28636    ///
28637    /// # Example
28638    /// ```ignore,no_run
28639    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28640    /// let x = DataScanEvent::new().set_spec_version("example");
28641    /// ```
28642    pub fn set_spec_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28643        self.spec_version = v.into();
28644        self
28645    }
28646
28647    /// Sets the value of [trigger][crate::model::DataScanEvent::trigger].
28648    ///
28649    /// # Example
28650    /// ```ignore,no_run
28651    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28652    /// use google_cloud_dataplex_v1::model::data_scan_event::Trigger;
28653    /// let x0 = DataScanEvent::new().set_trigger(Trigger::OnDemand);
28654    /// let x1 = DataScanEvent::new().set_trigger(Trigger::Schedule);
28655    /// ```
28656    pub fn set_trigger<T: std::convert::Into<crate::model::data_scan_event::Trigger>>(
28657        mut self,
28658        v: T,
28659    ) -> Self {
28660        self.trigger = v.into();
28661        self
28662    }
28663
28664    /// Sets the value of [scope][crate::model::DataScanEvent::scope].
28665    ///
28666    /// # Example
28667    /// ```ignore,no_run
28668    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28669    /// use google_cloud_dataplex_v1::model::data_scan_event::Scope;
28670    /// let x0 = DataScanEvent::new().set_scope(Scope::Full);
28671    /// let x1 = DataScanEvent::new().set_scope(Scope::Incremental);
28672    /// ```
28673    pub fn set_scope<T: std::convert::Into<crate::model::data_scan_event::Scope>>(
28674        mut self,
28675        v: T,
28676    ) -> Self {
28677        self.scope = v.into();
28678        self
28679    }
28680
28681    /// Sets the value of [post_scan_actions_result][crate::model::DataScanEvent::post_scan_actions_result].
28682    ///
28683    /// # Example
28684    /// ```ignore,no_run
28685    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28686    /// use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
28687    /// let x = DataScanEvent::new().set_post_scan_actions_result(PostScanActionsResult::default()/* use setters */);
28688    /// ```
28689    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
28690    where
28691        T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
28692    {
28693        self.post_scan_actions_result = std::option::Option::Some(v.into());
28694        self
28695    }
28696
28697    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataScanEvent::post_scan_actions_result].
28698    ///
28699    /// # Example
28700    /// ```ignore,no_run
28701    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28702    /// use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
28703    /// let x = DataScanEvent::new().set_or_clear_post_scan_actions_result(Some(PostScanActionsResult::default()/* use setters */));
28704    /// let x = DataScanEvent::new().set_or_clear_post_scan_actions_result(None::<PostScanActionsResult>);
28705    /// ```
28706    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
28707    where
28708        T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
28709    {
28710        self.post_scan_actions_result = v.map(|x| x.into());
28711        self
28712    }
28713
28714    /// Sets the value of [catalog_publishing_status][crate::model::DataScanEvent::catalog_publishing_status].
28715    ///
28716    /// # Example
28717    /// ```ignore,no_run
28718    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28719    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
28720    /// let x = DataScanEvent::new().set_catalog_publishing_status(DataScanCatalogPublishingStatus::default()/* use setters */);
28721    /// ```
28722    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
28723    where
28724        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
28725    {
28726        self.catalog_publishing_status = std::option::Option::Some(v.into());
28727        self
28728    }
28729
28730    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataScanEvent::catalog_publishing_status].
28731    ///
28732    /// # Example
28733    /// ```ignore,no_run
28734    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28735    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
28736    /// let x = DataScanEvent::new().set_or_clear_catalog_publishing_status(Some(DataScanCatalogPublishingStatus::default()/* use setters */));
28737    /// let x = DataScanEvent::new().set_or_clear_catalog_publishing_status(None::<DataScanCatalogPublishingStatus>);
28738    /// ```
28739    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
28740    where
28741        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
28742    {
28743        self.catalog_publishing_status = v.map(|x| x.into());
28744        self
28745    }
28746
28747    /// Sets the value of [result][crate::model::DataScanEvent::result].
28748    ///
28749    /// Note that all the setters affecting `result` are mutually
28750    /// exclusive.
28751    ///
28752    /// # Example
28753    /// ```ignore,no_run
28754    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28755    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileResult;
28756    /// let x = DataScanEvent::new().set_result(Some(
28757    ///     google_cloud_dataplex_v1::model::data_scan_event::Result::DataProfile(DataProfileResult::default().into())));
28758    /// ```
28759    pub fn set_result<
28760        T: std::convert::Into<std::option::Option<crate::model::data_scan_event::Result>>,
28761    >(
28762        mut self,
28763        v: T,
28764    ) -> Self {
28765        self.result = v.into();
28766        self
28767    }
28768
28769    /// The value of [result][crate::model::DataScanEvent::result]
28770    /// if it holds a `DataProfile`, `None` if the field is not set or
28771    /// holds a different branch.
28772    pub fn data_profile(
28773        &self,
28774    ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>
28775    {
28776        #[allow(unreachable_patterns)]
28777        self.result.as_ref().and_then(|v| match v {
28778            crate::model::data_scan_event::Result::DataProfile(v) => std::option::Option::Some(v),
28779            _ => std::option::Option::None,
28780        })
28781    }
28782
28783    /// Sets the value of [result][crate::model::DataScanEvent::result]
28784    /// to hold a `DataProfile`.
28785    ///
28786    /// Note that all the setters affecting `result` are
28787    /// mutually exclusive.
28788    ///
28789    /// # Example
28790    /// ```ignore,no_run
28791    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28792    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileResult;
28793    /// let x = DataScanEvent::new().set_data_profile(DataProfileResult::default()/* use setters */);
28794    /// assert!(x.data_profile().is_some());
28795    /// assert!(x.data_quality().is_none());
28796    /// ```
28797    pub fn set_data_profile<
28798        T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>,
28799    >(
28800        mut self,
28801        v: T,
28802    ) -> Self {
28803        self.result =
28804            std::option::Option::Some(crate::model::data_scan_event::Result::DataProfile(v.into()));
28805        self
28806    }
28807
28808    /// The value of [result][crate::model::DataScanEvent::result]
28809    /// if it holds a `DataQuality`, `None` if the field is not set or
28810    /// holds a different branch.
28811    pub fn data_quality(
28812        &self,
28813    ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>
28814    {
28815        #[allow(unreachable_patterns)]
28816        self.result.as_ref().and_then(|v| match v {
28817            crate::model::data_scan_event::Result::DataQuality(v) => std::option::Option::Some(v),
28818            _ => std::option::Option::None,
28819        })
28820    }
28821
28822    /// Sets the value of [result][crate::model::DataScanEvent::result]
28823    /// to hold a `DataQuality`.
28824    ///
28825    /// Note that all the setters affecting `result` are
28826    /// mutually exclusive.
28827    ///
28828    /// # Example
28829    /// ```ignore,no_run
28830    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28831    /// use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
28832    /// let x = DataScanEvent::new().set_data_quality(DataQualityResult::default()/* use setters */);
28833    /// assert!(x.data_quality().is_some());
28834    /// assert!(x.data_profile().is_none());
28835    /// ```
28836    pub fn set_data_quality<
28837        T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>,
28838    >(
28839        mut self,
28840        v: T,
28841    ) -> Self {
28842        self.result =
28843            std::option::Option::Some(crate::model::data_scan_event::Result::DataQuality(v.into()));
28844        self
28845    }
28846
28847    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs].
28848    ///
28849    /// Note that all the setters affecting `applied_configs` are mutually
28850    /// exclusive.
28851    ///
28852    /// # Example
28853    /// ```ignore,no_run
28854    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28855    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
28856    /// let x = DataScanEvent::new().set_applied_configs(Some(
28857    ///     google_cloud_dataplex_v1::model::data_scan_event::AppliedConfigs::DataProfileConfigs(DataProfileAppliedConfigs::default().into())));
28858    /// ```
28859    pub fn set_applied_configs<
28860        T: std::convert::Into<std::option::Option<crate::model::data_scan_event::AppliedConfigs>>,
28861    >(
28862        mut self,
28863        v: T,
28864    ) -> Self {
28865        self.applied_configs = v.into();
28866        self
28867    }
28868
28869    /// The value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28870    /// if it holds a `DataProfileConfigs`, `None` if the field is not set or
28871    /// holds a different branch.
28872    pub fn data_profile_configs(
28873        &self,
28874    ) -> std::option::Option<
28875        &std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
28876    > {
28877        #[allow(unreachable_patterns)]
28878        self.applied_configs.as_ref().and_then(|v| match v {
28879            crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v) => {
28880                std::option::Option::Some(v)
28881            }
28882            _ => std::option::Option::None,
28883        })
28884    }
28885
28886    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28887    /// to hold a `DataProfileConfigs`.
28888    ///
28889    /// Note that all the setters affecting `applied_configs` are
28890    /// mutually exclusive.
28891    ///
28892    /// # Example
28893    /// ```ignore,no_run
28894    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28895    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
28896    /// let x = DataScanEvent::new().set_data_profile_configs(DataProfileAppliedConfigs::default()/* use setters */);
28897    /// assert!(x.data_profile_configs().is_some());
28898    /// assert!(x.data_quality_configs().is_none());
28899    /// ```
28900    pub fn set_data_profile_configs<
28901        T: std::convert::Into<
28902                std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
28903            >,
28904    >(
28905        mut self,
28906        v: T,
28907    ) -> Self {
28908        self.applied_configs = std::option::Option::Some(
28909            crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v.into()),
28910        );
28911        self
28912    }
28913
28914    /// The value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28915    /// if it holds a `DataQualityConfigs`, `None` if the field is not set or
28916    /// holds a different branch.
28917    pub fn data_quality_configs(
28918        &self,
28919    ) -> std::option::Option<
28920        &std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
28921    > {
28922        #[allow(unreachable_patterns)]
28923        self.applied_configs.as_ref().and_then(|v| match v {
28924            crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v) => {
28925                std::option::Option::Some(v)
28926            }
28927            _ => std::option::Option::None,
28928        })
28929    }
28930
28931    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28932    /// to hold a `DataQualityConfigs`.
28933    ///
28934    /// Note that all the setters affecting `applied_configs` are
28935    /// mutually exclusive.
28936    ///
28937    /// # Example
28938    /// ```ignore,no_run
28939    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28940    /// use google_cloud_dataplex_v1::model::data_scan_event::DataQualityAppliedConfigs;
28941    /// let x = DataScanEvent::new().set_data_quality_configs(DataQualityAppliedConfigs::default()/* use setters */);
28942    /// assert!(x.data_quality_configs().is_some());
28943    /// assert!(x.data_profile_configs().is_none());
28944    /// ```
28945    pub fn set_data_quality_configs<
28946        T: std::convert::Into<
28947                std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
28948            >,
28949    >(
28950        mut self,
28951        v: T,
28952    ) -> Self {
28953        self.applied_configs = std::option::Option::Some(
28954            crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v.into()),
28955        );
28956        self
28957    }
28958}
28959
28960impl wkt::message::Message for DataScanEvent {
28961    fn typename() -> &'static str {
28962        "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent"
28963    }
28964}
28965
28966/// Defines additional types related to [DataScanEvent].
28967pub mod data_scan_event {
28968    #[allow(unused_imports)]
28969    use super::*;
28970
28971    /// Data profile result for data scan job.
28972    #[derive(Clone, Default, PartialEq)]
28973    #[non_exhaustive]
28974    pub struct DataProfileResult {
28975        /// The count of rows processed in the data scan job.
28976        pub row_count: i64,
28977
28978        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28979    }
28980
28981    impl DataProfileResult {
28982        pub fn new() -> Self {
28983            std::default::Default::default()
28984        }
28985
28986        /// Sets the value of [row_count][crate::model::data_scan_event::DataProfileResult::row_count].
28987        ///
28988        /// # Example
28989        /// ```ignore,no_run
28990        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileResult;
28991        /// let x = DataProfileResult::new().set_row_count(42);
28992        /// ```
28993        pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28994            self.row_count = v.into();
28995            self
28996        }
28997    }
28998
28999    impl wkt::message::Message for DataProfileResult {
29000        fn typename() -> &'static str {
29001            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"
29002        }
29003    }
29004
29005    /// Data quality result for data scan job.
29006    #[derive(Clone, Default, PartialEq)]
29007    #[non_exhaustive]
29008    pub struct DataQualityResult {
29009        /// The count of rows processed in the data scan job.
29010        pub row_count: i64,
29011
29012        /// Whether the data quality result was `pass` or not.
29013        pub passed: bool,
29014
29015        /// The result of each dimension for data quality result.
29016        /// The key of the map is the name of the dimension.
29017        /// The value is the bool value depicting whether the dimension result was
29018        /// `pass` or not.
29019        pub dimension_passed: std::collections::HashMap<std::string::String, bool>,
29020
29021        /// The table-level data quality score for the data scan job.
29022        ///
29023        /// The data quality score ranges between [0, 100] (up to two decimal
29024        /// points).
29025        pub score: f32,
29026
29027        /// The score of each dimension for data quality result.
29028        /// The key of the map is the name of the dimension.
29029        /// The value is the data quality score for the dimension.
29030        ///
29031        /// The score ranges between [0, 100] (up to two decimal
29032        /// points).
29033        pub dimension_score: std::collections::HashMap<std::string::String, f32>,
29034
29035        /// The score of each column scanned in the data scan job.
29036        /// The key of the map is the name of the column.
29037        /// The value is the data quality score for the column.
29038        ///
29039        /// The score ranges between [0, 100] (up to two decimal
29040        /// points).
29041        pub column_score: std::collections::HashMap<std::string::String, f32>,
29042
29043        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29044    }
29045
29046    impl DataQualityResult {
29047        pub fn new() -> Self {
29048            std::default::Default::default()
29049        }
29050
29051        /// Sets the value of [row_count][crate::model::data_scan_event::DataQualityResult::row_count].
29052        ///
29053        /// # Example
29054        /// ```ignore,no_run
29055        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29056        /// let x = DataQualityResult::new().set_row_count(42);
29057        /// ```
29058        pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
29059            self.row_count = v.into();
29060            self
29061        }
29062
29063        /// Sets the value of [passed][crate::model::data_scan_event::DataQualityResult::passed].
29064        ///
29065        /// # Example
29066        /// ```ignore,no_run
29067        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29068        /// let x = DataQualityResult::new().set_passed(true);
29069        /// ```
29070        pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29071            self.passed = v.into();
29072            self
29073        }
29074
29075        /// Sets the value of [dimension_passed][crate::model::data_scan_event::DataQualityResult::dimension_passed].
29076        ///
29077        /// # Example
29078        /// ```ignore,no_run
29079        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29080        /// let x = DataQualityResult::new().set_dimension_passed([
29081        ///     ("key0", true),
29082        ///     ("key1", false),
29083        /// ]);
29084        /// ```
29085        pub fn set_dimension_passed<T, K, V>(mut self, v: T) -> Self
29086        where
29087            T: std::iter::IntoIterator<Item = (K, V)>,
29088            K: std::convert::Into<std::string::String>,
29089            V: std::convert::Into<bool>,
29090        {
29091            use std::iter::Iterator;
29092            self.dimension_passed = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29093            self
29094        }
29095
29096        /// Sets the value of [score][crate::model::data_scan_event::DataQualityResult::score].
29097        ///
29098        /// # Example
29099        /// ```ignore,no_run
29100        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29101        /// let x = DataQualityResult::new().set_score(42.0);
29102        /// ```
29103        pub fn set_score<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
29104            self.score = v.into();
29105            self
29106        }
29107
29108        /// Sets the value of [dimension_score][crate::model::data_scan_event::DataQualityResult::dimension_score].
29109        ///
29110        /// # Example
29111        /// ```ignore,no_run
29112        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29113        /// let x = DataQualityResult::new().set_dimension_score([
29114        ///     ("key0", 123.5),
29115        ///     ("key1", 456.5),
29116        /// ]);
29117        /// ```
29118        pub fn set_dimension_score<T, K, V>(mut self, v: T) -> Self
29119        where
29120            T: std::iter::IntoIterator<Item = (K, V)>,
29121            K: std::convert::Into<std::string::String>,
29122            V: std::convert::Into<f32>,
29123        {
29124            use std::iter::Iterator;
29125            self.dimension_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29126            self
29127        }
29128
29129        /// Sets the value of [column_score][crate::model::data_scan_event::DataQualityResult::column_score].
29130        ///
29131        /// # Example
29132        /// ```ignore,no_run
29133        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29134        /// let x = DataQualityResult::new().set_column_score([
29135        ///     ("key0", 123.5),
29136        ///     ("key1", 456.5),
29137        /// ]);
29138        /// ```
29139        pub fn set_column_score<T, K, V>(mut self, v: T) -> Self
29140        where
29141            T: std::iter::IntoIterator<Item = (K, V)>,
29142            K: std::convert::Into<std::string::String>,
29143            V: std::convert::Into<f32>,
29144        {
29145            use std::iter::Iterator;
29146            self.column_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29147            self
29148        }
29149    }
29150
29151    impl wkt::message::Message for DataQualityResult {
29152        fn typename() -> &'static str {
29153            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"
29154        }
29155    }
29156
29157    /// Applied configs for data profile type data scan job.
29158    #[derive(Clone, Default, PartialEq)]
29159    #[non_exhaustive]
29160    pub struct DataProfileAppliedConfigs {
29161        /// The percentage of the records selected from the dataset for DataScan.
29162        ///
29163        /// * Value ranges between 0.0 and 100.0.
29164        /// * Value 0.0 or 100.0 imply that sampling was not applied.
29165        pub sampling_percent: f32,
29166
29167        /// Boolean indicating whether a row filter was applied in the DataScan job.
29168        pub row_filter_applied: bool,
29169
29170        /// Boolean indicating whether a column filter was applied in the DataScan
29171        /// job.
29172        pub column_filter_applied: bool,
29173
29174        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29175    }
29176
29177    impl DataProfileAppliedConfigs {
29178        pub fn new() -> Self {
29179            std::default::Default::default()
29180        }
29181
29182        /// Sets the value of [sampling_percent][crate::model::data_scan_event::DataProfileAppliedConfigs::sampling_percent].
29183        ///
29184        /// # Example
29185        /// ```ignore,no_run
29186        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
29187        /// let x = DataProfileAppliedConfigs::new().set_sampling_percent(42.0);
29188        /// ```
29189        pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
29190            self.sampling_percent = v.into();
29191            self
29192        }
29193
29194        /// Sets the value of [row_filter_applied][crate::model::data_scan_event::DataProfileAppliedConfigs::row_filter_applied].
29195        ///
29196        /// # Example
29197        /// ```ignore,no_run
29198        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
29199        /// let x = DataProfileAppliedConfigs::new().set_row_filter_applied(true);
29200        /// ```
29201        pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29202            self.row_filter_applied = v.into();
29203            self
29204        }
29205
29206        /// Sets the value of [column_filter_applied][crate::model::data_scan_event::DataProfileAppliedConfigs::column_filter_applied].
29207        ///
29208        /// # Example
29209        /// ```ignore,no_run
29210        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
29211        /// let x = DataProfileAppliedConfigs::new().set_column_filter_applied(true);
29212        /// ```
29213        pub fn set_column_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29214            self.column_filter_applied = v.into();
29215            self
29216        }
29217    }
29218
29219    impl wkt::message::Message for DataProfileAppliedConfigs {
29220        fn typename() -> &'static str {
29221            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs"
29222        }
29223    }
29224
29225    /// Applied configs for data quality type data scan job.
29226    #[derive(Clone, Default, PartialEq)]
29227    #[non_exhaustive]
29228    pub struct DataQualityAppliedConfigs {
29229        /// The percentage of the records selected from the dataset for DataScan.
29230        ///
29231        /// * Value ranges between 0.0 and 100.0.
29232        /// * Value 0.0 or 100.0 imply that sampling was not applied.
29233        pub sampling_percent: f32,
29234
29235        /// Boolean indicating whether a row filter was applied in the DataScan job.
29236        pub row_filter_applied: bool,
29237
29238        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29239    }
29240
29241    impl DataQualityAppliedConfigs {
29242        pub fn new() -> Self {
29243            std::default::Default::default()
29244        }
29245
29246        /// Sets the value of [sampling_percent][crate::model::data_scan_event::DataQualityAppliedConfigs::sampling_percent].
29247        ///
29248        /// # Example
29249        /// ```ignore,no_run
29250        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityAppliedConfigs;
29251        /// let x = DataQualityAppliedConfigs::new().set_sampling_percent(42.0);
29252        /// ```
29253        pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
29254            self.sampling_percent = v.into();
29255            self
29256        }
29257
29258        /// Sets the value of [row_filter_applied][crate::model::data_scan_event::DataQualityAppliedConfigs::row_filter_applied].
29259        ///
29260        /// # Example
29261        /// ```ignore,no_run
29262        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityAppliedConfigs;
29263        /// let x = DataQualityAppliedConfigs::new().set_row_filter_applied(true);
29264        /// ```
29265        pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29266            self.row_filter_applied = v.into();
29267            self
29268        }
29269    }
29270
29271    impl wkt::message::Message for DataQualityAppliedConfigs {
29272        fn typename() -> &'static str {
29273            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs"
29274        }
29275    }
29276
29277    /// Post scan actions result for data scan job.
29278    #[derive(Clone, Default, PartialEq)]
29279    #[non_exhaustive]
29280    pub struct PostScanActionsResult {
29281        /// The result of BigQuery export post scan action.
29282        pub bigquery_export_result: std::option::Option<
29283            crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
29284        >,
29285
29286        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29287    }
29288
29289    impl PostScanActionsResult {
29290        pub fn new() -> Self {
29291            std::default::Default::default()
29292        }
29293
29294        /// Sets the value of [bigquery_export_result][crate::model::data_scan_event::PostScanActionsResult::bigquery_export_result].
29295        ///
29296        /// # Example
29297        /// ```ignore,no_run
29298        /// # use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
29299        /// use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29300        /// let x = PostScanActionsResult::new().set_bigquery_export_result(BigQueryExportResult::default()/* use setters */);
29301        /// ```
29302        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
29303        where
29304            T: std::convert::Into<
29305                    crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
29306                >,
29307        {
29308            self.bigquery_export_result = std::option::Option::Some(v.into());
29309            self
29310        }
29311
29312        /// Sets or clears the value of [bigquery_export_result][crate::model::data_scan_event::PostScanActionsResult::bigquery_export_result].
29313        ///
29314        /// # Example
29315        /// ```ignore,no_run
29316        /// # use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
29317        /// use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29318        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(Some(BigQueryExportResult::default()/* use setters */));
29319        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(None::<BigQueryExportResult>);
29320        /// ```
29321        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
29322        where
29323            T: std::convert::Into<
29324                    crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
29325                >,
29326        {
29327            self.bigquery_export_result = v.map(|x| x.into());
29328            self
29329        }
29330    }
29331
29332    impl wkt::message::Message for PostScanActionsResult {
29333        fn typename() -> &'static str {
29334            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult"
29335        }
29336    }
29337
29338    /// Defines additional types related to [PostScanActionsResult].
29339    pub mod post_scan_actions_result {
29340        #[allow(unused_imports)]
29341        use super::*;
29342
29343        /// The result of BigQuery export post scan action.
29344        #[derive(Clone, Default, PartialEq)]
29345        #[non_exhaustive]
29346        pub struct BigQueryExportResult {
29347
29348            /// Execution state for the BigQuery exporting.
29349            pub state: crate::model::data_scan_event::post_scan_actions_result::big_query_export_result::State,
29350
29351            /// Additional information about the BigQuery exporting.
29352            pub message: std::string::String,
29353
29354            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29355        }
29356
29357        impl BigQueryExportResult {
29358            pub fn new() -> Self {
29359                std::default::Default::default()
29360            }
29361
29362            /// Sets the value of [state][crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult::state].
29363            ///
29364            /// # Example
29365            /// ```ignore,no_run
29366            /// # use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29367            /// use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::big_query_export_result::State;
29368            /// let x0 = BigQueryExportResult::new().set_state(State::Succeeded);
29369            /// let x1 = BigQueryExportResult::new().set_state(State::Failed);
29370            /// let x2 = BigQueryExportResult::new().set_state(State::Skipped);
29371            /// ```
29372            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{
29373                self.state = v.into();
29374                self
29375            }
29376
29377            /// Sets the value of [message][crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult::message].
29378            ///
29379            /// # Example
29380            /// ```ignore,no_run
29381            /// # use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29382            /// let x = BigQueryExportResult::new().set_message("example");
29383            /// ```
29384            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29385                self.message = v.into();
29386                self
29387            }
29388        }
29389
29390        impl wkt::message::Message for BigQueryExportResult {
29391            fn typename() -> &'static str {
29392                "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult"
29393            }
29394        }
29395
29396        /// Defines additional types related to [BigQueryExportResult].
29397        pub mod big_query_export_result {
29398            #[allow(unused_imports)]
29399            use super::*;
29400
29401            /// Execution state for the exporting.
29402            ///
29403            /// # Working with unknown values
29404            ///
29405            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29406            /// additional enum variants at any time. Adding new variants is not considered
29407            /// a breaking change. Applications should write their code in anticipation of:
29408            ///
29409            /// - New values appearing in future releases of the client library, **and**
29410            /// - New values received dynamically, without application changes.
29411            ///
29412            /// Please consult the [Working with enums] section in the user guide for some
29413            /// guidelines.
29414            ///
29415            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29416            #[derive(Clone, Debug, PartialEq)]
29417            #[non_exhaustive]
29418            pub enum State {
29419                /// The exporting state is unspecified.
29420                Unspecified,
29421                /// The exporting completed successfully.
29422                Succeeded,
29423                /// The exporting is no longer running due to an error.
29424                Failed,
29425                /// The exporting is skipped due to no valid scan result to export
29426                /// (usually caused by scan failed).
29427                Skipped,
29428                /// If set, the enum was initialized with an unknown value.
29429                ///
29430                /// Applications can examine the value using [State::value] or
29431                /// [State::name].
29432                UnknownValue(state::UnknownValue),
29433            }
29434
29435            #[doc(hidden)]
29436            pub mod state {
29437                #[allow(unused_imports)]
29438                use super::*;
29439                #[derive(Clone, Debug, PartialEq)]
29440                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29441            }
29442
29443            impl State {
29444                /// Gets the enum value.
29445                ///
29446                /// Returns `None` if the enum contains an unknown value deserialized from
29447                /// the string representation of enums.
29448                pub fn value(&self) -> std::option::Option<i32> {
29449                    match self {
29450                        Self::Unspecified => std::option::Option::Some(0),
29451                        Self::Succeeded => std::option::Option::Some(1),
29452                        Self::Failed => std::option::Option::Some(2),
29453                        Self::Skipped => std::option::Option::Some(3),
29454                        Self::UnknownValue(u) => u.0.value(),
29455                    }
29456                }
29457
29458                /// Gets the enum value as a string.
29459                ///
29460                /// Returns `None` if the enum contains an unknown value deserialized from
29461                /// the integer representation of enums.
29462                pub fn name(&self) -> std::option::Option<&str> {
29463                    match self {
29464                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
29465                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
29466                        Self::Failed => std::option::Option::Some("FAILED"),
29467                        Self::Skipped => std::option::Option::Some("SKIPPED"),
29468                        Self::UnknownValue(u) => u.0.name(),
29469                    }
29470                }
29471            }
29472
29473            impl std::default::Default for State {
29474                fn default() -> Self {
29475                    use std::convert::From;
29476                    Self::from(0)
29477                }
29478            }
29479
29480            impl std::fmt::Display for State {
29481                fn fmt(
29482                    &self,
29483                    f: &mut std::fmt::Formatter<'_>,
29484                ) -> std::result::Result<(), std::fmt::Error> {
29485                    wkt::internal::display_enum(f, self.name(), self.value())
29486                }
29487            }
29488
29489            impl std::convert::From<i32> for State {
29490                fn from(value: i32) -> Self {
29491                    match value {
29492                        0 => Self::Unspecified,
29493                        1 => Self::Succeeded,
29494                        2 => Self::Failed,
29495                        3 => Self::Skipped,
29496                        _ => Self::UnknownValue(state::UnknownValue(
29497                            wkt::internal::UnknownEnumValue::Integer(value),
29498                        )),
29499                    }
29500                }
29501            }
29502
29503            impl std::convert::From<&str> for State {
29504                fn from(value: &str) -> Self {
29505                    use std::string::ToString;
29506                    match value {
29507                        "STATE_UNSPECIFIED" => Self::Unspecified,
29508                        "SUCCEEDED" => Self::Succeeded,
29509                        "FAILED" => Self::Failed,
29510                        "SKIPPED" => Self::Skipped,
29511                        _ => Self::UnknownValue(state::UnknownValue(
29512                            wkt::internal::UnknownEnumValue::String(value.to_string()),
29513                        )),
29514                    }
29515                }
29516            }
29517
29518            impl serde::ser::Serialize for State {
29519                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29520                where
29521                    S: serde::Serializer,
29522                {
29523                    match self {
29524                        Self::Unspecified => serializer.serialize_i32(0),
29525                        Self::Succeeded => serializer.serialize_i32(1),
29526                        Self::Failed => serializer.serialize_i32(2),
29527                        Self::Skipped => serializer.serialize_i32(3),
29528                        Self::UnknownValue(u) => u.0.serialize(serializer),
29529                    }
29530                }
29531            }
29532
29533            impl<'de> serde::de::Deserialize<'de> for State {
29534                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29535                where
29536                    D: serde::Deserializer<'de>,
29537                {
29538                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
29539                        ".google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State"))
29540                }
29541            }
29542        }
29543    }
29544
29545    /// The type of the data scan.
29546    ///
29547    /// # Working with unknown values
29548    ///
29549    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29550    /// additional enum variants at any time. Adding new variants is not considered
29551    /// a breaking change. Applications should write their code in anticipation of:
29552    ///
29553    /// - New values appearing in future releases of the client library, **and**
29554    /// - New values received dynamically, without application changes.
29555    ///
29556    /// Please consult the [Working with enums] section in the user guide for some
29557    /// guidelines.
29558    ///
29559    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29560    #[derive(Clone, Debug, PartialEq)]
29561    #[non_exhaustive]
29562    pub enum ScanType {
29563        /// An unspecified data scan type.
29564        Unspecified,
29565        /// Data scan for data profile.
29566        DataProfile,
29567        /// Data scan for data quality.
29568        DataQuality,
29569        /// Data scan for data discovery.
29570        DataDiscovery,
29571        /// If set, the enum was initialized with an unknown value.
29572        ///
29573        /// Applications can examine the value using [ScanType::value] or
29574        /// [ScanType::name].
29575        UnknownValue(scan_type::UnknownValue),
29576    }
29577
29578    #[doc(hidden)]
29579    pub mod scan_type {
29580        #[allow(unused_imports)]
29581        use super::*;
29582        #[derive(Clone, Debug, PartialEq)]
29583        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29584    }
29585
29586    impl ScanType {
29587        /// Gets the enum value.
29588        ///
29589        /// Returns `None` if the enum contains an unknown value deserialized from
29590        /// the string representation of enums.
29591        pub fn value(&self) -> std::option::Option<i32> {
29592            match self {
29593                Self::Unspecified => std::option::Option::Some(0),
29594                Self::DataProfile => std::option::Option::Some(1),
29595                Self::DataQuality => std::option::Option::Some(2),
29596                Self::DataDiscovery => std::option::Option::Some(4),
29597                Self::UnknownValue(u) => u.0.value(),
29598            }
29599        }
29600
29601        /// Gets the enum value as a string.
29602        ///
29603        /// Returns `None` if the enum contains an unknown value deserialized from
29604        /// the integer representation of enums.
29605        pub fn name(&self) -> std::option::Option<&str> {
29606            match self {
29607                Self::Unspecified => std::option::Option::Some("SCAN_TYPE_UNSPECIFIED"),
29608                Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
29609                Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
29610                Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
29611                Self::UnknownValue(u) => u.0.name(),
29612            }
29613        }
29614    }
29615
29616    impl std::default::Default for ScanType {
29617        fn default() -> Self {
29618            use std::convert::From;
29619            Self::from(0)
29620        }
29621    }
29622
29623    impl std::fmt::Display for ScanType {
29624        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29625            wkt::internal::display_enum(f, self.name(), self.value())
29626        }
29627    }
29628
29629    impl std::convert::From<i32> for ScanType {
29630        fn from(value: i32) -> Self {
29631            match value {
29632                0 => Self::Unspecified,
29633                1 => Self::DataProfile,
29634                2 => Self::DataQuality,
29635                4 => Self::DataDiscovery,
29636                _ => Self::UnknownValue(scan_type::UnknownValue(
29637                    wkt::internal::UnknownEnumValue::Integer(value),
29638                )),
29639            }
29640        }
29641    }
29642
29643    impl std::convert::From<&str> for ScanType {
29644        fn from(value: &str) -> Self {
29645            use std::string::ToString;
29646            match value {
29647                "SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
29648                "DATA_PROFILE" => Self::DataProfile,
29649                "DATA_QUALITY" => Self::DataQuality,
29650                "DATA_DISCOVERY" => Self::DataDiscovery,
29651                _ => Self::UnknownValue(scan_type::UnknownValue(
29652                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29653                )),
29654            }
29655        }
29656    }
29657
29658    impl serde::ser::Serialize for ScanType {
29659        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29660        where
29661            S: serde::Serializer,
29662        {
29663            match self {
29664                Self::Unspecified => serializer.serialize_i32(0),
29665                Self::DataProfile => serializer.serialize_i32(1),
29666                Self::DataQuality => serializer.serialize_i32(2),
29667                Self::DataDiscovery => serializer.serialize_i32(4),
29668                Self::UnknownValue(u) => u.0.serialize(serializer),
29669            }
29670        }
29671    }
29672
29673    impl<'de> serde::de::Deserialize<'de> for ScanType {
29674        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29675        where
29676            D: serde::Deserializer<'de>,
29677        {
29678            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ScanType>::new(
29679                ".google.cloud.dataplex.v1.DataScanEvent.ScanType",
29680            ))
29681        }
29682    }
29683
29684    /// The job state of the data scan.
29685    ///
29686    /// # Working with unknown values
29687    ///
29688    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29689    /// additional enum variants at any time. Adding new variants is not considered
29690    /// a breaking change. Applications should write their code in anticipation of:
29691    ///
29692    /// - New values appearing in future releases of the client library, **and**
29693    /// - New values received dynamically, without application changes.
29694    ///
29695    /// Please consult the [Working with enums] section in the user guide for some
29696    /// guidelines.
29697    ///
29698    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29699    #[derive(Clone, Debug, PartialEq)]
29700    #[non_exhaustive]
29701    pub enum State {
29702        /// Unspecified job state.
29703        Unspecified,
29704        /// Data scan job started.
29705        Started,
29706        /// Data scan job successfully completed.
29707        Succeeded,
29708        /// Data scan job was unsuccessful.
29709        Failed,
29710        /// Data scan job was cancelled.
29711        Cancelled,
29712        /// Data scan job was created.
29713        Created,
29714        /// If set, the enum was initialized with an unknown value.
29715        ///
29716        /// Applications can examine the value using [State::value] or
29717        /// [State::name].
29718        UnknownValue(state::UnknownValue),
29719    }
29720
29721    #[doc(hidden)]
29722    pub mod state {
29723        #[allow(unused_imports)]
29724        use super::*;
29725        #[derive(Clone, Debug, PartialEq)]
29726        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29727    }
29728
29729    impl State {
29730        /// Gets the enum value.
29731        ///
29732        /// Returns `None` if the enum contains an unknown value deserialized from
29733        /// the string representation of enums.
29734        pub fn value(&self) -> std::option::Option<i32> {
29735            match self {
29736                Self::Unspecified => std::option::Option::Some(0),
29737                Self::Started => std::option::Option::Some(1),
29738                Self::Succeeded => std::option::Option::Some(2),
29739                Self::Failed => std::option::Option::Some(3),
29740                Self::Cancelled => std::option::Option::Some(4),
29741                Self::Created => std::option::Option::Some(5),
29742                Self::UnknownValue(u) => u.0.value(),
29743            }
29744        }
29745
29746        /// Gets the enum value as a string.
29747        ///
29748        /// Returns `None` if the enum contains an unknown value deserialized from
29749        /// the integer representation of enums.
29750        pub fn name(&self) -> std::option::Option<&str> {
29751            match self {
29752                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
29753                Self::Started => std::option::Option::Some("STARTED"),
29754                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
29755                Self::Failed => std::option::Option::Some("FAILED"),
29756                Self::Cancelled => std::option::Option::Some("CANCELLED"),
29757                Self::Created => std::option::Option::Some("CREATED"),
29758                Self::UnknownValue(u) => u.0.name(),
29759            }
29760        }
29761    }
29762
29763    impl std::default::Default for State {
29764        fn default() -> Self {
29765            use std::convert::From;
29766            Self::from(0)
29767        }
29768    }
29769
29770    impl std::fmt::Display for State {
29771        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29772            wkt::internal::display_enum(f, self.name(), self.value())
29773        }
29774    }
29775
29776    impl std::convert::From<i32> for State {
29777        fn from(value: i32) -> Self {
29778            match value {
29779                0 => Self::Unspecified,
29780                1 => Self::Started,
29781                2 => Self::Succeeded,
29782                3 => Self::Failed,
29783                4 => Self::Cancelled,
29784                5 => Self::Created,
29785                _ => Self::UnknownValue(state::UnknownValue(
29786                    wkt::internal::UnknownEnumValue::Integer(value),
29787                )),
29788            }
29789        }
29790    }
29791
29792    impl std::convert::From<&str> for State {
29793        fn from(value: &str) -> Self {
29794            use std::string::ToString;
29795            match value {
29796                "STATE_UNSPECIFIED" => Self::Unspecified,
29797                "STARTED" => Self::Started,
29798                "SUCCEEDED" => Self::Succeeded,
29799                "FAILED" => Self::Failed,
29800                "CANCELLED" => Self::Cancelled,
29801                "CREATED" => Self::Created,
29802                _ => Self::UnknownValue(state::UnknownValue(
29803                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29804                )),
29805            }
29806        }
29807    }
29808
29809    impl serde::ser::Serialize for State {
29810        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29811        where
29812            S: serde::Serializer,
29813        {
29814            match self {
29815                Self::Unspecified => serializer.serialize_i32(0),
29816                Self::Started => serializer.serialize_i32(1),
29817                Self::Succeeded => serializer.serialize_i32(2),
29818                Self::Failed => serializer.serialize_i32(3),
29819                Self::Cancelled => serializer.serialize_i32(4),
29820                Self::Created => serializer.serialize_i32(5),
29821                Self::UnknownValue(u) => u.0.serialize(serializer),
29822            }
29823        }
29824    }
29825
29826    impl<'de> serde::de::Deserialize<'de> for State {
29827        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29828        where
29829            D: serde::Deserializer<'de>,
29830        {
29831            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
29832                ".google.cloud.dataplex.v1.DataScanEvent.State",
29833            ))
29834        }
29835    }
29836
29837    /// The trigger type for the data scan.
29838    ///
29839    /// # Working with unknown values
29840    ///
29841    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29842    /// additional enum variants at any time. Adding new variants is not considered
29843    /// a breaking change. Applications should write their code in anticipation of:
29844    ///
29845    /// - New values appearing in future releases of the client library, **and**
29846    /// - New values received dynamically, without application changes.
29847    ///
29848    /// Please consult the [Working with enums] section in the user guide for some
29849    /// guidelines.
29850    ///
29851    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29852    #[derive(Clone, Debug, PartialEq)]
29853    #[non_exhaustive]
29854    pub enum Trigger {
29855        /// An unspecified trigger type.
29856        Unspecified,
29857        /// Data scan triggers on demand.
29858        OnDemand,
29859        /// Data scan triggers as per schedule.
29860        Schedule,
29861        /// If set, the enum was initialized with an unknown value.
29862        ///
29863        /// Applications can examine the value using [Trigger::value] or
29864        /// [Trigger::name].
29865        UnknownValue(trigger::UnknownValue),
29866    }
29867
29868    #[doc(hidden)]
29869    pub mod trigger {
29870        #[allow(unused_imports)]
29871        use super::*;
29872        #[derive(Clone, Debug, PartialEq)]
29873        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29874    }
29875
29876    impl Trigger {
29877        /// Gets the enum value.
29878        ///
29879        /// Returns `None` if the enum contains an unknown value deserialized from
29880        /// the string representation of enums.
29881        pub fn value(&self) -> std::option::Option<i32> {
29882            match self {
29883                Self::Unspecified => std::option::Option::Some(0),
29884                Self::OnDemand => std::option::Option::Some(1),
29885                Self::Schedule => std::option::Option::Some(2),
29886                Self::UnknownValue(u) => u.0.value(),
29887            }
29888        }
29889
29890        /// Gets the enum value as a string.
29891        ///
29892        /// Returns `None` if the enum contains an unknown value deserialized from
29893        /// the integer representation of enums.
29894        pub fn name(&self) -> std::option::Option<&str> {
29895            match self {
29896                Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
29897                Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
29898                Self::Schedule => std::option::Option::Some("SCHEDULE"),
29899                Self::UnknownValue(u) => u.0.name(),
29900            }
29901        }
29902    }
29903
29904    impl std::default::Default for Trigger {
29905        fn default() -> Self {
29906            use std::convert::From;
29907            Self::from(0)
29908        }
29909    }
29910
29911    impl std::fmt::Display for Trigger {
29912        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29913            wkt::internal::display_enum(f, self.name(), self.value())
29914        }
29915    }
29916
29917    impl std::convert::From<i32> for Trigger {
29918        fn from(value: i32) -> Self {
29919            match value {
29920                0 => Self::Unspecified,
29921                1 => Self::OnDemand,
29922                2 => Self::Schedule,
29923                _ => Self::UnknownValue(trigger::UnknownValue(
29924                    wkt::internal::UnknownEnumValue::Integer(value),
29925                )),
29926            }
29927        }
29928    }
29929
29930    impl std::convert::From<&str> for Trigger {
29931        fn from(value: &str) -> Self {
29932            use std::string::ToString;
29933            match value {
29934                "TRIGGER_UNSPECIFIED" => Self::Unspecified,
29935                "ON_DEMAND" => Self::OnDemand,
29936                "SCHEDULE" => Self::Schedule,
29937                _ => Self::UnknownValue(trigger::UnknownValue(
29938                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29939                )),
29940            }
29941        }
29942    }
29943
29944    impl serde::ser::Serialize for Trigger {
29945        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29946        where
29947            S: serde::Serializer,
29948        {
29949            match self {
29950                Self::Unspecified => serializer.serialize_i32(0),
29951                Self::OnDemand => serializer.serialize_i32(1),
29952                Self::Schedule => serializer.serialize_i32(2),
29953                Self::UnknownValue(u) => u.0.serialize(serializer),
29954            }
29955        }
29956    }
29957
29958    impl<'de> serde::de::Deserialize<'de> for Trigger {
29959        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29960        where
29961            D: serde::Deserializer<'de>,
29962        {
29963            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
29964                ".google.cloud.dataplex.v1.DataScanEvent.Trigger",
29965            ))
29966        }
29967    }
29968
29969    /// The scope of job for the data scan.
29970    ///
29971    /// # Working with unknown values
29972    ///
29973    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29974    /// additional enum variants at any time. Adding new variants is not considered
29975    /// a breaking change. Applications should write their code in anticipation of:
29976    ///
29977    /// - New values appearing in future releases of the client library, **and**
29978    /// - New values received dynamically, without application changes.
29979    ///
29980    /// Please consult the [Working with enums] section in the user guide for some
29981    /// guidelines.
29982    ///
29983    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29984    #[derive(Clone, Debug, PartialEq)]
29985    #[non_exhaustive]
29986    pub enum Scope {
29987        /// An unspecified scope type.
29988        Unspecified,
29989        /// Data scan runs on all of the data.
29990        Full,
29991        /// Data scan runs on incremental data.
29992        Incremental,
29993        /// If set, the enum was initialized with an unknown value.
29994        ///
29995        /// Applications can examine the value using [Scope::value] or
29996        /// [Scope::name].
29997        UnknownValue(scope::UnknownValue),
29998    }
29999
30000    #[doc(hidden)]
30001    pub mod scope {
30002        #[allow(unused_imports)]
30003        use super::*;
30004        #[derive(Clone, Debug, PartialEq)]
30005        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30006    }
30007
30008    impl Scope {
30009        /// Gets the enum value.
30010        ///
30011        /// Returns `None` if the enum contains an unknown value deserialized from
30012        /// the string representation of enums.
30013        pub fn value(&self) -> std::option::Option<i32> {
30014            match self {
30015                Self::Unspecified => std::option::Option::Some(0),
30016                Self::Full => std::option::Option::Some(1),
30017                Self::Incremental => std::option::Option::Some(2),
30018                Self::UnknownValue(u) => u.0.value(),
30019            }
30020        }
30021
30022        /// Gets the enum value as a string.
30023        ///
30024        /// Returns `None` if the enum contains an unknown value deserialized from
30025        /// the integer representation of enums.
30026        pub fn name(&self) -> std::option::Option<&str> {
30027            match self {
30028                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
30029                Self::Full => std::option::Option::Some("FULL"),
30030                Self::Incremental => std::option::Option::Some("INCREMENTAL"),
30031                Self::UnknownValue(u) => u.0.name(),
30032            }
30033        }
30034    }
30035
30036    impl std::default::Default for Scope {
30037        fn default() -> Self {
30038            use std::convert::From;
30039            Self::from(0)
30040        }
30041    }
30042
30043    impl std::fmt::Display for Scope {
30044        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30045            wkt::internal::display_enum(f, self.name(), self.value())
30046        }
30047    }
30048
30049    impl std::convert::From<i32> for Scope {
30050        fn from(value: i32) -> Self {
30051            match value {
30052                0 => Self::Unspecified,
30053                1 => Self::Full,
30054                2 => Self::Incremental,
30055                _ => Self::UnknownValue(scope::UnknownValue(
30056                    wkt::internal::UnknownEnumValue::Integer(value),
30057                )),
30058            }
30059        }
30060    }
30061
30062    impl std::convert::From<&str> for Scope {
30063        fn from(value: &str) -> Self {
30064            use std::string::ToString;
30065            match value {
30066                "SCOPE_UNSPECIFIED" => Self::Unspecified,
30067                "FULL" => Self::Full,
30068                "INCREMENTAL" => Self::Incremental,
30069                _ => Self::UnknownValue(scope::UnknownValue(
30070                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30071                )),
30072            }
30073        }
30074    }
30075
30076    impl serde::ser::Serialize for Scope {
30077        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30078        where
30079            S: serde::Serializer,
30080        {
30081            match self {
30082                Self::Unspecified => serializer.serialize_i32(0),
30083                Self::Full => serializer.serialize_i32(1),
30084                Self::Incremental => serializer.serialize_i32(2),
30085                Self::UnknownValue(u) => u.0.serialize(serializer),
30086            }
30087        }
30088    }
30089
30090    impl<'de> serde::de::Deserialize<'de> for Scope {
30091        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30092        where
30093            D: serde::Deserializer<'de>,
30094        {
30095            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
30096                ".google.cloud.dataplex.v1.DataScanEvent.Scope",
30097            ))
30098        }
30099    }
30100
30101    /// The result of the data scan job.
30102    #[derive(Clone, Debug, PartialEq)]
30103    #[non_exhaustive]
30104    pub enum Result {
30105        /// Data profile result for data profile type data scan.
30106        DataProfile(std::boxed::Box<crate::model::data_scan_event::DataProfileResult>),
30107        /// Data quality result for data quality type data scan.
30108        DataQuality(std::boxed::Box<crate::model::data_scan_event::DataQualityResult>),
30109    }
30110
30111    /// The applied configs in the data scan job.
30112    #[derive(Clone, Debug, PartialEq)]
30113    #[non_exhaustive]
30114    pub enum AppliedConfigs {
30115        /// Applied configs for data profile type data scan.
30116        DataProfileConfigs(
30117            std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
30118        ),
30119        /// Applied configs for data quality type data scan.
30120        DataQualityConfigs(
30121            std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
30122        ),
30123    }
30124}
30125
30126/// Information about the result of a data quality rule for data quality scan.
30127/// The monitored resource is 'DataScan'.
30128#[derive(Clone, Default, PartialEq)]
30129#[non_exhaustive]
30130pub struct DataQualityScanRuleResult {
30131    /// Identifier of the specific data scan job this log entry is for.
30132    pub job_id: std::string::String,
30133
30134    /// The data source of the data scan (e.g. BigQuery table name).
30135    pub data_source: std::string::String,
30136
30137    /// The column which this rule is evaluated against.
30138    pub column: std::string::String,
30139
30140    /// The name of the data quality rule.
30141    pub rule_name: std::string::String,
30142
30143    /// The type of the data quality rule.
30144    pub rule_type: crate::model::data_quality_scan_rule_result::RuleType,
30145
30146    /// The evaluation type of the data quality rule.
30147    pub evalution_type: crate::model::data_quality_scan_rule_result::EvaluationType,
30148
30149    /// The dimension of the data quality rule.
30150    pub rule_dimension: std::string::String,
30151
30152    /// The passing threshold ([0.0, 100.0]) of the data quality rule.
30153    pub threshold_percent: f64,
30154
30155    /// The result of the data quality rule.
30156    pub result: crate::model::data_quality_scan_rule_result::Result,
30157
30158    /// The number of rows evaluated against the data quality rule.
30159    /// This field is only valid for rules of PER_ROW evaluation type.
30160    pub evaluated_row_count: i64,
30161
30162    /// The number of rows which passed a rule evaluation.
30163    /// This field is only valid for rules of PER_ROW evaluation type.
30164    pub passed_row_count: i64,
30165
30166    /// The number of rows with null values in the specified column.
30167    pub null_row_count: i64,
30168
30169    /// The number of rows returned by the SQL statement in a SQL assertion rule.
30170    /// This field is only valid for SQL assertion rules.
30171    pub assertion_row_count: i64,
30172
30173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30174}
30175
30176impl DataQualityScanRuleResult {
30177    pub fn new() -> Self {
30178        std::default::Default::default()
30179    }
30180
30181    /// Sets the value of [job_id][crate::model::DataQualityScanRuleResult::job_id].
30182    ///
30183    /// # Example
30184    /// ```ignore,no_run
30185    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30186    /// let x = DataQualityScanRuleResult::new().set_job_id("example");
30187    /// ```
30188    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30189        self.job_id = v.into();
30190        self
30191    }
30192
30193    /// Sets the value of [data_source][crate::model::DataQualityScanRuleResult::data_source].
30194    ///
30195    /// # Example
30196    /// ```ignore,no_run
30197    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30198    /// let x = DataQualityScanRuleResult::new().set_data_source("example");
30199    /// ```
30200    pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30201        self.data_source = v.into();
30202        self
30203    }
30204
30205    /// Sets the value of [column][crate::model::DataQualityScanRuleResult::column].
30206    ///
30207    /// # Example
30208    /// ```ignore,no_run
30209    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30210    /// let x = DataQualityScanRuleResult::new().set_column("example");
30211    /// ```
30212    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30213        self.column = v.into();
30214        self
30215    }
30216
30217    /// Sets the value of [rule_name][crate::model::DataQualityScanRuleResult::rule_name].
30218    ///
30219    /// # Example
30220    /// ```ignore,no_run
30221    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30222    /// let x = DataQualityScanRuleResult::new().set_rule_name("example");
30223    /// ```
30224    pub fn set_rule_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30225        self.rule_name = v.into();
30226        self
30227    }
30228
30229    /// Sets the value of [rule_type][crate::model::DataQualityScanRuleResult::rule_type].
30230    ///
30231    /// # Example
30232    /// ```ignore,no_run
30233    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30234    /// use google_cloud_dataplex_v1::model::data_quality_scan_rule_result::RuleType;
30235    /// let x0 = DataQualityScanRuleResult::new().set_rule_type(RuleType::NonNullExpectation);
30236    /// let x1 = DataQualityScanRuleResult::new().set_rule_type(RuleType::RangeExpectation);
30237    /// let x2 = DataQualityScanRuleResult::new().set_rule_type(RuleType::RegexExpectation);
30238    /// ```
30239    pub fn set_rule_type<
30240        T: std::convert::Into<crate::model::data_quality_scan_rule_result::RuleType>,
30241    >(
30242        mut self,
30243        v: T,
30244    ) -> Self {
30245        self.rule_type = v.into();
30246        self
30247    }
30248
30249    /// Sets the value of [evalution_type][crate::model::DataQualityScanRuleResult::evalution_type].
30250    ///
30251    /// # Example
30252    /// ```ignore,no_run
30253    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30254    /// use google_cloud_dataplex_v1::model::data_quality_scan_rule_result::EvaluationType;
30255    /// let x0 = DataQualityScanRuleResult::new().set_evalution_type(EvaluationType::PerRow);
30256    /// let x1 = DataQualityScanRuleResult::new().set_evalution_type(EvaluationType::Aggregate);
30257    /// ```
30258    pub fn set_evalution_type<
30259        T: std::convert::Into<crate::model::data_quality_scan_rule_result::EvaluationType>,
30260    >(
30261        mut self,
30262        v: T,
30263    ) -> Self {
30264        self.evalution_type = v.into();
30265        self
30266    }
30267
30268    /// Sets the value of [rule_dimension][crate::model::DataQualityScanRuleResult::rule_dimension].
30269    ///
30270    /// # Example
30271    /// ```ignore,no_run
30272    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30273    /// let x = DataQualityScanRuleResult::new().set_rule_dimension("example");
30274    /// ```
30275    pub fn set_rule_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30276        self.rule_dimension = v.into();
30277        self
30278    }
30279
30280    /// Sets the value of [threshold_percent][crate::model::DataQualityScanRuleResult::threshold_percent].
30281    ///
30282    /// # Example
30283    /// ```ignore,no_run
30284    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30285    /// let x = DataQualityScanRuleResult::new().set_threshold_percent(42.0);
30286    /// ```
30287    pub fn set_threshold_percent<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
30288        self.threshold_percent = v.into();
30289        self
30290    }
30291
30292    /// Sets the value of [result][crate::model::DataQualityScanRuleResult::result].
30293    ///
30294    /// # Example
30295    /// ```ignore,no_run
30296    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30297    /// use google_cloud_dataplex_v1::model::data_quality_scan_rule_result::Result;
30298    /// let x0 = DataQualityScanRuleResult::new().set_result(Result::Passed);
30299    /// let x1 = DataQualityScanRuleResult::new().set_result(Result::Failed);
30300    /// ```
30301    pub fn set_result<
30302        T: std::convert::Into<crate::model::data_quality_scan_rule_result::Result>,
30303    >(
30304        mut self,
30305        v: T,
30306    ) -> Self {
30307        self.result = v.into();
30308        self
30309    }
30310
30311    /// Sets the value of [evaluated_row_count][crate::model::DataQualityScanRuleResult::evaluated_row_count].
30312    ///
30313    /// # Example
30314    /// ```ignore,no_run
30315    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30316    /// let x = DataQualityScanRuleResult::new().set_evaluated_row_count(42);
30317    /// ```
30318    pub fn set_evaluated_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30319        self.evaluated_row_count = v.into();
30320        self
30321    }
30322
30323    /// Sets the value of [passed_row_count][crate::model::DataQualityScanRuleResult::passed_row_count].
30324    ///
30325    /// # Example
30326    /// ```ignore,no_run
30327    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30328    /// let x = DataQualityScanRuleResult::new().set_passed_row_count(42);
30329    /// ```
30330    pub fn set_passed_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30331        self.passed_row_count = v.into();
30332        self
30333    }
30334
30335    /// Sets the value of [null_row_count][crate::model::DataQualityScanRuleResult::null_row_count].
30336    ///
30337    /// # Example
30338    /// ```ignore,no_run
30339    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30340    /// let x = DataQualityScanRuleResult::new().set_null_row_count(42);
30341    /// ```
30342    pub fn set_null_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30343        self.null_row_count = v.into();
30344        self
30345    }
30346
30347    /// Sets the value of [assertion_row_count][crate::model::DataQualityScanRuleResult::assertion_row_count].
30348    ///
30349    /// # Example
30350    /// ```ignore,no_run
30351    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30352    /// let x = DataQualityScanRuleResult::new().set_assertion_row_count(42);
30353    /// ```
30354    pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30355        self.assertion_row_count = v.into();
30356        self
30357    }
30358}
30359
30360impl wkt::message::Message for DataQualityScanRuleResult {
30361    fn typename() -> &'static str {
30362        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityScanRuleResult"
30363    }
30364}
30365
30366/// Defines additional types related to [DataQualityScanRuleResult].
30367pub mod data_quality_scan_rule_result {
30368    #[allow(unused_imports)]
30369    use super::*;
30370
30371    /// The type of the data quality rule.
30372    ///
30373    /// # Working with unknown values
30374    ///
30375    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30376    /// additional enum variants at any time. Adding new variants is not considered
30377    /// a breaking change. Applications should write their code in anticipation of:
30378    ///
30379    /// - New values appearing in future releases of the client library, **and**
30380    /// - New values received dynamically, without application changes.
30381    ///
30382    /// Please consult the [Working with enums] section in the user guide for some
30383    /// guidelines.
30384    ///
30385    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30386    #[derive(Clone, Debug, PartialEq)]
30387    #[non_exhaustive]
30388    pub enum RuleType {
30389        /// An unspecified rule type.
30390        Unspecified,
30391        /// See
30392        /// [DataQualityRule.NonNullExpectation][google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation].
30393        ///
30394        /// [google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation]: crate::model::data_quality_rule::NonNullExpectation
30395        NonNullExpectation,
30396        /// See
30397        /// [DataQualityRule.RangeExpectation][google.cloud.dataplex.v1.DataQualityRule.RangeExpectation].
30398        ///
30399        /// [google.cloud.dataplex.v1.DataQualityRule.RangeExpectation]: crate::model::data_quality_rule::RangeExpectation
30400        RangeExpectation,
30401        /// See
30402        /// [DataQualityRule.RegexExpectation][google.cloud.dataplex.v1.DataQualityRule.RegexExpectation].
30403        ///
30404        /// [google.cloud.dataplex.v1.DataQualityRule.RegexExpectation]: crate::model::data_quality_rule::RegexExpectation
30405        RegexExpectation,
30406        /// See
30407        /// [DataQualityRule.RowConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation].
30408        ///
30409        /// [google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation]: crate::model::data_quality_rule::RowConditionExpectation
30410        RowConditionExpectation,
30411        /// See
30412        /// [DataQualityRule.SetExpectation][google.cloud.dataplex.v1.DataQualityRule.SetExpectation].
30413        ///
30414        /// [google.cloud.dataplex.v1.DataQualityRule.SetExpectation]: crate::model::data_quality_rule::SetExpectation
30415        SetExpectation,
30416        /// See
30417        /// [DataQualityRule.StatisticRangeExpectation][google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation].
30418        ///
30419        /// [google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation]: crate::model::data_quality_rule::StatisticRangeExpectation
30420        StatisticRangeExpectation,
30421        /// See
30422        /// [DataQualityRule.TableConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation].
30423        ///
30424        /// [google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation]: crate::model::data_quality_rule::TableConditionExpectation
30425        TableConditionExpectation,
30426        /// See
30427        /// [DataQualityRule.UniquenessExpectation][google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation].
30428        ///
30429        /// [google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation]: crate::model::data_quality_rule::UniquenessExpectation
30430        UniquenessExpectation,
30431        /// See
30432        /// [DataQualityRule.SqlAssertion][google.cloud.dataplex.v1.DataQualityRule.SqlAssertion].
30433        ///
30434        /// [google.cloud.dataplex.v1.DataQualityRule.SqlAssertion]: crate::model::data_quality_rule::SqlAssertion
30435        SqlAssertion,
30436        /// If set, the enum was initialized with an unknown value.
30437        ///
30438        /// Applications can examine the value using [RuleType::value] or
30439        /// [RuleType::name].
30440        UnknownValue(rule_type::UnknownValue),
30441    }
30442
30443    #[doc(hidden)]
30444    pub mod rule_type {
30445        #[allow(unused_imports)]
30446        use super::*;
30447        #[derive(Clone, Debug, PartialEq)]
30448        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30449    }
30450
30451    impl RuleType {
30452        /// Gets the enum value.
30453        ///
30454        /// Returns `None` if the enum contains an unknown value deserialized from
30455        /// the string representation of enums.
30456        pub fn value(&self) -> std::option::Option<i32> {
30457            match self {
30458                Self::Unspecified => std::option::Option::Some(0),
30459                Self::NonNullExpectation => std::option::Option::Some(1),
30460                Self::RangeExpectation => std::option::Option::Some(2),
30461                Self::RegexExpectation => std::option::Option::Some(3),
30462                Self::RowConditionExpectation => std::option::Option::Some(4),
30463                Self::SetExpectation => std::option::Option::Some(5),
30464                Self::StatisticRangeExpectation => std::option::Option::Some(6),
30465                Self::TableConditionExpectation => std::option::Option::Some(7),
30466                Self::UniquenessExpectation => std::option::Option::Some(8),
30467                Self::SqlAssertion => std::option::Option::Some(9),
30468                Self::UnknownValue(u) => u.0.value(),
30469            }
30470        }
30471
30472        /// Gets the enum value as a string.
30473        ///
30474        /// Returns `None` if the enum contains an unknown value deserialized from
30475        /// the integer representation of enums.
30476        pub fn name(&self) -> std::option::Option<&str> {
30477            match self {
30478                Self::Unspecified => std::option::Option::Some("RULE_TYPE_UNSPECIFIED"),
30479                Self::NonNullExpectation => std::option::Option::Some("NON_NULL_EXPECTATION"),
30480                Self::RangeExpectation => std::option::Option::Some("RANGE_EXPECTATION"),
30481                Self::RegexExpectation => std::option::Option::Some("REGEX_EXPECTATION"),
30482                Self::RowConditionExpectation => {
30483                    std::option::Option::Some("ROW_CONDITION_EXPECTATION")
30484                }
30485                Self::SetExpectation => std::option::Option::Some("SET_EXPECTATION"),
30486                Self::StatisticRangeExpectation => {
30487                    std::option::Option::Some("STATISTIC_RANGE_EXPECTATION")
30488                }
30489                Self::TableConditionExpectation => {
30490                    std::option::Option::Some("TABLE_CONDITION_EXPECTATION")
30491                }
30492                Self::UniquenessExpectation => std::option::Option::Some("UNIQUENESS_EXPECTATION"),
30493                Self::SqlAssertion => std::option::Option::Some("SQL_ASSERTION"),
30494                Self::UnknownValue(u) => u.0.name(),
30495            }
30496        }
30497    }
30498
30499    impl std::default::Default for RuleType {
30500        fn default() -> Self {
30501            use std::convert::From;
30502            Self::from(0)
30503        }
30504    }
30505
30506    impl std::fmt::Display for RuleType {
30507        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30508            wkt::internal::display_enum(f, self.name(), self.value())
30509        }
30510    }
30511
30512    impl std::convert::From<i32> for RuleType {
30513        fn from(value: i32) -> Self {
30514            match value {
30515                0 => Self::Unspecified,
30516                1 => Self::NonNullExpectation,
30517                2 => Self::RangeExpectation,
30518                3 => Self::RegexExpectation,
30519                4 => Self::RowConditionExpectation,
30520                5 => Self::SetExpectation,
30521                6 => Self::StatisticRangeExpectation,
30522                7 => Self::TableConditionExpectation,
30523                8 => Self::UniquenessExpectation,
30524                9 => Self::SqlAssertion,
30525                _ => Self::UnknownValue(rule_type::UnknownValue(
30526                    wkt::internal::UnknownEnumValue::Integer(value),
30527                )),
30528            }
30529        }
30530    }
30531
30532    impl std::convert::From<&str> for RuleType {
30533        fn from(value: &str) -> Self {
30534            use std::string::ToString;
30535            match value {
30536                "RULE_TYPE_UNSPECIFIED" => Self::Unspecified,
30537                "NON_NULL_EXPECTATION" => Self::NonNullExpectation,
30538                "RANGE_EXPECTATION" => Self::RangeExpectation,
30539                "REGEX_EXPECTATION" => Self::RegexExpectation,
30540                "ROW_CONDITION_EXPECTATION" => Self::RowConditionExpectation,
30541                "SET_EXPECTATION" => Self::SetExpectation,
30542                "STATISTIC_RANGE_EXPECTATION" => Self::StatisticRangeExpectation,
30543                "TABLE_CONDITION_EXPECTATION" => Self::TableConditionExpectation,
30544                "UNIQUENESS_EXPECTATION" => Self::UniquenessExpectation,
30545                "SQL_ASSERTION" => Self::SqlAssertion,
30546                _ => Self::UnknownValue(rule_type::UnknownValue(
30547                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30548                )),
30549            }
30550        }
30551    }
30552
30553    impl serde::ser::Serialize for RuleType {
30554        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30555        where
30556            S: serde::Serializer,
30557        {
30558            match self {
30559                Self::Unspecified => serializer.serialize_i32(0),
30560                Self::NonNullExpectation => serializer.serialize_i32(1),
30561                Self::RangeExpectation => serializer.serialize_i32(2),
30562                Self::RegexExpectation => serializer.serialize_i32(3),
30563                Self::RowConditionExpectation => serializer.serialize_i32(4),
30564                Self::SetExpectation => serializer.serialize_i32(5),
30565                Self::StatisticRangeExpectation => serializer.serialize_i32(6),
30566                Self::TableConditionExpectation => serializer.serialize_i32(7),
30567                Self::UniquenessExpectation => serializer.serialize_i32(8),
30568                Self::SqlAssertion => serializer.serialize_i32(9),
30569                Self::UnknownValue(u) => u.0.serialize(serializer),
30570            }
30571        }
30572    }
30573
30574    impl<'de> serde::de::Deserialize<'de> for RuleType {
30575        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30576        where
30577            D: serde::Deserializer<'de>,
30578        {
30579            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleType>::new(
30580                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType",
30581            ))
30582        }
30583    }
30584
30585    /// The evaluation type of the data quality rule.
30586    ///
30587    /// # Working with unknown values
30588    ///
30589    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30590    /// additional enum variants at any time. Adding new variants is not considered
30591    /// a breaking change. Applications should write their code in anticipation of:
30592    ///
30593    /// - New values appearing in future releases of the client library, **and**
30594    /// - New values received dynamically, without application changes.
30595    ///
30596    /// Please consult the [Working with enums] section in the user guide for some
30597    /// guidelines.
30598    ///
30599    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30600    #[derive(Clone, Debug, PartialEq)]
30601    #[non_exhaustive]
30602    pub enum EvaluationType {
30603        /// An unspecified evaluation type.
30604        Unspecified,
30605        /// The rule evaluation is done at per row level.
30606        PerRow,
30607        /// The rule evaluation is done for an aggregate of rows.
30608        Aggregate,
30609        /// If set, the enum was initialized with an unknown value.
30610        ///
30611        /// Applications can examine the value using [EvaluationType::value] or
30612        /// [EvaluationType::name].
30613        UnknownValue(evaluation_type::UnknownValue),
30614    }
30615
30616    #[doc(hidden)]
30617    pub mod evaluation_type {
30618        #[allow(unused_imports)]
30619        use super::*;
30620        #[derive(Clone, Debug, PartialEq)]
30621        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30622    }
30623
30624    impl EvaluationType {
30625        /// Gets the enum value.
30626        ///
30627        /// Returns `None` if the enum contains an unknown value deserialized from
30628        /// the string representation of enums.
30629        pub fn value(&self) -> std::option::Option<i32> {
30630            match self {
30631                Self::Unspecified => std::option::Option::Some(0),
30632                Self::PerRow => std::option::Option::Some(1),
30633                Self::Aggregate => std::option::Option::Some(2),
30634                Self::UnknownValue(u) => u.0.value(),
30635            }
30636        }
30637
30638        /// Gets the enum value as a string.
30639        ///
30640        /// Returns `None` if the enum contains an unknown value deserialized from
30641        /// the integer representation of enums.
30642        pub fn name(&self) -> std::option::Option<&str> {
30643            match self {
30644                Self::Unspecified => std::option::Option::Some("EVALUATION_TYPE_UNSPECIFIED"),
30645                Self::PerRow => std::option::Option::Some("PER_ROW"),
30646                Self::Aggregate => std::option::Option::Some("AGGREGATE"),
30647                Self::UnknownValue(u) => u.0.name(),
30648            }
30649        }
30650    }
30651
30652    impl std::default::Default for EvaluationType {
30653        fn default() -> Self {
30654            use std::convert::From;
30655            Self::from(0)
30656        }
30657    }
30658
30659    impl std::fmt::Display for EvaluationType {
30660        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30661            wkt::internal::display_enum(f, self.name(), self.value())
30662        }
30663    }
30664
30665    impl std::convert::From<i32> for EvaluationType {
30666        fn from(value: i32) -> Self {
30667            match value {
30668                0 => Self::Unspecified,
30669                1 => Self::PerRow,
30670                2 => Self::Aggregate,
30671                _ => Self::UnknownValue(evaluation_type::UnknownValue(
30672                    wkt::internal::UnknownEnumValue::Integer(value),
30673                )),
30674            }
30675        }
30676    }
30677
30678    impl std::convert::From<&str> for EvaluationType {
30679        fn from(value: &str) -> Self {
30680            use std::string::ToString;
30681            match value {
30682                "EVALUATION_TYPE_UNSPECIFIED" => Self::Unspecified,
30683                "PER_ROW" => Self::PerRow,
30684                "AGGREGATE" => Self::Aggregate,
30685                _ => Self::UnknownValue(evaluation_type::UnknownValue(
30686                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30687                )),
30688            }
30689        }
30690    }
30691
30692    impl serde::ser::Serialize for EvaluationType {
30693        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30694        where
30695            S: serde::Serializer,
30696        {
30697            match self {
30698                Self::Unspecified => serializer.serialize_i32(0),
30699                Self::PerRow => serializer.serialize_i32(1),
30700                Self::Aggregate => serializer.serialize_i32(2),
30701                Self::UnknownValue(u) => u.0.serialize(serializer),
30702            }
30703        }
30704    }
30705
30706    impl<'de> serde::de::Deserialize<'de> for EvaluationType {
30707        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30708        where
30709            D: serde::Deserializer<'de>,
30710        {
30711            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationType>::new(
30712                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType",
30713            ))
30714        }
30715    }
30716
30717    /// Whether the data quality rule passed or failed.
30718    ///
30719    /// # Working with unknown values
30720    ///
30721    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30722    /// additional enum variants at any time. Adding new variants is not considered
30723    /// a breaking change. Applications should write their code in anticipation of:
30724    ///
30725    /// - New values appearing in future releases of the client library, **and**
30726    /// - New values received dynamically, without application changes.
30727    ///
30728    /// Please consult the [Working with enums] section in the user guide for some
30729    /// guidelines.
30730    ///
30731    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30732    #[derive(Clone, Debug, PartialEq)]
30733    #[non_exhaustive]
30734    pub enum Result {
30735        /// An unspecified result.
30736        Unspecified,
30737        /// The data quality rule passed.
30738        Passed,
30739        /// The data quality rule failed.
30740        Failed,
30741        /// If set, the enum was initialized with an unknown value.
30742        ///
30743        /// Applications can examine the value using [Result::value] or
30744        /// [Result::name].
30745        UnknownValue(result::UnknownValue),
30746    }
30747
30748    #[doc(hidden)]
30749    pub mod result {
30750        #[allow(unused_imports)]
30751        use super::*;
30752        #[derive(Clone, Debug, PartialEq)]
30753        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30754    }
30755
30756    impl Result {
30757        /// Gets the enum value.
30758        ///
30759        /// Returns `None` if the enum contains an unknown value deserialized from
30760        /// the string representation of enums.
30761        pub fn value(&self) -> std::option::Option<i32> {
30762            match self {
30763                Self::Unspecified => std::option::Option::Some(0),
30764                Self::Passed => std::option::Option::Some(1),
30765                Self::Failed => std::option::Option::Some(2),
30766                Self::UnknownValue(u) => u.0.value(),
30767            }
30768        }
30769
30770        /// Gets the enum value as a string.
30771        ///
30772        /// Returns `None` if the enum contains an unknown value deserialized from
30773        /// the integer representation of enums.
30774        pub fn name(&self) -> std::option::Option<&str> {
30775            match self {
30776                Self::Unspecified => std::option::Option::Some("RESULT_UNSPECIFIED"),
30777                Self::Passed => std::option::Option::Some("PASSED"),
30778                Self::Failed => std::option::Option::Some("FAILED"),
30779                Self::UnknownValue(u) => u.0.name(),
30780            }
30781        }
30782    }
30783
30784    impl std::default::Default for Result {
30785        fn default() -> Self {
30786            use std::convert::From;
30787            Self::from(0)
30788        }
30789    }
30790
30791    impl std::fmt::Display for Result {
30792        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30793            wkt::internal::display_enum(f, self.name(), self.value())
30794        }
30795    }
30796
30797    impl std::convert::From<i32> for Result {
30798        fn from(value: i32) -> Self {
30799            match value {
30800                0 => Self::Unspecified,
30801                1 => Self::Passed,
30802                2 => Self::Failed,
30803                _ => Self::UnknownValue(result::UnknownValue(
30804                    wkt::internal::UnknownEnumValue::Integer(value),
30805                )),
30806            }
30807        }
30808    }
30809
30810    impl std::convert::From<&str> for Result {
30811        fn from(value: &str) -> Self {
30812            use std::string::ToString;
30813            match value {
30814                "RESULT_UNSPECIFIED" => Self::Unspecified,
30815                "PASSED" => Self::Passed,
30816                "FAILED" => Self::Failed,
30817                _ => Self::UnknownValue(result::UnknownValue(
30818                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30819                )),
30820            }
30821        }
30822    }
30823
30824    impl serde::ser::Serialize for Result {
30825        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30826        where
30827            S: serde::Serializer,
30828        {
30829            match self {
30830                Self::Unspecified => serializer.serialize_i32(0),
30831                Self::Passed => serializer.serialize_i32(1),
30832                Self::Failed => serializer.serialize_i32(2),
30833                Self::UnknownValue(u) => u.0.serialize(serializer),
30834            }
30835        }
30836    }
30837
30838    impl<'de> serde::de::Deserialize<'de> for Result {
30839        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30840        where
30841            D: serde::Deserializer<'de>,
30842        {
30843            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Result>::new(
30844                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.Result",
30845            ))
30846        }
30847    }
30848}
30849
30850/// Payload associated with Business Glossary related log events.
30851#[derive(Clone, Default, PartialEq)]
30852#[non_exhaustive]
30853pub struct BusinessGlossaryEvent {
30854    /// The log message.
30855    pub message: std::string::String,
30856
30857    /// The type of the event.
30858    pub event_type: crate::model::business_glossary_event::EventType,
30859
30860    /// Name of the resource.
30861    pub resource: std::string::String,
30862
30863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30864}
30865
30866impl BusinessGlossaryEvent {
30867    pub fn new() -> Self {
30868        std::default::Default::default()
30869    }
30870
30871    /// Sets the value of [message][crate::model::BusinessGlossaryEvent::message].
30872    ///
30873    /// # Example
30874    /// ```ignore,no_run
30875    /// # use google_cloud_dataplex_v1::model::BusinessGlossaryEvent;
30876    /// let x = BusinessGlossaryEvent::new().set_message("example");
30877    /// ```
30878    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30879        self.message = v.into();
30880        self
30881    }
30882
30883    /// Sets the value of [event_type][crate::model::BusinessGlossaryEvent::event_type].
30884    ///
30885    /// # Example
30886    /// ```ignore,no_run
30887    /// # use google_cloud_dataplex_v1::model::BusinessGlossaryEvent;
30888    /// use google_cloud_dataplex_v1::model::business_glossary_event::EventType;
30889    /// let x0 = BusinessGlossaryEvent::new().set_event_type(EventType::GlossaryCreate);
30890    /// let x1 = BusinessGlossaryEvent::new().set_event_type(EventType::GlossaryUpdate);
30891    /// let x2 = BusinessGlossaryEvent::new().set_event_type(EventType::GlossaryDelete);
30892    /// ```
30893    pub fn set_event_type<
30894        T: std::convert::Into<crate::model::business_glossary_event::EventType>,
30895    >(
30896        mut self,
30897        v: T,
30898    ) -> Self {
30899        self.event_type = v.into();
30900        self
30901    }
30902
30903    /// Sets the value of [resource][crate::model::BusinessGlossaryEvent::resource].
30904    ///
30905    /// # Example
30906    /// ```ignore,no_run
30907    /// # use google_cloud_dataplex_v1::model::BusinessGlossaryEvent;
30908    /// let x = BusinessGlossaryEvent::new().set_resource("example");
30909    /// ```
30910    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30911        self.resource = v.into();
30912        self
30913    }
30914}
30915
30916impl wkt::message::Message for BusinessGlossaryEvent {
30917    fn typename() -> &'static str {
30918        "type.googleapis.com/google.cloud.dataplex.v1.BusinessGlossaryEvent"
30919    }
30920}
30921
30922/// Defines additional types related to [BusinessGlossaryEvent].
30923pub mod business_glossary_event {
30924    #[allow(unused_imports)]
30925    use super::*;
30926
30927    /// Type of glossary log event.
30928    ///
30929    /// # Working with unknown values
30930    ///
30931    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30932    /// additional enum variants at any time. Adding new variants is not considered
30933    /// a breaking change. Applications should write their code in anticipation of:
30934    ///
30935    /// - New values appearing in future releases of the client library, **and**
30936    /// - New values received dynamically, without application changes.
30937    ///
30938    /// Please consult the [Working with enums] section in the user guide for some
30939    /// guidelines.
30940    ///
30941    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30942    #[derive(Clone, Debug, PartialEq)]
30943    #[non_exhaustive]
30944    pub enum EventType {
30945        /// An unspecified event type.
30946        Unspecified,
30947        /// Glossary create event.
30948        GlossaryCreate,
30949        /// Glossary update event.
30950        GlossaryUpdate,
30951        /// Glossary delete event.
30952        GlossaryDelete,
30953        /// Glossary category create event.
30954        GlossaryCategoryCreate,
30955        /// Glossary category update event.
30956        GlossaryCategoryUpdate,
30957        /// Glossary category delete event.
30958        GlossaryCategoryDelete,
30959        /// Glossary term create event.
30960        GlossaryTermCreate,
30961        /// Glossary term update event.
30962        GlossaryTermUpdate,
30963        /// Glossary term delete event.
30964        GlossaryTermDelete,
30965        /// If set, the enum was initialized with an unknown value.
30966        ///
30967        /// Applications can examine the value using [EventType::value] or
30968        /// [EventType::name].
30969        UnknownValue(event_type::UnknownValue),
30970    }
30971
30972    #[doc(hidden)]
30973    pub mod event_type {
30974        #[allow(unused_imports)]
30975        use super::*;
30976        #[derive(Clone, Debug, PartialEq)]
30977        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30978    }
30979
30980    impl EventType {
30981        /// Gets the enum value.
30982        ///
30983        /// Returns `None` if the enum contains an unknown value deserialized from
30984        /// the string representation of enums.
30985        pub fn value(&self) -> std::option::Option<i32> {
30986            match self {
30987                Self::Unspecified => std::option::Option::Some(0),
30988                Self::GlossaryCreate => std::option::Option::Some(1),
30989                Self::GlossaryUpdate => std::option::Option::Some(2),
30990                Self::GlossaryDelete => std::option::Option::Some(3),
30991                Self::GlossaryCategoryCreate => std::option::Option::Some(4),
30992                Self::GlossaryCategoryUpdate => std::option::Option::Some(5),
30993                Self::GlossaryCategoryDelete => std::option::Option::Some(6),
30994                Self::GlossaryTermCreate => std::option::Option::Some(7),
30995                Self::GlossaryTermUpdate => std::option::Option::Some(8),
30996                Self::GlossaryTermDelete => std::option::Option::Some(9),
30997                Self::UnknownValue(u) => u.0.value(),
30998            }
30999        }
31000
31001        /// Gets the enum value as a string.
31002        ///
31003        /// Returns `None` if the enum contains an unknown value deserialized from
31004        /// the integer representation of enums.
31005        pub fn name(&self) -> std::option::Option<&str> {
31006            match self {
31007                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
31008                Self::GlossaryCreate => std::option::Option::Some("GLOSSARY_CREATE"),
31009                Self::GlossaryUpdate => std::option::Option::Some("GLOSSARY_UPDATE"),
31010                Self::GlossaryDelete => std::option::Option::Some("GLOSSARY_DELETE"),
31011                Self::GlossaryCategoryCreate => {
31012                    std::option::Option::Some("GLOSSARY_CATEGORY_CREATE")
31013                }
31014                Self::GlossaryCategoryUpdate => {
31015                    std::option::Option::Some("GLOSSARY_CATEGORY_UPDATE")
31016                }
31017                Self::GlossaryCategoryDelete => {
31018                    std::option::Option::Some("GLOSSARY_CATEGORY_DELETE")
31019                }
31020                Self::GlossaryTermCreate => std::option::Option::Some("GLOSSARY_TERM_CREATE"),
31021                Self::GlossaryTermUpdate => std::option::Option::Some("GLOSSARY_TERM_UPDATE"),
31022                Self::GlossaryTermDelete => std::option::Option::Some("GLOSSARY_TERM_DELETE"),
31023                Self::UnknownValue(u) => u.0.name(),
31024            }
31025        }
31026    }
31027
31028    impl std::default::Default for EventType {
31029        fn default() -> Self {
31030            use std::convert::From;
31031            Self::from(0)
31032        }
31033    }
31034
31035    impl std::fmt::Display for EventType {
31036        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31037            wkt::internal::display_enum(f, self.name(), self.value())
31038        }
31039    }
31040
31041    impl std::convert::From<i32> for EventType {
31042        fn from(value: i32) -> Self {
31043            match value {
31044                0 => Self::Unspecified,
31045                1 => Self::GlossaryCreate,
31046                2 => Self::GlossaryUpdate,
31047                3 => Self::GlossaryDelete,
31048                4 => Self::GlossaryCategoryCreate,
31049                5 => Self::GlossaryCategoryUpdate,
31050                6 => Self::GlossaryCategoryDelete,
31051                7 => Self::GlossaryTermCreate,
31052                8 => Self::GlossaryTermUpdate,
31053                9 => Self::GlossaryTermDelete,
31054                _ => Self::UnknownValue(event_type::UnknownValue(
31055                    wkt::internal::UnknownEnumValue::Integer(value),
31056                )),
31057            }
31058        }
31059    }
31060
31061    impl std::convert::From<&str> for EventType {
31062        fn from(value: &str) -> Self {
31063            use std::string::ToString;
31064            match value {
31065                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
31066                "GLOSSARY_CREATE" => Self::GlossaryCreate,
31067                "GLOSSARY_UPDATE" => Self::GlossaryUpdate,
31068                "GLOSSARY_DELETE" => Self::GlossaryDelete,
31069                "GLOSSARY_CATEGORY_CREATE" => Self::GlossaryCategoryCreate,
31070                "GLOSSARY_CATEGORY_UPDATE" => Self::GlossaryCategoryUpdate,
31071                "GLOSSARY_CATEGORY_DELETE" => Self::GlossaryCategoryDelete,
31072                "GLOSSARY_TERM_CREATE" => Self::GlossaryTermCreate,
31073                "GLOSSARY_TERM_UPDATE" => Self::GlossaryTermUpdate,
31074                "GLOSSARY_TERM_DELETE" => Self::GlossaryTermDelete,
31075                _ => Self::UnknownValue(event_type::UnknownValue(
31076                    wkt::internal::UnknownEnumValue::String(value.to_string()),
31077                )),
31078            }
31079        }
31080    }
31081
31082    impl serde::ser::Serialize for EventType {
31083        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31084        where
31085            S: serde::Serializer,
31086        {
31087            match self {
31088                Self::Unspecified => serializer.serialize_i32(0),
31089                Self::GlossaryCreate => serializer.serialize_i32(1),
31090                Self::GlossaryUpdate => serializer.serialize_i32(2),
31091                Self::GlossaryDelete => serializer.serialize_i32(3),
31092                Self::GlossaryCategoryCreate => serializer.serialize_i32(4),
31093                Self::GlossaryCategoryUpdate => serializer.serialize_i32(5),
31094                Self::GlossaryCategoryDelete => serializer.serialize_i32(6),
31095                Self::GlossaryTermCreate => serializer.serialize_i32(7),
31096                Self::GlossaryTermUpdate => serializer.serialize_i32(8),
31097                Self::GlossaryTermDelete => serializer.serialize_i32(9),
31098                Self::UnknownValue(u) => u.0.serialize(serializer),
31099            }
31100        }
31101    }
31102
31103    impl<'de> serde::de::Deserialize<'de> for EventType {
31104        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31105        where
31106            D: serde::Deserializer<'de>,
31107        {
31108            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
31109                ".google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType",
31110            ))
31111        }
31112    }
31113}
31114
31115/// Payload associated with Entry related log events.
31116#[derive(Clone, Default, PartialEq)]
31117#[non_exhaustive]
31118pub struct EntryLinkEvent {
31119    /// The log message.
31120    pub message: std::string::String,
31121
31122    /// The type of the event.
31123    pub event_type: crate::model::entry_link_event::EventType,
31124
31125    /// Name of the resource.
31126    pub resource: std::string::String,
31127
31128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31129}
31130
31131impl EntryLinkEvent {
31132    pub fn new() -> Self {
31133        std::default::Default::default()
31134    }
31135
31136    /// Sets the value of [message][crate::model::EntryLinkEvent::message].
31137    ///
31138    /// # Example
31139    /// ```ignore,no_run
31140    /// # use google_cloud_dataplex_v1::model::EntryLinkEvent;
31141    /// let x = EntryLinkEvent::new().set_message("example");
31142    /// ```
31143    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31144        self.message = v.into();
31145        self
31146    }
31147
31148    /// Sets the value of [event_type][crate::model::EntryLinkEvent::event_type].
31149    ///
31150    /// # Example
31151    /// ```ignore,no_run
31152    /// # use google_cloud_dataplex_v1::model::EntryLinkEvent;
31153    /// use google_cloud_dataplex_v1::model::entry_link_event::EventType;
31154    /// let x0 = EntryLinkEvent::new().set_event_type(EventType::EntryLinkCreate);
31155    /// let x1 = EntryLinkEvent::new().set_event_type(EventType::EntryLinkDelete);
31156    /// ```
31157    pub fn set_event_type<T: std::convert::Into<crate::model::entry_link_event::EventType>>(
31158        mut self,
31159        v: T,
31160    ) -> Self {
31161        self.event_type = v.into();
31162        self
31163    }
31164
31165    /// Sets the value of [resource][crate::model::EntryLinkEvent::resource].
31166    ///
31167    /// # Example
31168    /// ```ignore,no_run
31169    /// # use google_cloud_dataplex_v1::model::EntryLinkEvent;
31170    /// let x = EntryLinkEvent::new().set_resource("example");
31171    /// ```
31172    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31173        self.resource = v.into();
31174        self
31175    }
31176}
31177
31178impl wkt::message::Message for EntryLinkEvent {
31179    fn typename() -> &'static str {
31180        "type.googleapis.com/google.cloud.dataplex.v1.EntryLinkEvent"
31181    }
31182}
31183
31184/// Defines additional types related to [EntryLinkEvent].
31185pub mod entry_link_event {
31186    #[allow(unused_imports)]
31187    use super::*;
31188
31189    /// Type of entry link log event.
31190    ///
31191    /// # Working with unknown values
31192    ///
31193    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31194    /// additional enum variants at any time. Adding new variants is not considered
31195    /// a breaking change. Applications should write their code in anticipation of:
31196    ///
31197    /// - New values appearing in future releases of the client library, **and**
31198    /// - New values received dynamically, without application changes.
31199    ///
31200    /// Please consult the [Working with enums] section in the user guide for some
31201    /// guidelines.
31202    ///
31203    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31204    #[derive(Clone, Debug, PartialEq)]
31205    #[non_exhaustive]
31206    pub enum EventType {
31207        /// An unspecified event type.
31208        Unspecified,
31209        /// EntryLink create event.
31210        EntryLinkCreate,
31211        /// EntryLink delete event.
31212        EntryLinkDelete,
31213        /// If set, the enum was initialized with an unknown value.
31214        ///
31215        /// Applications can examine the value using [EventType::value] or
31216        /// [EventType::name].
31217        UnknownValue(event_type::UnknownValue),
31218    }
31219
31220    #[doc(hidden)]
31221    pub mod event_type {
31222        #[allow(unused_imports)]
31223        use super::*;
31224        #[derive(Clone, Debug, PartialEq)]
31225        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31226    }
31227
31228    impl EventType {
31229        /// Gets the enum value.
31230        ///
31231        /// Returns `None` if the enum contains an unknown value deserialized from
31232        /// the string representation of enums.
31233        pub fn value(&self) -> std::option::Option<i32> {
31234            match self {
31235                Self::Unspecified => std::option::Option::Some(0),
31236                Self::EntryLinkCreate => std::option::Option::Some(1),
31237                Self::EntryLinkDelete => std::option::Option::Some(2),
31238                Self::UnknownValue(u) => u.0.value(),
31239            }
31240        }
31241
31242        /// Gets the enum value as a string.
31243        ///
31244        /// Returns `None` if the enum contains an unknown value deserialized from
31245        /// the integer representation of enums.
31246        pub fn name(&self) -> std::option::Option<&str> {
31247            match self {
31248                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
31249                Self::EntryLinkCreate => std::option::Option::Some("ENTRY_LINK_CREATE"),
31250                Self::EntryLinkDelete => std::option::Option::Some("ENTRY_LINK_DELETE"),
31251                Self::UnknownValue(u) => u.0.name(),
31252            }
31253        }
31254    }
31255
31256    impl std::default::Default for EventType {
31257        fn default() -> Self {
31258            use std::convert::From;
31259            Self::from(0)
31260        }
31261    }
31262
31263    impl std::fmt::Display for EventType {
31264        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31265            wkt::internal::display_enum(f, self.name(), self.value())
31266        }
31267    }
31268
31269    impl std::convert::From<i32> for EventType {
31270        fn from(value: i32) -> Self {
31271            match value {
31272                0 => Self::Unspecified,
31273                1 => Self::EntryLinkCreate,
31274                2 => Self::EntryLinkDelete,
31275                _ => Self::UnknownValue(event_type::UnknownValue(
31276                    wkt::internal::UnknownEnumValue::Integer(value),
31277                )),
31278            }
31279        }
31280    }
31281
31282    impl std::convert::From<&str> for EventType {
31283        fn from(value: &str) -> Self {
31284            use std::string::ToString;
31285            match value {
31286                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
31287                "ENTRY_LINK_CREATE" => Self::EntryLinkCreate,
31288                "ENTRY_LINK_DELETE" => Self::EntryLinkDelete,
31289                _ => Self::UnknownValue(event_type::UnknownValue(
31290                    wkt::internal::UnknownEnumValue::String(value.to_string()),
31291                )),
31292            }
31293        }
31294    }
31295
31296    impl serde::ser::Serialize for EventType {
31297        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31298        where
31299            S: serde::Serializer,
31300        {
31301            match self {
31302                Self::Unspecified => serializer.serialize_i32(0),
31303                Self::EntryLinkCreate => serializer.serialize_i32(1),
31304                Self::EntryLinkDelete => serializer.serialize_i32(2),
31305                Self::UnknownValue(u) => u.0.serialize(serializer),
31306            }
31307        }
31308    }
31309
31310    impl<'de> serde::de::Deserialize<'de> for EventType {
31311        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31312        where
31313            D: serde::Deserializer<'de>,
31314        {
31315            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
31316                ".google.cloud.dataplex.v1.EntryLinkEvent.EventType",
31317            ))
31318        }
31319    }
31320}
31321
31322/// Create a metadata entity request.
31323#[derive(Clone, Default, PartialEq)]
31324#[non_exhaustive]
31325pub struct CreateEntityRequest {
31326    /// Required. The resource name of the parent zone:
31327    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
31328    pub parent: std::string::String,
31329
31330    /// Required. Entity resource.
31331    pub entity: std::option::Option<crate::model::Entity>,
31332
31333    /// Optional. Only validate the request, but do not perform mutations.
31334    /// The default is false.
31335    pub validate_only: bool,
31336
31337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31338}
31339
31340impl CreateEntityRequest {
31341    pub fn new() -> Self {
31342        std::default::Default::default()
31343    }
31344
31345    /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
31346    ///
31347    /// # Example
31348    /// ```ignore,no_run
31349    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31350    /// let x = CreateEntityRequest::new().set_parent("example");
31351    /// ```
31352    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31353        self.parent = v.into();
31354        self
31355    }
31356
31357    /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
31358    ///
31359    /// # Example
31360    /// ```ignore,no_run
31361    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31362    /// use google_cloud_dataplex_v1::model::Entity;
31363    /// let x = CreateEntityRequest::new().set_entity(Entity::default()/* use setters */);
31364    /// ```
31365    pub fn set_entity<T>(mut self, v: T) -> Self
31366    where
31367        T: std::convert::Into<crate::model::Entity>,
31368    {
31369        self.entity = std::option::Option::Some(v.into());
31370        self
31371    }
31372
31373    /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
31374    ///
31375    /// # Example
31376    /// ```ignore,no_run
31377    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31378    /// use google_cloud_dataplex_v1::model::Entity;
31379    /// let x = CreateEntityRequest::new().set_or_clear_entity(Some(Entity::default()/* use setters */));
31380    /// let x = CreateEntityRequest::new().set_or_clear_entity(None::<Entity>);
31381    /// ```
31382    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
31383    where
31384        T: std::convert::Into<crate::model::Entity>,
31385    {
31386        self.entity = v.map(|x| x.into());
31387        self
31388    }
31389
31390    /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
31391    ///
31392    /// # Example
31393    /// ```ignore,no_run
31394    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31395    /// let x = CreateEntityRequest::new().set_validate_only(true);
31396    /// ```
31397    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31398        self.validate_only = v.into();
31399        self
31400    }
31401}
31402
31403impl wkt::message::Message for CreateEntityRequest {
31404    fn typename() -> &'static str {
31405        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntityRequest"
31406    }
31407}
31408
31409/// Update a metadata entity request.
31410/// The exiting entity will be fully replaced by the entity in the request.
31411/// The entity ID is mutable. To modify the ID, use the current entity ID in the
31412/// request URL and specify the new ID in the request body.
31413#[derive(Clone, Default, PartialEq)]
31414#[non_exhaustive]
31415pub struct UpdateEntityRequest {
31416    /// Required. Update description.
31417    pub entity: std::option::Option<crate::model::Entity>,
31418
31419    /// Optional. Only validate the request, but do not perform mutations.
31420    /// The default is false.
31421    pub validate_only: bool,
31422
31423    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31424}
31425
31426impl UpdateEntityRequest {
31427    pub fn new() -> Self {
31428        std::default::Default::default()
31429    }
31430
31431    /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
31432    ///
31433    /// # Example
31434    /// ```ignore,no_run
31435    /// # use google_cloud_dataplex_v1::model::UpdateEntityRequest;
31436    /// use google_cloud_dataplex_v1::model::Entity;
31437    /// let x = UpdateEntityRequest::new().set_entity(Entity::default()/* use setters */);
31438    /// ```
31439    pub fn set_entity<T>(mut self, v: T) -> Self
31440    where
31441        T: std::convert::Into<crate::model::Entity>,
31442    {
31443        self.entity = std::option::Option::Some(v.into());
31444        self
31445    }
31446
31447    /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
31448    ///
31449    /// # Example
31450    /// ```ignore,no_run
31451    /// # use google_cloud_dataplex_v1::model::UpdateEntityRequest;
31452    /// use google_cloud_dataplex_v1::model::Entity;
31453    /// let x = UpdateEntityRequest::new().set_or_clear_entity(Some(Entity::default()/* use setters */));
31454    /// let x = UpdateEntityRequest::new().set_or_clear_entity(None::<Entity>);
31455    /// ```
31456    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
31457    where
31458        T: std::convert::Into<crate::model::Entity>,
31459    {
31460        self.entity = v.map(|x| x.into());
31461        self
31462    }
31463
31464    /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
31465    ///
31466    /// # Example
31467    /// ```ignore,no_run
31468    /// # use google_cloud_dataplex_v1::model::UpdateEntityRequest;
31469    /// let x = UpdateEntityRequest::new().set_validate_only(true);
31470    /// ```
31471    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31472        self.validate_only = v.into();
31473        self
31474    }
31475}
31476
31477impl wkt::message::Message for UpdateEntityRequest {
31478    fn typename() -> &'static str {
31479        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntityRequest"
31480    }
31481}
31482
31483/// Delete a metadata entity request.
31484#[derive(Clone, Default, PartialEq)]
31485#[non_exhaustive]
31486pub struct DeleteEntityRequest {
31487    /// Required. The resource name of the entity:
31488    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
31489    pub name: std::string::String,
31490
31491    /// Required. The etag associated with the entity, which can be retrieved with
31492    /// a [GetEntity][] request.
31493    pub etag: std::string::String,
31494
31495    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31496}
31497
31498impl DeleteEntityRequest {
31499    pub fn new() -> Self {
31500        std::default::Default::default()
31501    }
31502
31503    /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
31504    ///
31505    /// # Example
31506    /// ```ignore,no_run
31507    /// # use google_cloud_dataplex_v1::model::DeleteEntityRequest;
31508    /// let x = DeleteEntityRequest::new().set_name("example");
31509    /// ```
31510    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31511        self.name = v.into();
31512        self
31513    }
31514
31515    /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
31516    ///
31517    /// # Example
31518    /// ```ignore,no_run
31519    /// # use google_cloud_dataplex_v1::model::DeleteEntityRequest;
31520    /// let x = DeleteEntityRequest::new().set_etag("example");
31521    /// ```
31522    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31523        self.etag = v.into();
31524        self
31525    }
31526}
31527
31528impl wkt::message::Message for DeleteEntityRequest {
31529    fn typename() -> &'static str {
31530        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntityRequest"
31531    }
31532}
31533
31534/// List metadata entities request.
31535#[derive(Clone, Default, PartialEq)]
31536#[non_exhaustive]
31537pub struct ListEntitiesRequest {
31538    /// Required. The resource name of the parent zone:
31539    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
31540    pub parent: std::string::String,
31541
31542    /// Required. Specify the entity view to make a partial list request.
31543    pub view: crate::model::list_entities_request::EntityView,
31544
31545    /// Optional. Maximum number of entities to return. The service may return
31546    /// fewer than this value. If unspecified, 100 entities will be returned by
31547    /// default. The maximum value is 500; larger values will will be truncated to
31548    /// 500.
31549    pub page_size: i32,
31550
31551    /// Optional. Page token received from a previous `ListEntities` call. Provide
31552    /// this to retrieve the subsequent page. When paginating, all other parameters
31553    /// provided to `ListEntities` must match the call that provided the
31554    /// page token.
31555    pub page_token: std::string::String,
31556
31557    /// Optional. The following filter parameters can be added to the URL to limit
31558    /// the entities returned by the API:
31559    ///
31560    /// - Entity ID: ?filter="id=entityID"
31561    /// - Asset ID: ?filter="asset=assetID"
31562    /// - Data path ?filter="data_path=gs://my-bucket"
31563    /// - Is HIVE compatible: ?filter="hive_compatible=true"
31564    /// - Is BigQuery compatible: ?filter="bigquery_compatible=true"
31565    pub filter: std::string::String,
31566
31567    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31568}
31569
31570impl ListEntitiesRequest {
31571    pub fn new() -> Self {
31572        std::default::Default::default()
31573    }
31574
31575    /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
31576    ///
31577    /// # Example
31578    /// ```ignore,no_run
31579    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31580    /// let x = ListEntitiesRequest::new().set_parent("example");
31581    /// ```
31582    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31583        self.parent = v.into();
31584        self
31585    }
31586
31587    /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
31588    ///
31589    /// # Example
31590    /// ```ignore,no_run
31591    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31592    /// use google_cloud_dataplex_v1::model::list_entities_request::EntityView;
31593    /// let x0 = ListEntitiesRequest::new().set_view(EntityView::Tables);
31594    /// let x1 = ListEntitiesRequest::new().set_view(EntityView::Filesets);
31595    /// ```
31596    pub fn set_view<T: std::convert::Into<crate::model::list_entities_request::EntityView>>(
31597        mut self,
31598        v: T,
31599    ) -> Self {
31600        self.view = v.into();
31601        self
31602    }
31603
31604    /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
31605    ///
31606    /// # Example
31607    /// ```ignore,no_run
31608    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31609    /// let x = ListEntitiesRequest::new().set_page_size(42);
31610    /// ```
31611    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
31612        self.page_size = v.into();
31613        self
31614    }
31615
31616    /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
31617    ///
31618    /// # Example
31619    /// ```ignore,no_run
31620    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31621    /// let x = ListEntitiesRequest::new().set_page_token("example");
31622    /// ```
31623    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31624        self.page_token = v.into();
31625        self
31626    }
31627
31628    /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
31629    ///
31630    /// # Example
31631    /// ```ignore,no_run
31632    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31633    /// let x = ListEntitiesRequest::new().set_filter("example");
31634    /// ```
31635    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31636        self.filter = v.into();
31637        self
31638    }
31639}
31640
31641impl wkt::message::Message for ListEntitiesRequest {
31642    fn typename() -> &'static str {
31643        "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesRequest"
31644    }
31645}
31646
31647/// Defines additional types related to [ListEntitiesRequest].
31648pub mod list_entities_request {
31649    #[allow(unused_imports)]
31650    use super::*;
31651
31652    /// Entity views.
31653    ///
31654    /// # Working with unknown values
31655    ///
31656    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31657    /// additional enum variants at any time. Adding new variants is not considered
31658    /// a breaking change. Applications should write their code in anticipation of:
31659    ///
31660    /// - New values appearing in future releases of the client library, **and**
31661    /// - New values received dynamically, without application changes.
31662    ///
31663    /// Please consult the [Working with enums] section in the user guide for some
31664    /// guidelines.
31665    ///
31666    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31667    #[derive(Clone, Debug, PartialEq)]
31668    #[non_exhaustive]
31669    pub enum EntityView {
31670        /// The default unset value. Return both table and fileset entities
31671        /// if unspecified.
31672        Unspecified,
31673        /// Only list table entities.
31674        Tables,
31675        /// Only list fileset entities.
31676        Filesets,
31677        /// If set, the enum was initialized with an unknown value.
31678        ///
31679        /// Applications can examine the value using [EntityView::value] or
31680        /// [EntityView::name].
31681        UnknownValue(entity_view::UnknownValue),
31682    }
31683
31684    #[doc(hidden)]
31685    pub mod entity_view {
31686        #[allow(unused_imports)]
31687        use super::*;
31688        #[derive(Clone, Debug, PartialEq)]
31689        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31690    }
31691
31692    impl EntityView {
31693        /// Gets the enum value.
31694        ///
31695        /// Returns `None` if the enum contains an unknown value deserialized from
31696        /// the string representation of enums.
31697        pub fn value(&self) -> std::option::Option<i32> {
31698            match self {
31699                Self::Unspecified => std::option::Option::Some(0),
31700                Self::Tables => std::option::Option::Some(1),
31701                Self::Filesets => std::option::Option::Some(2),
31702                Self::UnknownValue(u) => u.0.value(),
31703            }
31704        }
31705
31706        /// Gets the enum value as a string.
31707        ///
31708        /// Returns `None` if the enum contains an unknown value deserialized from
31709        /// the integer representation of enums.
31710        pub fn name(&self) -> std::option::Option<&str> {
31711            match self {
31712                Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
31713                Self::Tables => std::option::Option::Some("TABLES"),
31714                Self::Filesets => std::option::Option::Some("FILESETS"),
31715                Self::UnknownValue(u) => u.0.name(),
31716            }
31717        }
31718    }
31719
31720    impl std::default::Default for EntityView {
31721        fn default() -> Self {
31722            use std::convert::From;
31723            Self::from(0)
31724        }
31725    }
31726
31727    impl std::fmt::Display for EntityView {
31728        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31729            wkt::internal::display_enum(f, self.name(), self.value())
31730        }
31731    }
31732
31733    impl std::convert::From<i32> for EntityView {
31734        fn from(value: i32) -> Self {
31735            match value {
31736                0 => Self::Unspecified,
31737                1 => Self::Tables,
31738                2 => Self::Filesets,
31739                _ => Self::UnknownValue(entity_view::UnknownValue(
31740                    wkt::internal::UnknownEnumValue::Integer(value),
31741                )),
31742            }
31743        }
31744    }
31745
31746    impl std::convert::From<&str> for EntityView {
31747        fn from(value: &str) -> Self {
31748            use std::string::ToString;
31749            match value {
31750                "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
31751                "TABLES" => Self::Tables,
31752                "FILESETS" => Self::Filesets,
31753                _ => Self::UnknownValue(entity_view::UnknownValue(
31754                    wkt::internal::UnknownEnumValue::String(value.to_string()),
31755                )),
31756            }
31757        }
31758    }
31759
31760    impl serde::ser::Serialize for EntityView {
31761        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31762        where
31763            S: serde::Serializer,
31764        {
31765            match self {
31766                Self::Unspecified => serializer.serialize_i32(0),
31767                Self::Tables => serializer.serialize_i32(1),
31768                Self::Filesets => serializer.serialize_i32(2),
31769                Self::UnknownValue(u) => u.0.serialize(serializer),
31770            }
31771        }
31772    }
31773
31774    impl<'de> serde::de::Deserialize<'de> for EntityView {
31775        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31776        where
31777            D: serde::Deserializer<'de>,
31778        {
31779            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
31780                ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView",
31781            ))
31782        }
31783    }
31784}
31785
31786/// List metadata entities response.
31787#[derive(Clone, Default, PartialEq)]
31788#[non_exhaustive]
31789pub struct ListEntitiesResponse {
31790    /// Entities in the specified parent zone.
31791    pub entities: std::vec::Vec<crate::model::Entity>,
31792
31793    /// Token to retrieve the next page of results, or empty if there are no
31794    /// remaining results in the list.
31795    pub next_page_token: std::string::String,
31796
31797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31798}
31799
31800impl ListEntitiesResponse {
31801    pub fn new() -> Self {
31802        std::default::Default::default()
31803    }
31804
31805    /// Sets the value of [entities][crate::model::ListEntitiesResponse::entities].
31806    ///
31807    /// # Example
31808    /// ```ignore,no_run
31809    /// # use google_cloud_dataplex_v1::model::ListEntitiesResponse;
31810    /// use google_cloud_dataplex_v1::model::Entity;
31811    /// let x = ListEntitiesResponse::new()
31812    ///     .set_entities([
31813    ///         Entity::default()/* use setters */,
31814    ///         Entity::default()/* use (different) setters */,
31815    ///     ]);
31816    /// ```
31817    pub fn set_entities<T, V>(mut self, v: T) -> Self
31818    where
31819        T: std::iter::IntoIterator<Item = V>,
31820        V: std::convert::Into<crate::model::Entity>,
31821    {
31822        use std::iter::Iterator;
31823        self.entities = v.into_iter().map(|i| i.into()).collect();
31824        self
31825    }
31826
31827    /// Sets the value of [next_page_token][crate::model::ListEntitiesResponse::next_page_token].
31828    ///
31829    /// # Example
31830    /// ```ignore,no_run
31831    /// # use google_cloud_dataplex_v1::model::ListEntitiesResponse;
31832    /// let x = ListEntitiesResponse::new().set_next_page_token("example");
31833    /// ```
31834    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31835        self.next_page_token = v.into();
31836        self
31837    }
31838}
31839
31840impl wkt::message::Message for ListEntitiesResponse {
31841    fn typename() -> &'static str {
31842        "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesResponse"
31843    }
31844}
31845
31846#[doc(hidden)]
31847impl gax::paginator::internal::PageableResponse for ListEntitiesResponse {
31848    type PageItem = crate::model::Entity;
31849
31850    fn items(self) -> std::vec::Vec<Self::PageItem> {
31851        self.entities
31852    }
31853
31854    fn next_page_token(&self) -> std::string::String {
31855        use std::clone::Clone;
31856        self.next_page_token.clone()
31857    }
31858}
31859
31860/// Get metadata entity request.
31861#[derive(Clone, Default, PartialEq)]
31862#[non_exhaustive]
31863pub struct GetEntityRequest {
31864    /// Required. The resource name of the entity:
31865    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.`
31866    pub name: std::string::String,
31867
31868    /// Optional. Used to select the subset of entity information to return.
31869    /// Defaults to `BASIC`.
31870    pub view: crate::model::get_entity_request::EntityView,
31871
31872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31873}
31874
31875impl GetEntityRequest {
31876    pub fn new() -> Self {
31877        std::default::Default::default()
31878    }
31879
31880    /// Sets the value of [name][crate::model::GetEntityRequest::name].
31881    ///
31882    /// # Example
31883    /// ```ignore,no_run
31884    /// # use google_cloud_dataplex_v1::model::GetEntityRequest;
31885    /// let x = GetEntityRequest::new().set_name("example");
31886    /// ```
31887    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31888        self.name = v.into();
31889        self
31890    }
31891
31892    /// Sets the value of [view][crate::model::GetEntityRequest::view].
31893    ///
31894    /// # Example
31895    /// ```ignore,no_run
31896    /// # use google_cloud_dataplex_v1::model::GetEntityRequest;
31897    /// use google_cloud_dataplex_v1::model::get_entity_request::EntityView;
31898    /// let x0 = GetEntityRequest::new().set_view(EntityView::Basic);
31899    /// let x1 = GetEntityRequest::new().set_view(EntityView::Schema);
31900    /// let x2 = GetEntityRequest::new().set_view(EntityView::Full);
31901    /// ```
31902    pub fn set_view<T: std::convert::Into<crate::model::get_entity_request::EntityView>>(
31903        mut self,
31904        v: T,
31905    ) -> Self {
31906        self.view = v.into();
31907        self
31908    }
31909}
31910
31911impl wkt::message::Message for GetEntityRequest {
31912    fn typename() -> &'static str {
31913        "type.googleapis.com/google.cloud.dataplex.v1.GetEntityRequest"
31914    }
31915}
31916
31917/// Defines additional types related to [GetEntityRequest].
31918pub mod get_entity_request {
31919    #[allow(unused_imports)]
31920    use super::*;
31921
31922    /// Entity views for get entity partial result.
31923    ///
31924    /// # Working with unknown values
31925    ///
31926    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31927    /// additional enum variants at any time. Adding new variants is not considered
31928    /// a breaking change. Applications should write their code in anticipation of:
31929    ///
31930    /// - New values appearing in future releases of the client library, **and**
31931    /// - New values received dynamically, without application changes.
31932    ///
31933    /// Please consult the [Working with enums] section in the user guide for some
31934    /// guidelines.
31935    ///
31936    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31937    #[derive(Clone, Debug, PartialEq)]
31938    #[non_exhaustive]
31939    pub enum EntityView {
31940        /// The API will default to the `BASIC` view.
31941        Unspecified,
31942        /// Minimal view that does not include the schema.
31943        Basic,
31944        /// Include basic information and schema.
31945        Schema,
31946        /// Include everything. Currently, this is the same as the SCHEMA view.
31947        Full,
31948        /// If set, the enum was initialized with an unknown value.
31949        ///
31950        /// Applications can examine the value using [EntityView::value] or
31951        /// [EntityView::name].
31952        UnknownValue(entity_view::UnknownValue),
31953    }
31954
31955    #[doc(hidden)]
31956    pub mod entity_view {
31957        #[allow(unused_imports)]
31958        use super::*;
31959        #[derive(Clone, Debug, PartialEq)]
31960        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31961    }
31962
31963    impl EntityView {
31964        /// Gets the enum value.
31965        ///
31966        /// Returns `None` if the enum contains an unknown value deserialized from
31967        /// the string representation of enums.
31968        pub fn value(&self) -> std::option::Option<i32> {
31969            match self {
31970                Self::Unspecified => std::option::Option::Some(0),
31971                Self::Basic => std::option::Option::Some(1),
31972                Self::Schema => std::option::Option::Some(2),
31973                Self::Full => std::option::Option::Some(4),
31974                Self::UnknownValue(u) => u.0.value(),
31975            }
31976        }
31977
31978        /// Gets the enum value as a string.
31979        ///
31980        /// Returns `None` if the enum contains an unknown value deserialized from
31981        /// the integer representation of enums.
31982        pub fn name(&self) -> std::option::Option<&str> {
31983            match self {
31984                Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
31985                Self::Basic => std::option::Option::Some("BASIC"),
31986                Self::Schema => std::option::Option::Some("SCHEMA"),
31987                Self::Full => std::option::Option::Some("FULL"),
31988                Self::UnknownValue(u) => u.0.name(),
31989            }
31990        }
31991    }
31992
31993    impl std::default::Default for EntityView {
31994        fn default() -> Self {
31995            use std::convert::From;
31996            Self::from(0)
31997        }
31998    }
31999
32000    impl std::fmt::Display for EntityView {
32001        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
32002            wkt::internal::display_enum(f, self.name(), self.value())
32003        }
32004    }
32005
32006    impl std::convert::From<i32> for EntityView {
32007        fn from(value: i32) -> Self {
32008            match value {
32009                0 => Self::Unspecified,
32010                1 => Self::Basic,
32011                2 => Self::Schema,
32012                4 => Self::Full,
32013                _ => Self::UnknownValue(entity_view::UnknownValue(
32014                    wkt::internal::UnknownEnumValue::Integer(value),
32015                )),
32016            }
32017        }
32018    }
32019
32020    impl std::convert::From<&str> for EntityView {
32021        fn from(value: &str) -> Self {
32022            use std::string::ToString;
32023            match value {
32024                "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
32025                "BASIC" => Self::Basic,
32026                "SCHEMA" => Self::Schema,
32027                "FULL" => Self::Full,
32028                _ => Self::UnknownValue(entity_view::UnknownValue(
32029                    wkt::internal::UnknownEnumValue::String(value.to_string()),
32030                )),
32031            }
32032        }
32033    }
32034
32035    impl serde::ser::Serialize for EntityView {
32036        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
32037        where
32038            S: serde::Serializer,
32039        {
32040            match self {
32041                Self::Unspecified => serializer.serialize_i32(0),
32042                Self::Basic => serializer.serialize_i32(1),
32043                Self::Schema => serializer.serialize_i32(2),
32044                Self::Full => serializer.serialize_i32(4),
32045                Self::UnknownValue(u) => u.0.serialize(serializer),
32046            }
32047        }
32048    }
32049
32050    impl<'de> serde::de::Deserialize<'de> for EntityView {
32051        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
32052        where
32053            D: serde::Deserializer<'de>,
32054        {
32055            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
32056                ".google.cloud.dataplex.v1.GetEntityRequest.EntityView",
32057            ))
32058        }
32059    }
32060}
32061
32062/// List metadata partitions request.
32063#[derive(Clone, Default, PartialEq)]
32064#[non_exhaustive]
32065pub struct ListPartitionsRequest {
32066    /// Required. The resource name of the parent entity:
32067    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
32068    pub parent: std::string::String,
32069
32070    /// Optional. Maximum number of partitions to return. The service may return
32071    /// fewer than this value. If unspecified, 100 partitions will be returned by
32072    /// default. The maximum page size is 500; larger values will will be truncated
32073    /// to 500.
32074    pub page_size: i32,
32075
32076    /// Optional. Page token received from a previous `ListPartitions` call.
32077    /// Provide this to retrieve the subsequent page. When paginating, all other
32078    /// parameters provided to `ListPartitions` must match the call that provided
32079    /// the page token.
32080    pub page_token: std::string::String,
32081
32082    /// Optional. Filter the partitions returned to the caller using a key value
32083    /// pair expression. Supported operators and syntax:
32084    ///
32085    /// - logic operators: AND, OR
32086    /// - comparison operators: <, >, >=, <= ,=, !=
32087    /// - LIKE operators:
32088    ///   - The right hand of a LIKE operator supports "." and
32089    ///     "*" for wildcard searches, for example "value1 LIKE ".*oo.*"
32090    /// - parenthetical grouping: ( )
32091    ///
32092    /// Sample filter expression: `?filter="key1 < value1 OR key2 > value2"
32093    ///
32094    /// **Notes:**
32095    ///
32096    /// - Keys to the left of operators are case insensitive.
32097    /// - Partition results are sorted first by creation time, then by
32098    ///   lexicographic order.
32099    /// - Up to 20 key value filter pairs are allowed, but due to performance
32100    ///   considerations, only the first 10 will be used as a filter.
32101    pub filter: std::string::String,
32102
32103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32104}
32105
32106impl ListPartitionsRequest {
32107    pub fn new() -> Self {
32108        std::default::Default::default()
32109    }
32110
32111    /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
32112    ///
32113    /// # Example
32114    /// ```ignore,no_run
32115    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32116    /// let x = ListPartitionsRequest::new().set_parent("example");
32117    /// ```
32118    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32119        self.parent = v.into();
32120        self
32121    }
32122
32123    /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
32124    ///
32125    /// # Example
32126    /// ```ignore,no_run
32127    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32128    /// let x = ListPartitionsRequest::new().set_page_size(42);
32129    /// ```
32130    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32131        self.page_size = v.into();
32132        self
32133    }
32134
32135    /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
32136    ///
32137    /// # Example
32138    /// ```ignore,no_run
32139    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32140    /// let x = ListPartitionsRequest::new().set_page_token("example");
32141    /// ```
32142    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32143        self.page_token = v.into();
32144        self
32145    }
32146
32147    /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
32148    ///
32149    /// # Example
32150    /// ```ignore,no_run
32151    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32152    /// let x = ListPartitionsRequest::new().set_filter("example");
32153    /// ```
32154    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32155        self.filter = v.into();
32156        self
32157    }
32158}
32159
32160impl wkt::message::Message for ListPartitionsRequest {
32161    fn typename() -> &'static str {
32162        "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsRequest"
32163    }
32164}
32165
32166/// Create metadata partition request.
32167#[derive(Clone, Default, PartialEq)]
32168#[non_exhaustive]
32169pub struct CreatePartitionRequest {
32170    /// Required. The resource name of the parent zone:
32171    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
32172    pub parent: std::string::String,
32173
32174    /// Required. Partition resource.
32175    pub partition: std::option::Option<crate::model::Partition>,
32176
32177    /// Optional. Only validate the request, but do not perform mutations.
32178    /// The default is false.
32179    pub validate_only: bool,
32180
32181    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32182}
32183
32184impl CreatePartitionRequest {
32185    pub fn new() -> Self {
32186        std::default::Default::default()
32187    }
32188
32189    /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
32190    ///
32191    /// # Example
32192    /// ```ignore,no_run
32193    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32194    /// let x = CreatePartitionRequest::new().set_parent("example");
32195    /// ```
32196    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32197        self.parent = v.into();
32198        self
32199    }
32200
32201    /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
32202    ///
32203    /// # Example
32204    /// ```ignore,no_run
32205    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32206    /// use google_cloud_dataplex_v1::model::Partition;
32207    /// let x = CreatePartitionRequest::new().set_partition(Partition::default()/* use setters */);
32208    /// ```
32209    pub fn set_partition<T>(mut self, v: T) -> Self
32210    where
32211        T: std::convert::Into<crate::model::Partition>,
32212    {
32213        self.partition = std::option::Option::Some(v.into());
32214        self
32215    }
32216
32217    /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
32218    ///
32219    /// # Example
32220    /// ```ignore,no_run
32221    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32222    /// use google_cloud_dataplex_v1::model::Partition;
32223    /// let x = CreatePartitionRequest::new().set_or_clear_partition(Some(Partition::default()/* use setters */));
32224    /// let x = CreatePartitionRequest::new().set_or_clear_partition(None::<Partition>);
32225    /// ```
32226    pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
32227    where
32228        T: std::convert::Into<crate::model::Partition>,
32229    {
32230        self.partition = v.map(|x| x.into());
32231        self
32232    }
32233
32234    /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
32235    ///
32236    /// # Example
32237    /// ```ignore,no_run
32238    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32239    /// let x = CreatePartitionRequest::new().set_validate_only(true);
32240    /// ```
32241    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32242        self.validate_only = v.into();
32243        self
32244    }
32245}
32246
32247impl wkt::message::Message for CreatePartitionRequest {
32248    fn typename() -> &'static str {
32249        "type.googleapis.com/google.cloud.dataplex.v1.CreatePartitionRequest"
32250    }
32251}
32252
32253/// Delete metadata partition request.
32254#[derive(Clone, Default, PartialEq)]
32255#[non_exhaustive]
32256pub struct DeletePartitionRequest {
32257    /// Required. The resource name of the partition.
32258    /// format:
32259    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
32260    /// The {partition_value_path} segment consists of an ordered sequence of
32261    /// partition values separated by "/". All values must be provided.
32262    pub name: std::string::String,
32263
32264    /// Optional. The etag associated with the partition.
32265    #[deprecated]
32266    pub etag: std::string::String,
32267
32268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32269}
32270
32271impl DeletePartitionRequest {
32272    pub fn new() -> Self {
32273        std::default::Default::default()
32274    }
32275
32276    /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
32277    ///
32278    /// # Example
32279    /// ```ignore,no_run
32280    /// # use google_cloud_dataplex_v1::model::DeletePartitionRequest;
32281    /// let x = DeletePartitionRequest::new().set_name("example");
32282    /// ```
32283    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32284        self.name = v.into();
32285        self
32286    }
32287
32288    /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
32289    ///
32290    /// # Example
32291    /// ```ignore,no_run
32292    /// # use google_cloud_dataplex_v1::model::DeletePartitionRequest;
32293    /// let x = DeletePartitionRequest::new().set_etag("example");
32294    /// ```
32295    #[deprecated]
32296    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32297        self.etag = v.into();
32298        self
32299    }
32300}
32301
32302impl wkt::message::Message for DeletePartitionRequest {
32303    fn typename() -> &'static str {
32304        "type.googleapis.com/google.cloud.dataplex.v1.DeletePartitionRequest"
32305    }
32306}
32307
32308/// List metadata partitions response.
32309#[derive(Clone, Default, PartialEq)]
32310#[non_exhaustive]
32311pub struct ListPartitionsResponse {
32312    /// Partitions under the specified parent entity.
32313    pub partitions: std::vec::Vec<crate::model::Partition>,
32314
32315    /// Token to retrieve the next page of results, or empty if there are no
32316    /// remaining results in the list.
32317    pub next_page_token: std::string::String,
32318
32319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32320}
32321
32322impl ListPartitionsResponse {
32323    pub fn new() -> Self {
32324        std::default::Default::default()
32325    }
32326
32327    /// Sets the value of [partitions][crate::model::ListPartitionsResponse::partitions].
32328    ///
32329    /// # Example
32330    /// ```ignore,no_run
32331    /// # use google_cloud_dataplex_v1::model::ListPartitionsResponse;
32332    /// use google_cloud_dataplex_v1::model::Partition;
32333    /// let x = ListPartitionsResponse::new()
32334    ///     .set_partitions([
32335    ///         Partition::default()/* use setters */,
32336    ///         Partition::default()/* use (different) setters */,
32337    ///     ]);
32338    /// ```
32339    pub fn set_partitions<T, V>(mut self, v: T) -> Self
32340    where
32341        T: std::iter::IntoIterator<Item = V>,
32342        V: std::convert::Into<crate::model::Partition>,
32343    {
32344        use std::iter::Iterator;
32345        self.partitions = v.into_iter().map(|i| i.into()).collect();
32346        self
32347    }
32348
32349    /// Sets the value of [next_page_token][crate::model::ListPartitionsResponse::next_page_token].
32350    ///
32351    /// # Example
32352    /// ```ignore,no_run
32353    /// # use google_cloud_dataplex_v1::model::ListPartitionsResponse;
32354    /// let x = ListPartitionsResponse::new().set_next_page_token("example");
32355    /// ```
32356    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32357        self.next_page_token = v.into();
32358        self
32359    }
32360}
32361
32362impl wkt::message::Message for ListPartitionsResponse {
32363    fn typename() -> &'static str {
32364        "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsResponse"
32365    }
32366}
32367
32368#[doc(hidden)]
32369impl gax::paginator::internal::PageableResponse for ListPartitionsResponse {
32370    type PageItem = crate::model::Partition;
32371
32372    fn items(self) -> std::vec::Vec<Self::PageItem> {
32373        self.partitions
32374    }
32375
32376    fn next_page_token(&self) -> std::string::String {
32377        use std::clone::Clone;
32378        self.next_page_token.clone()
32379    }
32380}
32381
32382/// Get metadata partition request.
32383#[derive(Clone, Default, PartialEq)]
32384#[non_exhaustive]
32385pub struct GetPartitionRequest {
32386    /// Required. The resource name of the partition:
32387    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
32388    /// The {partition_value_path} segment consists of an ordered sequence of
32389    /// partition values separated by "/". All values must be provided.
32390    pub name: std::string::String,
32391
32392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32393}
32394
32395impl GetPartitionRequest {
32396    pub fn new() -> Self {
32397        std::default::Default::default()
32398    }
32399
32400    /// Sets the value of [name][crate::model::GetPartitionRequest::name].
32401    ///
32402    /// # Example
32403    /// ```ignore,no_run
32404    /// # use google_cloud_dataplex_v1::model::GetPartitionRequest;
32405    /// let x = GetPartitionRequest::new().set_name("example");
32406    /// ```
32407    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32408        self.name = v.into();
32409        self
32410    }
32411}
32412
32413impl wkt::message::Message for GetPartitionRequest {
32414    fn typename() -> &'static str {
32415        "type.googleapis.com/google.cloud.dataplex.v1.GetPartitionRequest"
32416    }
32417}
32418
32419/// Represents tables and fileset metadata contained within a zone.
32420#[derive(Clone, Default, PartialEq)]
32421#[non_exhaustive]
32422pub struct Entity {
32423    /// Output only. The resource name of the entity, of the form:
32424    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`.
32425    pub name: std::string::String,
32426
32427    /// Optional. Display name must be shorter than or equal to 256 characters.
32428    pub display_name: std::string::String,
32429
32430    /// Optional. User friendly longer description text. Must be shorter than or
32431    /// equal to 1024 characters.
32432    pub description: std::string::String,
32433
32434    /// Output only. The time when the entity was created.
32435    pub create_time: std::option::Option<wkt::Timestamp>,
32436
32437    /// Output only. The time when the entity was last updated.
32438    pub update_time: std::option::Option<wkt::Timestamp>,
32439
32440    /// Required. A user-provided entity ID. It is mutable, and will be used as the
32441    /// published table name. Specifying a new ID in an update entity
32442    /// request will override the existing value.
32443    /// The ID must contain only letters (a-z, A-Z), numbers (0-9), and
32444    /// underscores, and consist of 256 or fewer characters.
32445    pub id: std::string::String,
32446
32447    /// Optional. The etag associated with the entity, which can be retrieved with
32448    /// a [GetEntity][] request. Required for update and delete requests.
32449    pub etag: std::string::String,
32450
32451    /// Required. Immutable. The type of entity.
32452    pub r#type: crate::model::entity::Type,
32453
32454    /// Required. Immutable. The ID of the asset associated with the storage
32455    /// location containing the entity data. The entity must be with in the same
32456    /// zone with the asset.
32457    pub asset: std::string::String,
32458
32459    /// Required. Immutable. The storage path of the entity data.
32460    /// For Cloud Storage data, this is the fully-qualified path to the entity,
32461    /// such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of
32462    /// the table resource, such as
32463    /// `projects/project_id/datasets/dataset_id/tables/table_id`.
32464    pub data_path: std::string::String,
32465
32466    /// Optional. The set of items within the data path constituting the data in
32467    /// the entity, represented as a glob path. Example:
32468    /// `gs://bucket/path/to/data/**/*.csv`.
32469    pub data_path_pattern: std::string::String,
32470
32471    /// Output only. The name of the associated Data Catalog entry.
32472    pub catalog_entry: std::string::String,
32473
32474    /// Required. Immutable. Identifies the storage system of the entity data.
32475    pub system: crate::model::StorageSystem,
32476
32477    /// Required. Identifies the storage format of the entity data.
32478    /// It does not apply to entities with data stored in BigQuery.
32479    pub format: std::option::Option<crate::model::StorageFormat>,
32480
32481    /// Output only. Metadata stores that the entity is compatible with.
32482    pub compatibility: std::option::Option<crate::model::entity::CompatibilityStatus>,
32483
32484    /// Output only. Identifies the access mechanism to the entity. Not user
32485    /// settable.
32486    pub access: std::option::Option<crate::model::StorageAccess>,
32487
32488    /// Output only. System generated unique ID for the Entity. This ID will be
32489    /// different if the Entity is deleted and re-created with the same name.
32490    pub uid: std::string::String,
32491
32492    /// Required. The description of the data structure and layout.
32493    /// The schema is not included in list responses. It is only included in
32494    /// `SCHEMA` and `FULL` entity views of a `GetEntity` response.
32495    pub schema: std::option::Option<crate::model::Schema>,
32496
32497    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32498}
32499
32500impl Entity {
32501    pub fn new() -> Self {
32502        std::default::Default::default()
32503    }
32504
32505    /// Sets the value of [name][crate::model::Entity::name].
32506    ///
32507    /// # Example
32508    /// ```ignore,no_run
32509    /// # use google_cloud_dataplex_v1::model::Entity;
32510    /// let x = Entity::new().set_name("example");
32511    /// ```
32512    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32513        self.name = v.into();
32514        self
32515    }
32516
32517    /// Sets the value of [display_name][crate::model::Entity::display_name].
32518    ///
32519    /// # Example
32520    /// ```ignore,no_run
32521    /// # use google_cloud_dataplex_v1::model::Entity;
32522    /// let x = Entity::new().set_display_name("example");
32523    /// ```
32524    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32525        self.display_name = v.into();
32526        self
32527    }
32528
32529    /// Sets the value of [description][crate::model::Entity::description].
32530    ///
32531    /// # Example
32532    /// ```ignore,no_run
32533    /// # use google_cloud_dataplex_v1::model::Entity;
32534    /// let x = Entity::new().set_description("example");
32535    /// ```
32536    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32537        self.description = v.into();
32538        self
32539    }
32540
32541    /// Sets the value of [create_time][crate::model::Entity::create_time].
32542    ///
32543    /// # Example
32544    /// ```ignore,no_run
32545    /// # use google_cloud_dataplex_v1::model::Entity;
32546    /// use wkt::Timestamp;
32547    /// let x = Entity::new().set_create_time(Timestamp::default()/* use setters */);
32548    /// ```
32549    pub fn set_create_time<T>(mut self, v: T) -> Self
32550    where
32551        T: std::convert::Into<wkt::Timestamp>,
32552    {
32553        self.create_time = std::option::Option::Some(v.into());
32554        self
32555    }
32556
32557    /// Sets or clears the value of [create_time][crate::model::Entity::create_time].
32558    ///
32559    /// # Example
32560    /// ```ignore,no_run
32561    /// # use google_cloud_dataplex_v1::model::Entity;
32562    /// use wkt::Timestamp;
32563    /// let x = Entity::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
32564    /// let x = Entity::new().set_or_clear_create_time(None::<Timestamp>);
32565    /// ```
32566    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
32567    where
32568        T: std::convert::Into<wkt::Timestamp>,
32569    {
32570        self.create_time = v.map(|x| x.into());
32571        self
32572    }
32573
32574    /// Sets the value of [update_time][crate::model::Entity::update_time].
32575    ///
32576    /// # Example
32577    /// ```ignore,no_run
32578    /// # use google_cloud_dataplex_v1::model::Entity;
32579    /// use wkt::Timestamp;
32580    /// let x = Entity::new().set_update_time(Timestamp::default()/* use setters */);
32581    /// ```
32582    pub fn set_update_time<T>(mut self, v: T) -> Self
32583    where
32584        T: std::convert::Into<wkt::Timestamp>,
32585    {
32586        self.update_time = std::option::Option::Some(v.into());
32587        self
32588    }
32589
32590    /// Sets or clears the value of [update_time][crate::model::Entity::update_time].
32591    ///
32592    /// # Example
32593    /// ```ignore,no_run
32594    /// # use google_cloud_dataplex_v1::model::Entity;
32595    /// use wkt::Timestamp;
32596    /// let x = Entity::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
32597    /// let x = Entity::new().set_or_clear_update_time(None::<Timestamp>);
32598    /// ```
32599    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
32600    where
32601        T: std::convert::Into<wkt::Timestamp>,
32602    {
32603        self.update_time = v.map(|x| x.into());
32604        self
32605    }
32606
32607    /// Sets the value of [id][crate::model::Entity::id].
32608    ///
32609    /// # Example
32610    /// ```ignore,no_run
32611    /// # use google_cloud_dataplex_v1::model::Entity;
32612    /// let x = Entity::new().set_id("example");
32613    /// ```
32614    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32615        self.id = v.into();
32616        self
32617    }
32618
32619    /// Sets the value of [etag][crate::model::Entity::etag].
32620    ///
32621    /// # Example
32622    /// ```ignore,no_run
32623    /// # use google_cloud_dataplex_v1::model::Entity;
32624    /// let x = Entity::new().set_etag("example");
32625    /// ```
32626    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32627        self.etag = v.into();
32628        self
32629    }
32630
32631    /// Sets the value of [r#type][crate::model::Entity::type].
32632    ///
32633    /// # Example
32634    /// ```ignore,no_run
32635    /// # use google_cloud_dataplex_v1::model::Entity;
32636    /// use google_cloud_dataplex_v1::model::entity::Type;
32637    /// let x0 = Entity::new().set_type(Type::Table);
32638    /// let x1 = Entity::new().set_type(Type::Fileset);
32639    /// ```
32640    pub fn set_type<T: std::convert::Into<crate::model::entity::Type>>(mut self, v: T) -> Self {
32641        self.r#type = v.into();
32642        self
32643    }
32644
32645    /// Sets the value of [asset][crate::model::Entity::asset].
32646    ///
32647    /// # Example
32648    /// ```ignore,no_run
32649    /// # use google_cloud_dataplex_v1::model::Entity;
32650    /// let x = Entity::new().set_asset("example");
32651    /// ```
32652    pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32653        self.asset = v.into();
32654        self
32655    }
32656
32657    /// Sets the value of [data_path][crate::model::Entity::data_path].
32658    ///
32659    /// # Example
32660    /// ```ignore,no_run
32661    /// # use google_cloud_dataplex_v1::model::Entity;
32662    /// let x = Entity::new().set_data_path("example");
32663    /// ```
32664    pub fn set_data_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32665        self.data_path = v.into();
32666        self
32667    }
32668
32669    /// Sets the value of [data_path_pattern][crate::model::Entity::data_path_pattern].
32670    ///
32671    /// # Example
32672    /// ```ignore,no_run
32673    /// # use google_cloud_dataplex_v1::model::Entity;
32674    /// let x = Entity::new().set_data_path_pattern("example");
32675    /// ```
32676    pub fn set_data_path_pattern<T: std::convert::Into<std::string::String>>(
32677        mut self,
32678        v: T,
32679    ) -> Self {
32680        self.data_path_pattern = v.into();
32681        self
32682    }
32683
32684    /// Sets the value of [catalog_entry][crate::model::Entity::catalog_entry].
32685    ///
32686    /// # Example
32687    /// ```ignore,no_run
32688    /// # use google_cloud_dataplex_v1::model::Entity;
32689    /// let x = Entity::new().set_catalog_entry("example");
32690    /// ```
32691    pub fn set_catalog_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32692        self.catalog_entry = v.into();
32693        self
32694    }
32695
32696    /// Sets the value of [system][crate::model::Entity::system].
32697    ///
32698    /// # Example
32699    /// ```ignore,no_run
32700    /// # use google_cloud_dataplex_v1::model::Entity;
32701    /// use google_cloud_dataplex_v1::model::StorageSystem;
32702    /// let x0 = Entity::new().set_system(StorageSystem::CloudStorage);
32703    /// let x1 = Entity::new().set_system(StorageSystem::Bigquery);
32704    /// ```
32705    pub fn set_system<T: std::convert::Into<crate::model::StorageSystem>>(mut self, v: T) -> Self {
32706        self.system = v.into();
32707        self
32708    }
32709
32710    /// Sets the value of [format][crate::model::Entity::format].
32711    ///
32712    /// # Example
32713    /// ```ignore,no_run
32714    /// # use google_cloud_dataplex_v1::model::Entity;
32715    /// use google_cloud_dataplex_v1::model::StorageFormat;
32716    /// let x = Entity::new().set_format(StorageFormat::default()/* use setters */);
32717    /// ```
32718    pub fn set_format<T>(mut self, v: T) -> Self
32719    where
32720        T: std::convert::Into<crate::model::StorageFormat>,
32721    {
32722        self.format = std::option::Option::Some(v.into());
32723        self
32724    }
32725
32726    /// Sets or clears the value of [format][crate::model::Entity::format].
32727    ///
32728    /// # Example
32729    /// ```ignore,no_run
32730    /// # use google_cloud_dataplex_v1::model::Entity;
32731    /// use google_cloud_dataplex_v1::model::StorageFormat;
32732    /// let x = Entity::new().set_or_clear_format(Some(StorageFormat::default()/* use setters */));
32733    /// let x = Entity::new().set_or_clear_format(None::<StorageFormat>);
32734    /// ```
32735    pub fn set_or_clear_format<T>(mut self, v: std::option::Option<T>) -> Self
32736    where
32737        T: std::convert::Into<crate::model::StorageFormat>,
32738    {
32739        self.format = v.map(|x| x.into());
32740        self
32741    }
32742
32743    /// Sets the value of [compatibility][crate::model::Entity::compatibility].
32744    ///
32745    /// # Example
32746    /// ```ignore,no_run
32747    /// # use google_cloud_dataplex_v1::model::Entity;
32748    /// use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32749    /// let x = Entity::new().set_compatibility(CompatibilityStatus::default()/* use setters */);
32750    /// ```
32751    pub fn set_compatibility<T>(mut self, v: T) -> Self
32752    where
32753        T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
32754    {
32755        self.compatibility = std::option::Option::Some(v.into());
32756        self
32757    }
32758
32759    /// Sets or clears the value of [compatibility][crate::model::Entity::compatibility].
32760    ///
32761    /// # Example
32762    /// ```ignore,no_run
32763    /// # use google_cloud_dataplex_v1::model::Entity;
32764    /// use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32765    /// let x = Entity::new().set_or_clear_compatibility(Some(CompatibilityStatus::default()/* use setters */));
32766    /// let x = Entity::new().set_or_clear_compatibility(None::<CompatibilityStatus>);
32767    /// ```
32768    pub fn set_or_clear_compatibility<T>(mut self, v: std::option::Option<T>) -> Self
32769    where
32770        T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
32771    {
32772        self.compatibility = v.map(|x| x.into());
32773        self
32774    }
32775
32776    /// Sets the value of [access][crate::model::Entity::access].
32777    ///
32778    /// # Example
32779    /// ```ignore,no_run
32780    /// # use google_cloud_dataplex_v1::model::Entity;
32781    /// use google_cloud_dataplex_v1::model::StorageAccess;
32782    /// let x = Entity::new().set_access(StorageAccess::default()/* use setters */);
32783    /// ```
32784    pub fn set_access<T>(mut self, v: T) -> Self
32785    where
32786        T: std::convert::Into<crate::model::StorageAccess>,
32787    {
32788        self.access = std::option::Option::Some(v.into());
32789        self
32790    }
32791
32792    /// Sets or clears the value of [access][crate::model::Entity::access].
32793    ///
32794    /// # Example
32795    /// ```ignore,no_run
32796    /// # use google_cloud_dataplex_v1::model::Entity;
32797    /// use google_cloud_dataplex_v1::model::StorageAccess;
32798    /// let x = Entity::new().set_or_clear_access(Some(StorageAccess::default()/* use setters */));
32799    /// let x = Entity::new().set_or_clear_access(None::<StorageAccess>);
32800    /// ```
32801    pub fn set_or_clear_access<T>(mut self, v: std::option::Option<T>) -> Self
32802    where
32803        T: std::convert::Into<crate::model::StorageAccess>,
32804    {
32805        self.access = v.map(|x| x.into());
32806        self
32807    }
32808
32809    /// Sets the value of [uid][crate::model::Entity::uid].
32810    ///
32811    /// # Example
32812    /// ```ignore,no_run
32813    /// # use google_cloud_dataplex_v1::model::Entity;
32814    /// let x = Entity::new().set_uid("example");
32815    /// ```
32816    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32817        self.uid = v.into();
32818        self
32819    }
32820
32821    /// Sets the value of [schema][crate::model::Entity::schema].
32822    ///
32823    /// # Example
32824    /// ```ignore,no_run
32825    /// # use google_cloud_dataplex_v1::model::Entity;
32826    /// use google_cloud_dataplex_v1::model::Schema;
32827    /// let x = Entity::new().set_schema(Schema::default()/* use setters */);
32828    /// ```
32829    pub fn set_schema<T>(mut self, v: T) -> Self
32830    where
32831        T: std::convert::Into<crate::model::Schema>,
32832    {
32833        self.schema = std::option::Option::Some(v.into());
32834        self
32835    }
32836
32837    /// Sets or clears the value of [schema][crate::model::Entity::schema].
32838    ///
32839    /// # Example
32840    /// ```ignore,no_run
32841    /// # use google_cloud_dataplex_v1::model::Entity;
32842    /// use google_cloud_dataplex_v1::model::Schema;
32843    /// let x = Entity::new().set_or_clear_schema(Some(Schema::default()/* use setters */));
32844    /// let x = Entity::new().set_or_clear_schema(None::<Schema>);
32845    /// ```
32846    pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
32847    where
32848        T: std::convert::Into<crate::model::Schema>,
32849    {
32850        self.schema = v.map(|x| x.into());
32851        self
32852    }
32853}
32854
32855impl wkt::message::Message for Entity {
32856    fn typename() -> &'static str {
32857        "type.googleapis.com/google.cloud.dataplex.v1.Entity"
32858    }
32859}
32860
32861/// Defines additional types related to [Entity].
32862pub mod entity {
32863    #[allow(unused_imports)]
32864    use super::*;
32865
32866    /// Provides compatibility information for various metadata stores.
32867    #[derive(Clone, Default, PartialEq)]
32868    #[non_exhaustive]
32869    pub struct CompatibilityStatus {
32870        /// Output only. Whether this entity is compatible with Hive Metastore.
32871        pub hive_metastore:
32872            std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
32873
32874        /// Output only. Whether this entity is compatible with BigQuery.
32875        pub bigquery:
32876            std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
32877
32878        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32879    }
32880
32881    impl CompatibilityStatus {
32882        pub fn new() -> Self {
32883            std::default::Default::default()
32884        }
32885
32886        /// Sets the value of [hive_metastore][crate::model::entity::CompatibilityStatus::hive_metastore].
32887        ///
32888        /// # Example
32889        /// ```ignore,no_run
32890        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32891        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32892        /// let x = CompatibilityStatus::new().set_hive_metastore(Compatibility::default()/* use setters */);
32893        /// ```
32894        pub fn set_hive_metastore<T>(mut self, v: T) -> Self
32895        where
32896            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32897        {
32898            self.hive_metastore = std::option::Option::Some(v.into());
32899            self
32900        }
32901
32902        /// Sets or clears the value of [hive_metastore][crate::model::entity::CompatibilityStatus::hive_metastore].
32903        ///
32904        /// # Example
32905        /// ```ignore,no_run
32906        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32907        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32908        /// let x = CompatibilityStatus::new().set_or_clear_hive_metastore(Some(Compatibility::default()/* use setters */));
32909        /// let x = CompatibilityStatus::new().set_or_clear_hive_metastore(None::<Compatibility>);
32910        /// ```
32911        pub fn set_or_clear_hive_metastore<T>(mut self, v: std::option::Option<T>) -> Self
32912        where
32913            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32914        {
32915            self.hive_metastore = v.map(|x| x.into());
32916            self
32917        }
32918
32919        /// Sets the value of [bigquery][crate::model::entity::CompatibilityStatus::bigquery].
32920        ///
32921        /// # Example
32922        /// ```ignore,no_run
32923        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32924        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32925        /// let x = CompatibilityStatus::new().set_bigquery(Compatibility::default()/* use setters */);
32926        /// ```
32927        pub fn set_bigquery<T>(mut self, v: T) -> Self
32928        where
32929            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32930        {
32931            self.bigquery = std::option::Option::Some(v.into());
32932            self
32933        }
32934
32935        /// Sets or clears the value of [bigquery][crate::model::entity::CompatibilityStatus::bigquery].
32936        ///
32937        /// # Example
32938        /// ```ignore,no_run
32939        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32940        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32941        /// let x = CompatibilityStatus::new().set_or_clear_bigquery(Some(Compatibility::default()/* use setters */));
32942        /// let x = CompatibilityStatus::new().set_or_clear_bigquery(None::<Compatibility>);
32943        /// ```
32944        pub fn set_or_clear_bigquery<T>(mut self, v: std::option::Option<T>) -> Self
32945        where
32946            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32947        {
32948            self.bigquery = v.map(|x| x.into());
32949            self
32950        }
32951    }
32952
32953    impl wkt::message::Message for CompatibilityStatus {
32954        fn typename() -> &'static str {
32955            "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus"
32956        }
32957    }
32958
32959    /// Defines additional types related to [CompatibilityStatus].
32960    pub mod compatibility_status {
32961        #[allow(unused_imports)]
32962        use super::*;
32963
32964        /// Provides compatibility information for a specific metadata store.
32965        #[derive(Clone, Default, PartialEq)]
32966        #[non_exhaustive]
32967        pub struct Compatibility {
32968            /// Output only. Whether the entity is compatible and can be represented in
32969            /// the metadata store.
32970            pub compatible: bool,
32971
32972            /// Output only. Provides additional detail if the entity is incompatible
32973            /// with the metadata store.
32974            pub reason: std::string::String,
32975
32976            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32977        }
32978
32979        impl Compatibility {
32980            pub fn new() -> Self {
32981                std::default::Default::default()
32982            }
32983
32984            /// Sets the value of [compatible][crate::model::entity::compatibility_status::Compatibility::compatible].
32985            ///
32986            /// # Example
32987            /// ```ignore,no_run
32988            /// # use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32989            /// let x = Compatibility::new().set_compatible(true);
32990            /// ```
32991            pub fn set_compatible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32992                self.compatible = v.into();
32993                self
32994            }
32995
32996            /// Sets the value of [reason][crate::model::entity::compatibility_status::Compatibility::reason].
32997            ///
32998            /// # Example
32999            /// ```ignore,no_run
33000            /// # use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
33001            /// let x = Compatibility::new().set_reason("example");
33002            /// ```
33003            pub fn set_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33004                self.reason = v.into();
33005                self
33006            }
33007        }
33008
33009        impl wkt::message::Message for Compatibility {
33010            fn typename() -> &'static str {
33011                "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"
33012            }
33013        }
33014    }
33015
33016    /// The type of entity.
33017    ///
33018    /// # Working with unknown values
33019    ///
33020    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33021    /// additional enum variants at any time. Adding new variants is not considered
33022    /// a breaking change. Applications should write their code in anticipation of:
33023    ///
33024    /// - New values appearing in future releases of the client library, **and**
33025    /// - New values received dynamically, without application changes.
33026    ///
33027    /// Please consult the [Working with enums] section in the user guide for some
33028    /// guidelines.
33029    ///
33030    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33031    #[derive(Clone, Debug, PartialEq)]
33032    #[non_exhaustive]
33033    pub enum Type {
33034        /// Type unspecified.
33035        Unspecified,
33036        /// Structured and semi-structured data.
33037        Table,
33038        /// Unstructured data.
33039        Fileset,
33040        /// If set, the enum was initialized with an unknown value.
33041        ///
33042        /// Applications can examine the value using [Type::value] or
33043        /// [Type::name].
33044        UnknownValue(r#type::UnknownValue),
33045    }
33046
33047    #[doc(hidden)]
33048    pub mod r#type {
33049        #[allow(unused_imports)]
33050        use super::*;
33051        #[derive(Clone, Debug, PartialEq)]
33052        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33053    }
33054
33055    impl Type {
33056        /// Gets the enum value.
33057        ///
33058        /// Returns `None` if the enum contains an unknown value deserialized from
33059        /// the string representation of enums.
33060        pub fn value(&self) -> std::option::Option<i32> {
33061            match self {
33062                Self::Unspecified => std::option::Option::Some(0),
33063                Self::Table => std::option::Option::Some(1),
33064                Self::Fileset => std::option::Option::Some(2),
33065                Self::UnknownValue(u) => u.0.value(),
33066            }
33067        }
33068
33069        /// Gets the enum value as a string.
33070        ///
33071        /// Returns `None` if the enum contains an unknown value deserialized from
33072        /// the integer representation of enums.
33073        pub fn name(&self) -> std::option::Option<&str> {
33074            match self {
33075                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
33076                Self::Table => std::option::Option::Some("TABLE"),
33077                Self::Fileset => std::option::Option::Some("FILESET"),
33078                Self::UnknownValue(u) => u.0.name(),
33079            }
33080        }
33081    }
33082
33083    impl std::default::Default for Type {
33084        fn default() -> Self {
33085            use std::convert::From;
33086            Self::from(0)
33087        }
33088    }
33089
33090    impl std::fmt::Display for Type {
33091        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33092            wkt::internal::display_enum(f, self.name(), self.value())
33093        }
33094    }
33095
33096    impl std::convert::From<i32> for Type {
33097        fn from(value: i32) -> Self {
33098            match value {
33099                0 => Self::Unspecified,
33100                1 => Self::Table,
33101                2 => Self::Fileset,
33102                _ => Self::UnknownValue(r#type::UnknownValue(
33103                    wkt::internal::UnknownEnumValue::Integer(value),
33104                )),
33105            }
33106        }
33107    }
33108
33109    impl std::convert::From<&str> for Type {
33110        fn from(value: &str) -> Self {
33111            use std::string::ToString;
33112            match value {
33113                "TYPE_UNSPECIFIED" => Self::Unspecified,
33114                "TABLE" => Self::Table,
33115                "FILESET" => Self::Fileset,
33116                _ => Self::UnknownValue(r#type::UnknownValue(
33117                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33118                )),
33119            }
33120        }
33121    }
33122
33123    impl serde::ser::Serialize for Type {
33124        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
33125        where
33126            S: serde::Serializer,
33127        {
33128            match self {
33129                Self::Unspecified => serializer.serialize_i32(0),
33130                Self::Table => serializer.serialize_i32(1),
33131                Self::Fileset => serializer.serialize_i32(2),
33132                Self::UnknownValue(u) => u.0.serialize(serializer),
33133            }
33134        }
33135    }
33136
33137    impl<'de> serde::de::Deserialize<'de> for Type {
33138        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
33139        where
33140            D: serde::Deserializer<'de>,
33141        {
33142            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
33143                ".google.cloud.dataplex.v1.Entity.Type",
33144            ))
33145        }
33146    }
33147}
33148
33149/// Represents partition metadata contained within entity instances.
33150#[derive(Clone, Default, PartialEq)]
33151#[non_exhaustive]
33152pub struct Partition {
33153    /// Output only. Partition values used in the HTTP URL must be
33154    /// double encoded. For example, `url_encode(url_encode(value))` can be used
33155    /// to encode "US:CA/CA#Sunnyvale so that the request URL ends
33156    /// with "/partitions/US%253ACA/CA%2523Sunnyvale".
33157    /// The name field in the response retains the encoded format.
33158    pub name: std::string::String,
33159
33160    /// Required. Immutable. The set of values representing the partition, which
33161    /// correspond to the partition schema defined in the parent entity.
33162    pub values: std::vec::Vec<std::string::String>,
33163
33164    /// Required. Immutable. The location of the entity data within the partition,
33165    /// for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or
33166    /// `projects/<project_id>/datasets/<dataset_id>/tables/<table_id>`
33167    pub location: std::string::String,
33168
33169    /// Optional. The etag for this partition.
33170    #[deprecated]
33171    pub etag: std::string::String,
33172
33173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33174}
33175
33176impl Partition {
33177    pub fn new() -> Self {
33178        std::default::Default::default()
33179    }
33180
33181    /// Sets the value of [name][crate::model::Partition::name].
33182    ///
33183    /// # Example
33184    /// ```ignore,no_run
33185    /// # use google_cloud_dataplex_v1::model::Partition;
33186    /// let x = Partition::new().set_name("example");
33187    /// ```
33188    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33189        self.name = v.into();
33190        self
33191    }
33192
33193    /// Sets the value of [values][crate::model::Partition::values].
33194    ///
33195    /// # Example
33196    /// ```ignore,no_run
33197    /// # use google_cloud_dataplex_v1::model::Partition;
33198    /// let x = Partition::new().set_values(["a", "b", "c"]);
33199    /// ```
33200    pub fn set_values<T, V>(mut self, v: T) -> Self
33201    where
33202        T: std::iter::IntoIterator<Item = V>,
33203        V: std::convert::Into<std::string::String>,
33204    {
33205        use std::iter::Iterator;
33206        self.values = v.into_iter().map(|i| i.into()).collect();
33207        self
33208    }
33209
33210    /// Sets the value of [location][crate::model::Partition::location].
33211    ///
33212    /// # Example
33213    /// ```ignore,no_run
33214    /// # use google_cloud_dataplex_v1::model::Partition;
33215    /// let x = Partition::new().set_location("example");
33216    /// ```
33217    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33218        self.location = v.into();
33219        self
33220    }
33221
33222    /// Sets the value of [etag][crate::model::Partition::etag].
33223    ///
33224    /// # Example
33225    /// ```ignore,no_run
33226    /// # use google_cloud_dataplex_v1::model::Partition;
33227    /// let x = Partition::new().set_etag("example");
33228    /// ```
33229    #[deprecated]
33230    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33231        self.etag = v.into();
33232        self
33233    }
33234}
33235
33236impl wkt::message::Message for Partition {
33237    fn typename() -> &'static str {
33238        "type.googleapis.com/google.cloud.dataplex.v1.Partition"
33239    }
33240}
33241
33242/// Schema information describing the structure and layout of the data.
33243#[derive(Clone, Default, PartialEq)]
33244#[non_exhaustive]
33245pub struct Schema {
33246    /// Required. Set to `true` if user-managed or `false` if managed by Dataplex
33247    /// Universal Catalog. The default is `false` (managed by Dataplex Universal
33248    /// Catalog).
33249    ///
33250    /// - Set to `false`to enable Dataplex Universal Catalog discovery to update
33251    ///   the schema.
33252    ///   including new data discovery, schema inference, and schema evolution.
33253    ///   Users retain the ability to input and edit the schema. Dataplex Universal
33254    ///   Catalog treats schema input by the user as though produced by a previous
33255    ///   Dataplex Universal Catalog discovery operation, and it will evolve the
33256    ///   schema and take action based on that treatment.
33257    ///
33258    /// - Set to `true` to fully manage the entity
33259    ///   schema. This setting guarantees that Dataplex Universal Catalog will not
33260    ///   change schema fields.
33261    ///
33262    pub user_managed: bool,
33263
33264    /// Optional. The sequence of fields describing data in table entities.
33265    /// **Note:** BigQuery SchemaFields are immutable.
33266    pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
33267
33268    /// Optional. The sequence of fields describing the partition structure in
33269    /// entities. If this field is empty, there are no partitions within the data.
33270    pub partition_fields: std::vec::Vec<crate::model::schema::PartitionField>,
33271
33272    /// Optional. The structure of paths containing partition data within the
33273    /// entity.
33274    pub partition_style: crate::model::schema::PartitionStyle,
33275
33276    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33277}
33278
33279impl Schema {
33280    pub fn new() -> Self {
33281        std::default::Default::default()
33282    }
33283
33284    /// Sets the value of [user_managed][crate::model::Schema::user_managed].
33285    ///
33286    /// # Example
33287    /// ```ignore,no_run
33288    /// # use google_cloud_dataplex_v1::model::Schema;
33289    /// let x = Schema::new().set_user_managed(true);
33290    /// ```
33291    pub fn set_user_managed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33292        self.user_managed = v.into();
33293        self
33294    }
33295
33296    /// Sets the value of [fields][crate::model::Schema::fields].
33297    ///
33298    /// # Example
33299    /// ```ignore,no_run
33300    /// # use google_cloud_dataplex_v1::model::Schema;
33301    /// use google_cloud_dataplex_v1::model::schema::SchemaField;
33302    /// let x = Schema::new()
33303    ///     .set_fields([
33304    ///         SchemaField::default()/* use setters */,
33305    ///         SchemaField::default()/* use (different) setters */,
33306    ///     ]);
33307    /// ```
33308    pub fn set_fields<T, V>(mut self, v: T) -> Self
33309    where
33310        T: std::iter::IntoIterator<Item = V>,
33311        V: std::convert::Into<crate::model::schema::SchemaField>,
33312    {
33313        use std::iter::Iterator;
33314        self.fields = v.into_iter().map(|i| i.into()).collect();
33315        self
33316    }
33317
33318    /// Sets the value of [partition_fields][crate::model::Schema::partition_fields].
33319    ///
33320    /// # Example
33321    /// ```ignore,no_run
33322    /// # use google_cloud_dataplex_v1::model::Schema;
33323    /// use google_cloud_dataplex_v1::model::schema::PartitionField;
33324    /// let x = Schema::new()
33325    ///     .set_partition_fields([
33326    ///         PartitionField::default()/* use setters */,
33327    ///         PartitionField::default()/* use (different) setters */,
33328    ///     ]);
33329    /// ```
33330    pub fn set_partition_fields<T, V>(mut self, v: T) -> Self
33331    where
33332        T: std::iter::IntoIterator<Item = V>,
33333        V: std::convert::Into<crate::model::schema::PartitionField>,
33334    {
33335        use std::iter::Iterator;
33336        self.partition_fields = v.into_iter().map(|i| i.into()).collect();
33337        self
33338    }
33339
33340    /// Sets the value of [partition_style][crate::model::Schema::partition_style].
33341    ///
33342    /// # Example
33343    /// ```ignore,no_run
33344    /// # use google_cloud_dataplex_v1::model::Schema;
33345    /// use google_cloud_dataplex_v1::model::schema::PartitionStyle;
33346    /// let x0 = Schema::new().set_partition_style(PartitionStyle::HiveCompatible);
33347    /// ```
33348    pub fn set_partition_style<T: std::convert::Into<crate::model::schema::PartitionStyle>>(
33349        mut self,
33350        v: T,
33351    ) -> Self {
33352        self.partition_style = v.into();
33353        self
33354    }
33355}
33356
33357impl wkt::message::Message for Schema {
33358    fn typename() -> &'static str {
33359        "type.googleapis.com/google.cloud.dataplex.v1.Schema"
33360    }
33361}
33362
33363/// Defines additional types related to [Schema].
33364pub mod schema {
33365    #[allow(unused_imports)]
33366    use super::*;
33367
33368    /// Represents a column field within a table schema.
33369    #[derive(Clone, Default, PartialEq)]
33370    #[non_exhaustive]
33371    pub struct SchemaField {
33372        /// Required. The name of the field. Must contain only letters, numbers and
33373        /// underscores, with a maximum length of 767 characters,
33374        /// and must begin with a letter or underscore.
33375        pub name: std::string::String,
33376
33377        /// Optional. User friendly field description. Must be less than or equal to
33378        /// 1024 characters.
33379        pub description: std::string::String,
33380
33381        /// Required. The type of field.
33382        pub r#type: crate::model::schema::Type,
33383
33384        /// Required. Additional field semantics.
33385        pub mode: crate::model::schema::Mode,
33386
33387        /// Optional. Any nested field for complex types.
33388        pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
33389
33390        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33391    }
33392
33393    impl SchemaField {
33394        pub fn new() -> Self {
33395            std::default::Default::default()
33396        }
33397
33398        /// Sets the value of [name][crate::model::schema::SchemaField::name].
33399        ///
33400        /// # Example
33401        /// ```ignore,no_run
33402        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33403        /// let x = SchemaField::new().set_name("example");
33404        /// ```
33405        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33406            self.name = v.into();
33407            self
33408        }
33409
33410        /// Sets the value of [description][crate::model::schema::SchemaField::description].
33411        ///
33412        /// # Example
33413        /// ```ignore,no_run
33414        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33415        /// let x = SchemaField::new().set_description("example");
33416        /// ```
33417        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33418            self.description = v.into();
33419            self
33420        }
33421
33422        /// Sets the value of [r#type][crate::model::schema::SchemaField::type].
33423        ///
33424        /// # Example
33425        /// ```ignore,no_run
33426        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33427        /// use google_cloud_dataplex_v1::model::schema::Type;
33428        /// let x0 = SchemaField::new().set_type(Type::Boolean);
33429        /// let x1 = SchemaField::new().set_type(Type::Byte);
33430        /// let x2 = SchemaField::new().set_type(Type::Int16);
33431        /// ```
33432        pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
33433            self.r#type = v.into();
33434            self
33435        }
33436
33437        /// Sets the value of [mode][crate::model::schema::SchemaField::mode].
33438        ///
33439        /// # Example
33440        /// ```ignore,no_run
33441        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33442        /// use google_cloud_dataplex_v1::model::schema::Mode;
33443        /// let x0 = SchemaField::new().set_mode(Mode::Required);
33444        /// let x1 = SchemaField::new().set_mode(Mode::Nullable);
33445        /// let x2 = SchemaField::new().set_mode(Mode::Repeated);
33446        /// ```
33447        pub fn set_mode<T: std::convert::Into<crate::model::schema::Mode>>(mut self, v: T) -> Self {
33448            self.mode = v.into();
33449            self
33450        }
33451
33452        /// Sets the value of [fields][crate::model::schema::SchemaField::fields].
33453        ///
33454        /// # Example
33455        /// ```ignore,no_run
33456        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33457        /// let x = SchemaField::new()
33458        ///     .set_fields([
33459        ///         SchemaField::default()/* use setters */,
33460        ///         SchemaField::default()/* use (different) setters */,
33461        ///     ]);
33462        /// ```
33463        pub fn set_fields<T, V>(mut self, v: T) -> Self
33464        where
33465            T: std::iter::IntoIterator<Item = V>,
33466            V: std::convert::Into<crate::model::schema::SchemaField>,
33467        {
33468            use std::iter::Iterator;
33469            self.fields = v.into_iter().map(|i| i.into()).collect();
33470            self
33471        }
33472    }
33473
33474    impl wkt::message::Message for SchemaField {
33475        fn typename() -> &'static str {
33476            "type.googleapis.com/google.cloud.dataplex.v1.Schema.SchemaField"
33477        }
33478    }
33479
33480    /// Represents a key field within the entity's partition structure. You could
33481    /// have up to 20 partition fields, but only the first 10 partitions have the
33482    /// filtering ability due to performance consideration. **Note:**
33483    /// Partition fields are immutable.
33484    #[derive(Clone, Default, PartialEq)]
33485    #[non_exhaustive]
33486    pub struct PartitionField {
33487        /// Required. Partition field name must consist of letters, numbers, and
33488        /// underscores only, with a maximum of length of 256 characters, and must
33489        /// begin with a letter or underscore..
33490        pub name: std::string::String,
33491
33492        /// Required. Immutable. The type of field.
33493        pub r#type: crate::model::schema::Type,
33494
33495        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33496    }
33497
33498    impl PartitionField {
33499        pub fn new() -> Self {
33500            std::default::Default::default()
33501        }
33502
33503        /// Sets the value of [name][crate::model::schema::PartitionField::name].
33504        ///
33505        /// # Example
33506        /// ```ignore,no_run
33507        /// # use google_cloud_dataplex_v1::model::schema::PartitionField;
33508        /// let x = PartitionField::new().set_name("example");
33509        /// ```
33510        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33511            self.name = v.into();
33512            self
33513        }
33514
33515        /// Sets the value of [r#type][crate::model::schema::PartitionField::type].
33516        ///
33517        /// # Example
33518        /// ```ignore,no_run
33519        /// # use google_cloud_dataplex_v1::model::schema::PartitionField;
33520        /// use google_cloud_dataplex_v1::model::schema::Type;
33521        /// let x0 = PartitionField::new().set_type(Type::Boolean);
33522        /// let x1 = PartitionField::new().set_type(Type::Byte);
33523        /// let x2 = PartitionField::new().set_type(Type::Int16);
33524        /// ```
33525        pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
33526            self.r#type = v.into();
33527            self
33528        }
33529    }
33530
33531    impl wkt::message::Message for PartitionField {
33532        fn typename() -> &'static str {
33533            "type.googleapis.com/google.cloud.dataplex.v1.Schema.PartitionField"
33534        }
33535    }
33536
33537    /// Type information for fields in schemas and partition schemas.
33538    ///
33539    /// # Working with unknown values
33540    ///
33541    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33542    /// additional enum variants at any time. Adding new variants is not considered
33543    /// a breaking change. Applications should write their code in anticipation of:
33544    ///
33545    /// - New values appearing in future releases of the client library, **and**
33546    /// - New values received dynamically, without application changes.
33547    ///
33548    /// Please consult the [Working with enums] section in the user guide for some
33549    /// guidelines.
33550    ///
33551    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33552    #[derive(Clone, Debug, PartialEq)]
33553    #[non_exhaustive]
33554    pub enum Type {
33555        /// SchemaType unspecified.
33556        Unspecified,
33557        /// Boolean field.
33558        Boolean,
33559        /// Single byte numeric field.
33560        Byte,
33561        /// 16-bit numeric field.
33562        Int16,
33563        /// 32-bit numeric field.
33564        Int32,
33565        /// 64-bit numeric field.
33566        Int64,
33567        /// Floating point numeric field.
33568        Float,
33569        /// Double precision numeric field.
33570        Double,
33571        /// Real value numeric field.
33572        Decimal,
33573        /// Sequence of characters field.
33574        String,
33575        /// Sequence of bytes field.
33576        Binary,
33577        /// Date and time field.
33578        Timestamp,
33579        /// Date field.
33580        Date,
33581        /// Time field.
33582        Time,
33583        /// Structured field. Nested fields that define the structure of the map.
33584        /// If all nested fields are nullable, this field represents a union.
33585        Record,
33586        /// Null field that does not have values.
33587        Null,
33588        /// If set, the enum was initialized with an unknown value.
33589        ///
33590        /// Applications can examine the value using [Type::value] or
33591        /// [Type::name].
33592        UnknownValue(r#type::UnknownValue),
33593    }
33594
33595    #[doc(hidden)]
33596    pub mod r#type {
33597        #[allow(unused_imports)]
33598        use super::*;
33599        #[derive(Clone, Debug, PartialEq)]
33600        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33601    }
33602
33603    impl Type {
33604        /// Gets the enum value.
33605        ///
33606        /// Returns `None` if the enum contains an unknown value deserialized from
33607        /// the string representation of enums.
33608        pub fn value(&self) -> std::option::Option<i32> {
33609            match self {
33610                Self::Unspecified => std::option::Option::Some(0),
33611                Self::Boolean => std::option::Option::Some(1),
33612                Self::Byte => std::option::Option::Some(2),
33613                Self::Int16 => std::option::Option::Some(3),
33614                Self::Int32 => std::option::Option::Some(4),
33615                Self::Int64 => std::option::Option::Some(5),
33616                Self::Float => std::option::Option::Some(6),
33617                Self::Double => std::option::Option::Some(7),
33618                Self::Decimal => std::option::Option::Some(8),
33619                Self::String => std::option::Option::Some(9),
33620                Self::Binary => std::option::Option::Some(10),
33621                Self::Timestamp => std::option::Option::Some(11),
33622                Self::Date => std::option::Option::Some(12),
33623                Self::Time => std::option::Option::Some(13),
33624                Self::Record => std::option::Option::Some(14),
33625                Self::Null => std::option::Option::Some(100),
33626                Self::UnknownValue(u) => u.0.value(),
33627            }
33628        }
33629
33630        /// Gets the enum value as a string.
33631        ///
33632        /// Returns `None` if the enum contains an unknown value deserialized from
33633        /// the integer representation of enums.
33634        pub fn name(&self) -> std::option::Option<&str> {
33635            match self {
33636                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
33637                Self::Boolean => std::option::Option::Some("BOOLEAN"),
33638                Self::Byte => std::option::Option::Some("BYTE"),
33639                Self::Int16 => std::option::Option::Some("INT16"),
33640                Self::Int32 => std::option::Option::Some("INT32"),
33641                Self::Int64 => std::option::Option::Some("INT64"),
33642                Self::Float => std::option::Option::Some("FLOAT"),
33643                Self::Double => std::option::Option::Some("DOUBLE"),
33644                Self::Decimal => std::option::Option::Some("DECIMAL"),
33645                Self::String => std::option::Option::Some("STRING"),
33646                Self::Binary => std::option::Option::Some("BINARY"),
33647                Self::Timestamp => std::option::Option::Some("TIMESTAMP"),
33648                Self::Date => std::option::Option::Some("DATE"),
33649                Self::Time => std::option::Option::Some("TIME"),
33650                Self::Record => std::option::Option::Some("RECORD"),
33651                Self::Null => std::option::Option::Some("NULL"),
33652                Self::UnknownValue(u) => u.0.name(),
33653            }
33654        }
33655    }
33656
33657    impl std::default::Default for Type {
33658        fn default() -> Self {
33659            use std::convert::From;
33660            Self::from(0)
33661        }
33662    }
33663
33664    impl std::fmt::Display for Type {
33665        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33666            wkt::internal::display_enum(f, self.name(), self.value())
33667        }
33668    }
33669
33670    impl std::convert::From<i32> for Type {
33671        fn from(value: i32) -> Self {
33672            match value {
33673                0 => Self::Unspecified,
33674                1 => Self::Boolean,
33675                2 => Self::Byte,
33676                3 => Self::Int16,
33677                4 => Self::Int32,
33678                5 => Self::Int64,
33679                6 => Self::Float,
33680                7 => Self::Double,
33681                8 => Self::Decimal,
33682                9 => Self::String,
33683                10 => Self::Binary,
33684                11 => Self::Timestamp,
33685                12 => Self::Date,
33686                13 => Self::Time,
33687                14 => Self::Record,
33688                100 => Self::Null,
33689                _ => Self::UnknownValue(r#type::UnknownValue(
33690                    wkt::internal::UnknownEnumValue::Integer(value),
33691                )),
33692            }
33693        }
33694    }
33695
33696    impl std::convert::From<&str> for Type {
33697        fn from(value: &str) -> Self {
33698            use std::string::ToString;
33699            match value {
33700                "TYPE_UNSPECIFIED" => Self::Unspecified,
33701                "BOOLEAN" => Self::Boolean,
33702                "BYTE" => Self::Byte,
33703                "INT16" => Self::Int16,
33704                "INT32" => Self::Int32,
33705                "INT64" => Self::Int64,
33706                "FLOAT" => Self::Float,
33707                "DOUBLE" => Self::Double,
33708                "DECIMAL" => Self::Decimal,
33709                "STRING" => Self::String,
33710                "BINARY" => Self::Binary,
33711                "TIMESTAMP" => Self::Timestamp,
33712                "DATE" => Self::Date,
33713                "TIME" => Self::Time,
33714                "RECORD" => Self::Record,
33715                "NULL" => Self::Null,
33716                _ => Self::UnknownValue(r#type::UnknownValue(
33717                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33718                )),
33719            }
33720        }
33721    }
33722
33723    impl serde::ser::Serialize for Type {
33724        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
33725        where
33726            S: serde::Serializer,
33727        {
33728            match self {
33729                Self::Unspecified => serializer.serialize_i32(0),
33730                Self::Boolean => serializer.serialize_i32(1),
33731                Self::Byte => serializer.serialize_i32(2),
33732                Self::Int16 => serializer.serialize_i32(3),
33733                Self::Int32 => serializer.serialize_i32(4),
33734                Self::Int64 => serializer.serialize_i32(5),
33735                Self::Float => serializer.serialize_i32(6),
33736                Self::Double => serializer.serialize_i32(7),
33737                Self::Decimal => serializer.serialize_i32(8),
33738                Self::String => serializer.serialize_i32(9),
33739                Self::Binary => serializer.serialize_i32(10),
33740                Self::Timestamp => serializer.serialize_i32(11),
33741                Self::Date => serializer.serialize_i32(12),
33742                Self::Time => serializer.serialize_i32(13),
33743                Self::Record => serializer.serialize_i32(14),
33744                Self::Null => serializer.serialize_i32(100),
33745                Self::UnknownValue(u) => u.0.serialize(serializer),
33746            }
33747        }
33748    }
33749
33750    impl<'de> serde::de::Deserialize<'de> for Type {
33751        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
33752        where
33753            D: serde::Deserializer<'de>,
33754        {
33755            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
33756                ".google.cloud.dataplex.v1.Schema.Type",
33757            ))
33758        }
33759    }
33760
33761    /// Additional qualifiers to define field semantics.
33762    ///
33763    /// # Working with unknown values
33764    ///
33765    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33766    /// additional enum variants at any time. Adding new variants is not considered
33767    /// a breaking change. Applications should write their code in anticipation of:
33768    ///
33769    /// - New values appearing in future releases of the client library, **and**
33770    /// - New values received dynamically, without application changes.
33771    ///
33772    /// Please consult the [Working with enums] section in the user guide for some
33773    /// guidelines.
33774    ///
33775    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33776    #[derive(Clone, Debug, PartialEq)]
33777    #[non_exhaustive]
33778    pub enum Mode {
33779        /// Mode unspecified.
33780        Unspecified,
33781        /// The field has required semantics.
33782        Required,
33783        /// The field has optional semantics, and may be null.
33784        Nullable,
33785        /// The field has repeated (0 or more) semantics, and is a list of values.
33786        Repeated,
33787        /// If set, the enum was initialized with an unknown value.
33788        ///
33789        /// Applications can examine the value using [Mode::value] or
33790        /// [Mode::name].
33791        UnknownValue(mode::UnknownValue),
33792    }
33793
33794    #[doc(hidden)]
33795    pub mod mode {
33796        #[allow(unused_imports)]
33797        use super::*;
33798        #[derive(Clone, Debug, PartialEq)]
33799        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33800    }
33801
33802    impl Mode {
33803        /// Gets the enum value.
33804        ///
33805        /// Returns `None` if the enum contains an unknown value deserialized from
33806        /// the string representation of enums.
33807        pub fn value(&self) -> std::option::Option<i32> {
33808            match self {
33809                Self::Unspecified => std::option::Option::Some(0),
33810                Self::Required => std::option::Option::Some(1),
33811                Self::Nullable => std::option::Option::Some(2),
33812                Self::Repeated => std::option::Option::Some(3),
33813                Self::UnknownValue(u) => u.0.value(),
33814            }
33815        }
33816
33817        /// Gets the enum value as a string.
33818        ///
33819        /// Returns `None` if the enum contains an unknown value deserialized from
33820        /// the integer representation of enums.
33821        pub fn name(&self) -> std::option::Option<&str> {
33822            match self {
33823                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
33824                Self::Required => std::option::Option::Some("REQUIRED"),
33825                Self::Nullable => std::option::Option::Some("NULLABLE"),
33826                Self::Repeated => std::option::Option::Some("REPEATED"),
33827                Self::UnknownValue(u) => u.0.name(),
33828            }
33829        }
33830    }
33831
33832    impl std::default::Default for Mode {
33833        fn default() -> Self {
33834            use std::convert::From;
33835            Self::from(0)
33836        }
33837    }
33838
33839    impl std::fmt::Display for Mode {
33840        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33841            wkt::internal::display_enum(f, self.name(), self.value())
33842        }
33843    }
33844
33845    impl std::convert::From<i32> for Mode {
33846        fn from(value: i32) -> Self {
33847            match value {
33848                0 => Self::Unspecified,
33849                1 => Self::Required,
33850                2 => Self::Nullable,
33851                3 => Self::Repeated,
33852                _ => Self::UnknownValue(mode::UnknownValue(
33853                    wkt::internal::UnknownEnumValue::Integer(value),
33854                )),
33855            }
33856        }
33857    }
33858
33859    impl std::convert::From<&str> for Mode {
33860        fn from(value: &str) -> Self {
33861            use std::string::ToString;
33862            match value {
33863                "MODE_UNSPECIFIED" => Self::Unspecified,
33864                "REQUIRED" => Self::Required,
33865                "NULLABLE" => Self::Nullable,
33866                "REPEATED" => Self::Repeated,
33867                _ => Self::UnknownValue(mode::UnknownValue(
33868                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33869                )),
33870            }
33871        }
33872    }
33873
33874    impl serde::ser::Serialize for Mode {
33875        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
33876        where
33877            S: serde::Serializer,
33878        {
33879            match self {
33880                Self::Unspecified => serializer.serialize_i32(0),
33881                Self::Required => serializer.serialize_i32(1),
33882                Self::Nullable => serializer.serialize_i32(2),
33883                Self::Repeated => serializer.serialize_i32(3),
33884                Self::UnknownValue(u) => u.0.serialize(serializer),
33885            }
33886        }
33887    }
33888
33889    impl<'de> serde::de::Deserialize<'de> for Mode {
33890        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
33891        where
33892            D: serde::Deserializer<'de>,
33893        {
33894            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
33895                ".google.cloud.dataplex.v1.Schema.Mode",
33896            ))
33897        }
33898    }
33899
33900    /// The structure of paths within the entity, which represent partitions.
33901    ///
33902    /// # Working with unknown values
33903    ///
33904    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33905    /// additional enum variants at any time. Adding new variants is not considered
33906    /// a breaking change. Applications should write their code in anticipation of:
33907    ///
33908    /// - New values appearing in future releases of the client library, **and**
33909    /// - New values received dynamically, without application changes.
33910    ///
33911    /// Please consult the [Working with enums] section in the user guide for some
33912    /// guidelines.
33913    ///
33914    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33915    #[derive(Clone, Debug, PartialEq)]
33916    #[non_exhaustive]
33917    pub enum PartitionStyle {
33918        /// PartitionStyle unspecified
33919        Unspecified,
33920        /// Partitions are hive-compatible.
33921        /// Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
33922        /// `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
33923        HiveCompatible,
33924        /// If set, the enum was initialized with an unknown value.
33925        ///
33926        /// Applications can examine the value using [PartitionStyle::value] or
33927        /// [PartitionStyle::name].
33928        UnknownValue(partition_style::UnknownValue),
33929    }
33930
33931    #[doc(hidden)]
33932    pub mod partition_style {
33933        #[allow(unused_imports)]
33934        use super::*;
33935        #[derive(Clone, Debug, PartialEq)]
33936        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33937    }
33938
33939    impl PartitionStyle {
33940        /// Gets the enum value.
33941        ///
33942        /// Returns `None` if the enum contains an unknown value deserialized from
33943        /// the string representation of enums.
33944        pub fn value(&self) -> std::option::Option<i32> {
33945            match self {
33946                Self::Unspecified => std::option::Option::Some(0),
33947                Self::HiveCompatible => std::option::Option::Some(1),
33948                Self::UnknownValue(u) => u.0.value(),
33949            }
33950        }
33951
33952        /// Gets the enum value as a string.
33953        ///
33954        /// Returns `None` if the enum contains an unknown value deserialized from
33955        /// the integer representation of enums.
33956        pub fn name(&self) -> std::option::Option<&str> {
33957            match self {
33958                Self::Unspecified => std::option::Option::Some("PARTITION_STYLE_UNSPECIFIED"),
33959                Self::HiveCompatible => std::option::Option::Some("HIVE_COMPATIBLE"),
33960                Self::UnknownValue(u) => u.0.name(),
33961            }
33962        }
33963    }
33964
33965    impl std::default::Default for PartitionStyle {
33966        fn default() -> Self {
33967            use std::convert::From;
33968            Self::from(0)
33969        }
33970    }
33971
33972    impl std::fmt::Display for PartitionStyle {
33973        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33974            wkt::internal::display_enum(f, self.name(), self.value())
33975        }
33976    }
33977
33978    impl std::convert::From<i32> for PartitionStyle {
33979        fn from(value: i32) -> Self {
33980            match value {
33981                0 => Self::Unspecified,
33982                1 => Self::HiveCompatible,
33983                _ => Self::UnknownValue(partition_style::UnknownValue(
33984                    wkt::internal::UnknownEnumValue::Integer(value),
33985                )),
33986            }
33987        }
33988    }
33989
33990    impl std::convert::From<&str> for PartitionStyle {
33991        fn from(value: &str) -> Self {
33992            use std::string::ToString;
33993            match value {
33994                "PARTITION_STYLE_UNSPECIFIED" => Self::Unspecified,
33995                "HIVE_COMPATIBLE" => Self::HiveCompatible,
33996                _ => Self::UnknownValue(partition_style::UnknownValue(
33997                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33998                )),
33999            }
34000        }
34001    }
34002
34003    impl serde::ser::Serialize for PartitionStyle {
34004        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34005        where
34006            S: serde::Serializer,
34007        {
34008            match self {
34009                Self::Unspecified => serializer.serialize_i32(0),
34010                Self::HiveCompatible => serializer.serialize_i32(1),
34011                Self::UnknownValue(u) => u.0.serialize(serializer),
34012            }
34013        }
34014    }
34015
34016    impl<'de> serde::de::Deserialize<'de> for PartitionStyle {
34017        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34018        where
34019            D: serde::Deserializer<'de>,
34020        {
34021            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStyle>::new(
34022                ".google.cloud.dataplex.v1.Schema.PartitionStyle",
34023            ))
34024        }
34025    }
34026}
34027
34028/// Describes the format of the data within its storage location.
34029#[derive(Clone, Default, PartialEq)]
34030#[non_exhaustive]
34031pub struct StorageFormat {
34032    /// Output only. The data format associated with the stored data, which
34033    /// represents content type values. The value is inferred from mime type.
34034    pub format: crate::model::storage_format::Format,
34035
34036    /// Optional. The compression type associated with the stored data.
34037    /// If unspecified, the data is uncompressed.
34038    pub compression_format: crate::model::storage_format::CompressionFormat,
34039
34040    /// Required. The mime type descriptor for the data. Must match the pattern
34041    /// {type}/{subtype}. Supported values:
34042    ///
34043    /// - application/x-parquet
34044    /// - application/x-avro
34045    /// - application/x-orc
34046    /// - application/x-tfrecord
34047    /// - application/x-parquet+iceberg
34048    /// - application/x-avro+iceberg
34049    /// - application/x-orc+iceberg
34050    /// - application/json
34051    /// - application/{subtypes}
34052    /// - text/csv
34053    /// - text/\<subtypes\>
34054    /// - image/{image subtype}
34055    /// - video/{video subtype}
34056    /// - audio/{audio subtype}
34057    pub mime_type: std::string::String,
34058
34059    /// Additional format-specific options.
34060    pub options: std::option::Option<crate::model::storage_format::Options>,
34061
34062    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34063}
34064
34065impl StorageFormat {
34066    pub fn new() -> Self {
34067        std::default::Default::default()
34068    }
34069
34070    /// Sets the value of [format][crate::model::StorageFormat::format].
34071    ///
34072    /// # Example
34073    /// ```ignore,no_run
34074    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34075    /// use google_cloud_dataplex_v1::model::storage_format::Format;
34076    /// let x0 = StorageFormat::new().set_format(Format::Parquet);
34077    /// let x1 = StorageFormat::new().set_format(Format::Avro);
34078    /// let x2 = StorageFormat::new().set_format(Format::Orc);
34079    /// ```
34080    pub fn set_format<T: std::convert::Into<crate::model::storage_format::Format>>(
34081        mut self,
34082        v: T,
34083    ) -> Self {
34084        self.format = v.into();
34085        self
34086    }
34087
34088    /// Sets the value of [compression_format][crate::model::StorageFormat::compression_format].
34089    ///
34090    /// # Example
34091    /// ```ignore,no_run
34092    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34093    /// use google_cloud_dataplex_v1::model::storage_format::CompressionFormat;
34094    /// let x0 = StorageFormat::new().set_compression_format(CompressionFormat::Gzip);
34095    /// let x1 = StorageFormat::new().set_compression_format(CompressionFormat::Bzip2);
34096    /// ```
34097    pub fn set_compression_format<
34098        T: std::convert::Into<crate::model::storage_format::CompressionFormat>,
34099    >(
34100        mut self,
34101        v: T,
34102    ) -> Self {
34103        self.compression_format = v.into();
34104        self
34105    }
34106
34107    /// Sets the value of [mime_type][crate::model::StorageFormat::mime_type].
34108    ///
34109    /// # Example
34110    /// ```ignore,no_run
34111    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34112    /// let x = StorageFormat::new().set_mime_type("example");
34113    /// ```
34114    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34115        self.mime_type = v.into();
34116        self
34117    }
34118
34119    /// Sets the value of [options][crate::model::StorageFormat::options].
34120    ///
34121    /// Note that all the setters affecting `options` are mutually
34122    /// exclusive.
34123    ///
34124    /// # Example
34125    /// ```ignore,no_run
34126    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34127    /// use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34128    /// let x = StorageFormat::new().set_options(Some(
34129    ///     google_cloud_dataplex_v1::model::storage_format::Options::Csv(CsvOptions::default().into())));
34130    /// ```
34131    pub fn set_options<
34132        T: std::convert::Into<std::option::Option<crate::model::storage_format::Options>>,
34133    >(
34134        mut self,
34135        v: T,
34136    ) -> Self {
34137        self.options = v.into();
34138        self
34139    }
34140
34141    /// The value of [options][crate::model::StorageFormat::options]
34142    /// if it holds a `Csv`, `None` if the field is not set or
34143    /// holds a different branch.
34144    pub fn csv(
34145        &self,
34146    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::CsvOptions>> {
34147        #[allow(unreachable_patterns)]
34148        self.options.as_ref().and_then(|v| match v {
34149            crate::model::storage_format::Options::Csv(v) => std::option::Option::Some(v),
34150            _ => std::option::Option::None,
34151        })
34152    }
34153
34154    /// Sets the value of [options][crate::model::StorageFormat::options]
34155    /// to hold a `Csv`.
34156    ///
34157    /// Note that all the setters affecting `options` are
34158    /// mutually exclusive.
34159    ///
34160    /// # Example
34161    /// ```ignore,no_run
34162    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34163    /// use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34164    /// let x = StorageFormat::new().set_csv(CsvOptions::default()/* use setters */);
34165    /// assert!(x.csv().is_some());
34166    /// assert!(x.json().is_none());
34167    /// assert!(x.iceberg().is_none());
34168    /// ```
34169    pub fn set_csv<
34170        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::CsvOptions>>,
34171    >(
34172        mut self,
34173        v: T,
34174    ) -> Self {
34175        self.options =
34176            std::option::Option::Some(crate::model::storage_format::Options::Csv(v.into()));
34177        self
34178    }
34179
34180    /// The value of [options][crate::model::StorageFormat::options]
34181    /// if it holds a `Json`, `None` if the field is not set or
34182    /// holds a different branch.
34183    pub fn json(
34184        &self,
34185    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::JsonOptions>> {
34186        #[allow(unreachable_patterns)]
34187        self.options.as_ref().and_then(|v| match v {
34188            crate::model::storage_format::Options::Json(v) => std::option::Option::Some(v),
34189            _ => std::option::Option::None,
34190        })
34191    }
34192
34193    /// Sets the value of [options][crate::model::StorageFormat::options]
34194    /// to hold a `Json`.
34195    ///
34196    /// Note that all the setters affecting `options` are
34197    /// mutually exclusive.
34198    ///
34199    /// # Example
34200    /// ```ignore,no_run
34201    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34202    /// use google_cloud_dataplex_v1::model::storage_format::JsonOptions;
34203    /// let x = StorageFormat::new().set_json(JsonOptions::default()/* use setters */);
34204    /// assert!(x.json().is_some());
34205    /// assert!(x.csv().is_none());
34206    /// assert!(x.iceberg().is_none());
34207    /// ```
34208    pub fn set_json<
34209        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::JsonOptions>>,
34210    >(
34211        mut self,
34212        v: T,
34213    ) -> Self {
34214        self.options =
34215            std::option::Option::Some(crate::model::storage_format::Options::Json(v.into()));
34216        self
34217    }
34218
34219    /// The value of [options][crate::model::StorageFormat::options]
34220    /// if it holds a `Iceberg`, `None` if the field is not set or
34221    /// holds a different branch.
34222    pub fn iceberg(
34223        &self,
34224    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::IcebergOptions>> {
34225        #[allow(unreachable_patterns)]
34226        self.options.as_ref().and_then(|v| match v {
34227            crate::model::storage_format::Options::Iceberg(v) => std::option::Option::Some(v),
34228            _ => std::option::Option::None,
34229        })
34230    }
34231
34232    /// Sets the value of [options][crate::model::StorageFormat::options]
34233    /// to hold a `Iceberg`.
34234    ///
34235    /// Note that all the setters affecting `options` are
34236    /// mutually exclusive.
34237    ///
34238    /// # Example
34239    /// ```ignore,no_run
34240    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34241    /// use google_cloud_dataplex_v1::model::storage_format::IcebergOptions;
34242    /// let x = StorageFormat::new().set_iceberg(IcebergOptions::default()/* use setters */);
34243    /// assert!(x.iceberg().is_some());
34244    /// assert!(x.csv().is_none());
34245    /// assert!(x.json().is_none());
34246    /// ```
34247    pub fn set_iceberg<
34248        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::IcebergOptions>>,
34249    >(
34250        mut self,
34251        v: T,
34252    ) -> Self {
34253        self.options =
34254            std::option::Option::Some(crate::model::storage_format::Options::Iceberg(v.into()));
34255        self
34256    }
34257}
34258
34259impl wkt::message::Message for StorageFormat {
34260    fn typename() -> &'static str {
34261        "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat"
34262    }
34263}
34264
34265/// Defines additional types related to [StorageFormat].
34266pub mod storage_format {
34267    #[allow(unused_imports)]
34268    use super::*;
34269
34270    /// Describes CSV and similar semi-structured data formats.
34271    #[derive(Clone, Default, PartialEq)]
34272    #[non_exhaustive]
34273    pub struct CsvOptions {
34274        /// Optional. The character encoding of the data. Accepts "US-ASCII",
34275        /// "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
34276        pub encoding: std::string::String,
34277
34278        /// Optional. The number of rows to interpret as header rows that should be
34279        /// skipped when reading data rows. Defaults to 0.
34280        pub header_rows: i32,
34281
34282        /// Optional. The delimiter used to separate values. Defaults to ','.
34283        pub delimiter: std::string::String,
34284
34285        /// Optional. The character used to quote column values. Accepts '"'
34286        /// (double quotation mark) or ''' (single quotation mark). Defaults to
34287        /// '"' (double quotation mark) if unspecified.
34288        pub quote: std::string::String,
34289
34290        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34291    }
34292
34293    impl CsvOptions {
34294        pub fn new() -> Self {
34295            std::default::Default::default()
34296        }
34297
34298        /// Sets the value of [encoding][crate::model::storage_format::CsvOptions::encoding].
34299        ///
34300        /// # Example
34301        /// ```ignore,no_run
34302        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34303        /// let x = CsvOptions::new().set_encoding("example");
34304        /// ```
34305        pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34306            self.encoding = v.into();
34307            self
34308        }
34309
34310        /// Sets the value of [header_rows][crate::model::storage_format::CsvOptions::header_rows].
34311        ///
34312        /// # Example
34313        /// ```ignore,no_run
34314        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34315        /// let x = CsvOptions::new().set_header_rows(42);
34316        /// ```
34317        pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34318            self.header_rows = v.into();
34319            self
34320        }
34321
34322        /// Sets the value of [delimiter][crate::model::storage_format::CsvOptions::delimiter].
34323        ///
34324        /// # Example
34325        /// ```ignore,no_run
34326        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34327        /// let x = CsvOptions::new().set_delimiter("example");
34328        /// ```
34329        pub fn set_delimiter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34330            self.delimiter = v.into();
34331            self
34332        }
34333
34334        /// Sets the value of [quote][crate::model::storage_format::CsvOptions::quote].
34335        ///
34336        /// # Example
34337        /// ```ignore,no_run
34338        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34339        /// let x = CsvOptions::new().set_quote("example");
34340        /// ```
34341        pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34342            self.quote = v.into();
34343            self
34344        }
34345    }
34346
34347    impl wkt::message::Message for CsvOptions {
34348        fn typename() -> &'static str {
34349            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.CsvOptions"
34350        }
34351    }
34352
34353    /// Describes JSON data format.
34354    #[derive(Clone, Default, PartialEq)]
34355    #[non_exhaustive]
34356    pub struct JsonOptions {
34357        /// Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8"
34358        /// and "ISO-8859-1". Defaults to UTF-8 if not specified.
34359        pub encoding: std::string::String,
34360
34361        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34362    }
34363
34364    impl JsonOptions {
34365        pub fn new() -> Self {
34366            std::default::Default::default()
34367        }
34368
34369        /// Sets the value of [encoding][crate::model::storage_format::JsonOptions::encoding].
34370        ///
34371        /// # Example
34372        /// ```ignore,no_run
34373        /// # use google_cloud_dataplex_v1::model::storage_format::JsonOptions;
34374        /// let x = JsonOptions::new().set_encoding("example");
34375        /// ```
34376        pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34377            self.encoding = v.into();
34378            self
34379        }
34380    }
34381
34382    impl wkt::message::Message for JsonOptions {
34383        fn typename() -> &'static str {
34384            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.JsonOptions"
34385        }
34386    }
34387
34388    /// Describes Iceberg data format.
34389    #[derive(Clone, Default, PartialEq)]
34390    #[non_exhaustive]
34391    pub struct IcebergOptions {
34392        /// Optional. The location of where the iceberg metadata is present, must be
34393        /// within the table path
34394        pub metadata_location: std::string::String,
34395
34396        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34397    }
34398
34399    impl IcebergOptions {
34400        pub fn new() -> Self {
34401            std::default::Default::default()
34402        }
34403
34404        /// Sets the value of [metadata_location][crate::model::storage_format::IcebergOptions::metadata_location].
34405        ///
34406        /// # Example
34407        /// ```ignore,no_run
34408        /// # use google_cloud_dataplex_v1::model::storage_format::IcebergOptions;
34409        /// let x = IcebergOptions::new().set_metadata_location("example");
34410        /// ```
34411        pub fn set_metadata_location<T: std::convert::Into<std::string::String>>(
34412            mut self,
34413            v: T,
34414        ) -> Self {
34415            self.metadata_location = v.into();
34416            self
34417        }
34418    }
34419
34420    impl wkt::message::Message for IcebergOptions {
34421        fn typename() -> &'static str {
34422            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"
34423        }
34424    }
34425
34426    /// The specific file format of the data.
34427    ///
34428    /// # Working with unknown values
34429    ///
34430    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
34431    /// additional enum variants at any time. Adding new variants is not considered
34432    /// a breaking change. Applications should write their code in anticipation of:
34433    ///
34434    /// - New values appearing in future releases of the client library, **and**
34435    /// - New values received dynamically, without application changes.
34436    ///
34437    /// Please consult the [Working with enums] section in the user guide for some
34438    /// guidelines.
34439    ///
34440    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
34441    #[derive(Clone, Debug, PartialEq)]
34442    #[non_exhaustive]
34443    pub enum Format {
34444        /// Format unspecified.
34445        Unspecified,
34446        /// Parquet-formatted structured data.
34447        Parquet,
34448        /// Avro-formatted structured data.
34449        Avro,
34450        /// Orc-formatted structured data.
34451        Orc,
34452        /// Csv-formatted semi-structured data.
34453        Csv,
34454        /// Json-formatted semi-structured data.
34455        Json,
34456        /// Image data formats (such as jpg and png).
34457        Image,
34458        /// Audio data formats (such as mp3, and wav).
34459        Audio,
34460        /// Video data formats (such as mp4 and mpg).
34461        Video,
34462        /// Textual data formats (such as txt and xml).
34463        Text,
34464        /// TensorFlow record format.
34465        Tfrecord,
34466        /// Data that doesn't match a specific format.
34467        Other,
34468        /// Data of an unknown format.
34469        Unknown,
34470        /// If set, the enum was initialized with an unknown value.
34471        ///
34472        /// Applications can examine the value using [Format::value] or
34473        /// [Format::name].
34474        UnknownValue(format::UnknownValue),
34475    }
34476
34477    #[doc(hidden)]
34478    pub mod format {
34479        #[allow(unused_imports)]
34480        use super::*;
34481        #[derive(Clone, Debug, PartialEq)]
34482        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34483    }
34484
34485    impl Format {
34486        /// Gets the enum value.
34487        ///
34488        /// Returns `None` if the enum contains an unknown value deserialized from
34489        /// the string representation of enums.
34490        pub fn value(&self) -> std::option::Option<i32> {
34491            match self {
34492                Self::Unspecified => std::option::Option::Some(0),
34493                Self::Parquet => std::option::Option::Some(1),
34494                Self::Avro => std::option::Option::Some(2),
34495                Self::Orc => std::option::Option::Some(3),
34496                Self::Csv => std::option::Option::Some(100),
34497                Self::Json => std::option::Option::Some(101),
34498                Self::Image => std::option::Option::Some(200),
34499                Self::Audio => std::option::Option::Some(201),
34500                Self::Video => std::option::Option::Some(202),
34501                Self::Text => std::option::Option::Some(203),
34502                Self::Tfrecord => std::option::Option::Some(204),
34503                Self::Other => std::option::Option::Some(1000),
34504                Self::Unknown => std::option::Option::Some(1001),
34505                Self::UnknownValue(u) => u.0.value(),
34506            }
34507        }
34508
34509        /// Gets the enum value as a string.
34510        ///
34511        /// Returns `None` if the enum contains an unknown value deserialized from
34512        /// the integer representation of enums.
34513        pub fn name(&self) -> std::option::Option<&str> {
34514            match self {
34515                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
34516                Self::Parquet => std::option::Option::Some("PARQUET"),
34517                Self::Avro => std::option::Option::Some("AVRO"),
34518                Self::Orc => std::option::Option::Some("ORC"),
34519                Self::Csv => std::option::Option::Some("CSV"),
34520                Self::Json => std::option::Option::Some("JSON"),
34521                Self::Image => std::option::Option::Some("IMAGE"),
34522                Self::Audio => std::option::Option::Some("AUDIO"),
34523                Self::Video => std::option::Option::Some("VIDEO"),
34524                Self::Text => std::option::Option::Some("TEXT"),
34525                Self::Tfrecord => std::option::Option::Some("TFRECORD"),
34526                Self::Other => std::option::Option::Some("OTHER"),
34527                Self::Unknown => std::option::Option::Some("UNKNOWN"),
34528                Self::UnknownValue(u) => u.0.name(),
34529            }
34530        }
34531    }
34532
34533    impl std::default::Default for Format {
34534        fn default() -> Self {
34535            use std::convert::From;
34536            Self::from(0)
34537        }
34538    }
34539
34540    impl std::fmt::Display for Format {
34541        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
34542            wkt::internal::display_enum(f, self.name(), self.value())
34543        }
34544    }
34545
34546    impl std::convert::From<i32> for Format {
34547        fn from(value: i32) -> Self {
34548            match value {
34549                0 => Self::Unspecified,
34550                1 => Self::Parquet,
34551                2 => Self::Avro,
34552                3 => Self::Orc,
34553                100 => Self::Csv,
34554                101 => Self::Json,
34555                200 => Self::Image,
34556                201 => Self::Audio,
34557                202 => Self::Video,
34558                203 => Self::Text,
34559                204 => Self::Tfrecord,
34560                1000 => Self::Other,
34561                1001 => Self::Unknown,
34562                _ => Self::UnknownValue(format::UnknownValue(
34563                    wkt::internal::UnknownEnumValue::Integer(value),
34564                )),
34565            }
34566        }
34567    }
34568
34569    impl std::convert::From<&str> for Format {
34570        fn from(value: &str) -> Self {
34571            use std::string::ToString;
34572            match value {
34573                "FORMAT_UNSPECIFIED" => Self::Unspecified,
34574                "PARQUET" => Self::Parquet,
34575                "AVRO" => Self::Avro,
34576                "ORC" => Self::Orc,
34577                "CSV" => Self::Csv,
34578                "JSON" => Self::Json,
34579                "IMAGE" => Self::Image,
34580                "AUDIO" => Self::Audio,
34581                "VIDEO" => Self::Video,
34582                "TEXT" => Self::Text,
34583                "TFRECORD" => Self::Tfrecord,
34584                "OTHER" => Self::Other,
34585                "UNKNOWN" => Self::Unknown,
34586                _ => Self::UnknownValue(format::UnknownValue(
34587                    wkt::internal::UnknownEnumValue::String(value.to_string()),
34588                )),
34589            }
34590        }
34591    }
34592
34593    impl serde::ser::Serialize for Format {
34594        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34595        where
34596            S: serde::Serializer,
34597        {
34598            match self {
34599                Self::Unspecified => serializer.serialize_i32(0),
34600                Self::Parquet => serializer.serialize_i32(1),
34601                Self::Avro => serializer.serialize_i32(2),
34602                Self::Orc => serializer.serialize_i32(3),
34603                Self::Csv => serializer.serialize_i32(100),
34604                Self::Json => serializer.serialize_i32(101),
34605                Self::Image => serializer.serialize_i32(200),
34606                Self::Audio => serializer.serialize_i32(201),
34607                Self::Video => serializer.serialize_i32(202),
34608                Self::Text => serializer.serialize_i32(203),
34609                Self::Tfrecord => serializer.serialize_i32(204),
34610                Self::Other => serializer.serialize_i32(1000),
34611                Self::Unknown => serializer.serialize_i32(1001),
34612                Self::UnknownValue(u) => u.0.serialize(serializer),
34613            }
34614        }
34615    }
34616
34617    impl<'de> serde::de::Deserialize<'de> for Format {
34618        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34619        where
34620            D: serde::Deserializer<'de>,
34621        {
34622            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
34623                ".google.cloud.dataplex.v1.StorageFormat.Format",
34624            ))
34625        }
34626    }
34627
34628    /// The specific compressed file format of the data.
34629    ///
34630    /// # Working with unknown values
34631    ///
34632    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
34633    /// additional enum variants at any time. Adding new variants is not considered
34634    /// a breaking change. Applications should write their code in anticipation of:
34635    ///
34636    /// - New values appearing in future releases of the client library, **and**
34637    /// - New values received dynamically, without application changes.
34638    ///
34639    /// Please consult the [Working with enums] section in the user guide for some
34640    /// guidelines.
34641    ///
34642    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
34643    #[derive(Clone, Debug, PartialEq)]
34644    #[non_exhaustive]
34645    pub enum CompressionFormat {
34646        /// CompressionFormat unspecified. Implies uncompressed data.
34647        Unspecified,
34648        /// GZip compressed set of files.
34649        Gzip,
34650        /// BZip2 compressed set of files.
34651        Bzip2,
34652        /// If set, the enum was initialized with an unknown value.
34653        ///
34654        /// Applications can examine the value using [CompressionFormat::value] or
34655        /// [CompressionFormat::name].
34656        UnknownValue(compression_format::UnknownValue),
34657    }
34658
34659    #[doc(hidden)]
34660    pub mod compression_format {
34661        #[allow(unused_imports)]
34662        use super::*;
34663        #[derive(Clone, Debug, PartialEq)]
34664        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34665    }
34666
34667    impl CompressionFormat {
34668        /// Gets the enum value.
34669        ///
34670        /// Returns `None` if the enum contains an unknown value deserialized from
34671        /// the string representation of enums.
34672        pub fn value(&self) -> std::option::Option<i32> {
34673            match self {
34674                Self::Unspecified => std::option::Option::Some(0),
34675                Self::Gzip => std::option::Option::Some(2),
34676                Self::Bzip2 => std::option::Option::Some(3),
34677                Self::UnknownValue(u) => u.0.value(),
34678            }
34679        }
34680
34681        /// Gets the enum value as a string.
34682        ///
34683        /// Returns `None` if the enum contains an unknown value deserialized from
34684        /// the integer representation of enums.
34685        pub fn name(&self) -> std::option::Option<&str> {
34686            match self {
34687                Self::Unspecified => std::option::Option::Some("COMPRESSION_FORMAT_UNSPECIFIED"),
34688                Self::Gzip => std::option::Option::Some("GZIP"),
34689                Self::Bzip2 => std::option::Option::Some("BZIP2"),
34690                Self::UnknownValue(u) => u.0.name(),
34691            }
34692        }
34693    }
34694
34695    impl std::default::Default for CompressionFormat {
34696        fn default() -> Self {
34697            use std::convert::From;
34698            Self::from(0)
34699        }
34700    }
34701
34702    impl std::fmt::Display for CompressionFormat {
34703        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
34704            wkt::internal::display_enum(f, self.name(), self.value())
34705        }
34706    }
34707
34708    impl std::convert::From<i32> for CompressionFormat {
34709        fn from(value: i32) -> Self {
34710            match value {
34711                0 => Self::Unspecified,
34712                2 => Self::Gzip,
34713                3 => Self::Bzip2,
34714                _ => Self::UnknownValue(compression_format::UnknownValue(
34715                    wkt::internal::UnknownEnumValue::Integer(value),
34716                )),
34717            }
34718        }
34719    }
34720
34721    impl std::convert::From<&str> for CompressionFormat {
34722        fn from(value: &str) -> Self {
34723            use std::string::ToString;
34724            match value {
34725                "COMPRESSION_FORMAT_UNSPECIFIED" => Self::Unspecified,
34726                "GZIP" => Self::Gzip,
34727                "BZIP2" => Self::Bzip2,
34728                _ => Self::UnknownValue(compression_format::UnknownValue(
34729                    wkt::internal::UnknownEnumValue::String(value.to_string()),
34730                )),
34731            }
34732        }
34733    }
34734
34735    impl serde::ser::Serialize for CompressionFormat {
34736        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34737        where
34738            S: serde::Serializer,
34739        {
34740            match self {
34741                Self::Unspecified => serializer.serialize_i32(0),
34742                Self::Gzip => serializer.serialize_i32(2),
34743                Self::Bzip2 => serializer.serialize_i32(3),
34744                Self::UnknownValue(u) => u.0.serialize(serializer),
34745            }
34746        }
34747    }
34748
34749    impl<'de> serde::de::Deserialize<'de> for CompressionFormat {
34750        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34751        where
34752            D: serde::Deserializer<'de>,
34753        {
34754            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CompressionFormat>::new(
34755                ".google.cloud.dataplex.v1.StorageFormat.CompressionFormat",
34756            ))
34757        }
34758    }
34759
34760    /// Additional format-specific options.
34761    #[derive(Clone, Debug, PartialEq)]
34762    #[non_exhaustive]
34763    pub enum Options {
34764        /// Optional. Additional information about CSV formatted data.
34765        Csv(std::boxed::Box<crate::model::storage_format::CsvOptions>),
34766        /// Optional. Additional information about CSV formatted data.
34767        Json(std::boxed::Box<crate::model::storage_format::JsonOptions>),
34768        /// Optional. Additional information about iceberg tables.
34769        Iceberg(std::boxed::Box<crate::model::storage_format::IcebergOptions>),
34770    }
34771}
34772
34773/// Describes the access mechanism of the data within its storage location.
34774#[derive(Clone, Default, PartialEq)]
34775#[non_exhaustive]
34776pub struct StorageAccess {
34777    /// Output only. Describes the read access mechanism of the data. Not user
34778    /// settable.
34779    pub read: crate::model::storage_access::AccessMode,
34780
34781    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34782}
34783
34784impl StorageAccess {
34785    pub fn new() -> Self {
34786        std::default::Default::default()
34787    }
34788
34789    /// Sets the value of [read][crate::model::StorageAccess::read].
34790    ///
34791    /// # Example
34792    /// ```ignore,no_run
34793    /// # use google_cloud_dataplex_v1::model::StorageAccess;
34794    /// use google_cloud_dataplex_v1::model::storage_access::AccessMode;
34795    /// let x0 = StorageAccess::new().set_read(AccessMode::Direct);
34796    /// let x1 = StorageAccess::new().set_read(AccessMode::Managed);
34797    /// ```
34798    pub fn set_read<T: std::convert::Into<crate::model::storage_access::AccessMode>>(
34799        mut self,
34800        v: T,
34801    ) -> Self {
34802        self.read = v.into();
34803        self
34804    }
34805}
34806
34807impl wkt::message::Message for StorageAccess {
34808    fn typename() -> &'static str {
34809        "type.googleapis.com/google.cloud.dataplex.v1.StorageAccess"
34810    }
34811}
34812
34813/// Defines additional types related to [StorageAccess].
34814pub mod storage_access {
34815    #[allow(unused_imports)]
34816    use super::*;
34817
34818    /// Access Mode determines how data stored within the Entity is read.
34819    ///
34820    /// # Working with unknown values
34821    ///
34822    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
34823    /// additional enum variants at any time. Adding new variants is not considered
34824    /// a breaking change. Applications should write their code in anticipation of:
34825    ///
34826    /// - New values appearing in future releases of the client library, **and**
34827    /// - New values received dynamically, without application changes.
34828    ///
34829    /// Please consult the [Working with enums] section in the user guide for some
34830    /// guidelines.
34831    ///
34832    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
34833    #[derive(Clone, Debug, PartialEq)]
34834    #[non_exhaustive]
34835    pub enum AccessMode {
34836        /// Access mode unspecified.
34837        Unspecified,
34838        /// Default. Data is accessed directly using storage APIs.
34839        Direct,
34840        /// Data is accessed through a managed interface using BigQuery APIs.
34841        Managed,
34842        /// If set, the enum was initialized with an unknown value.
34843        ///
34844        /// Applications can examine the value using [AccessMode::value] or
34845        /// [AccessMode::name].
34846        UnknownValue(access_mode::UnknownValue),
34847    }
34848
34849    #[doc(hidden)]
34850    pub mod access_mode {
34851        #[allow(unused_imports)]
34852        use super::*;
34853        #[derive(Clone, Debug, PartialEq)]
34854        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34855    }
34856
34857    impl AccessMode {
34858        /// Gets the enum value.
34859        ///
34860        /// Returns `None` if the enum contains an unknown value deserialized from
34861        /// the string representation of enums.
34862        pub fn value(&self) -> std::option::Option<i32> {
34863            match self {
34864                Self::Unspecified => std::option::Option::Some(0),
34865                Self::Direct => std::option::Option::Some(1),
34866                Self::Managed => std::option::Option::Some(2),
34867                Self::UnknownValue(u) => u.0.value(),
34868            }
34869        }
34870
34871        /// Gets the enum value as a string.
34872        ///
34873        /// Returns `None` if the enum contains an unknown value deserialized from
34874        /// the integer representation of enums.
34875        pub fn name(&self) -> std::option::Option<&str> {
34876            match self {
34877                Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
34878                Self::Direct => std::option::Option::Some("DIRECT"),
34879                Self::Managed => std::option::Option::Some("MANAGED"),
34880                Self::UnknownValue(u) => u.0.name(),
34881            }
34882        }
34883    }
34884
34885    impl std::default::Default for AccessMode {
34886        fn default() -> Self {
34887            use std::convert::From;
34888            Self::from(0)
34889        }
34890    }
34891
34892    impl std::fmt::Display for AccessMode {
34893        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
34894            wkt::internal::display_enum(f, self.name(), self.value())
34895        }
34896    }
34897
34898    impl std::convert::From<i32> for AccessMode {
34899        fn from(value: i32) -> Self {
34900            match value {
34901                0 => Self::Unspecified,
34902                1 => Self::Direct,
34903                2 => Self::Managed,
34904                _ => Self::UnknownValue(access_mode::UnknownValue(
34905                    wkt::internal::UnknownEnumValue::Integer(value),
34906                )),
34907            }
34908        }
34909    }
34910
34911    impl std::convert::From<&str> for AccessMode {
34912        fn from(value: &str) -> Self {
34913            use std::string::ToString;
34914            match value {
34915                "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
34916                "DIRECT" => Self::Direct,
34917                "MANAGED" => Self::Managed,
34918                _ => Self::UnknownValue(access_mode::UnknownValue(
34919                    wkt::internal::UnknownEnumValue::String(value.to_string()),
34920                )),
34921            }
34922        }
34923    }
34924
34925    impl serde::ser::Serialize for AccessMode {
34926        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34927        where
34928            S: serde::Serializer,
34929        {
34930            match self {
34931                Self::Unspecified => serializer.serialize_i32(0),
34932                Self::Direct => serializer.serialize_i32(1),
34933                Self::Managed => serializer.serialize_i32(2),
34934                Self::UnknownValue(u) => u.0.serialize(serializer),
34935            }
34936        }
34937    }
34938
34939    impl<'de> serde::de::Deserialize<'de> for AccessMode {
34940        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34941        where
34942            D: serde::Deserializer<'de>,
34943        {
34944            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
34945                ".google.cloud.dataplex.v1.StorageAccess.AccessMode",
34946            ))
34947        }
34948    }
34949}
34950
34951/// DataScan scheduling and trigger settings.
34952#[derive(Clone, Default, PartialEq)]
34953#[non_exhaustive]
34954pub struct Trigger {
34955    /// DataScan scheduling and trigger settings.
34956    ///
34957    /// If not specified, the default is `onDemand`.
34958    pub mode: std::option::Option<crate::model::trigger::Mode>,
34959
34960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34961}
34962
34963impl Trigger {
34964    pub fn new() -> Self {
34965        std::default::Default::default()
34966    }
34967
34968    /// Sets the value of [mode][crate::model::Trigger::mode].
34969    ///
34970    /// Note that all the setters affecting `mode` are mutually
34971    /// exclusive.
34972    ///
34973    /// # Example
34974    /// ```ignore,no_run
34975    /// # use google_cloud_dataplex_v1::model::Trigger;
34976    /// use google_cloud_dataplex_v1::model::trigger::OnDemand;
34977    /// let x = Trigger::new().set_mode(Some(
34978    ///     google_cloud_dataplex_v1::model::trigger::Mode::OnDemand(OnDemand::default().into())));
34979    /// ```
34980    pub fn set_mode<T: std::convert::Into<std::option::Option<crate::model::trigger::Mode>>>(
34981        mut self,
34982        v: T,
34983    ) -> Self {
34984        self.mode = v.into();
34985        self
34986    }
34987
34988    /// The value of [mode][crate::model::Trigger::mode]
34989    /// if it holds a `OnDemand`, `None` if the field is not set or
34990    /// holds a different branch.
34991    pub fn on_demand(
34992        &self,
34993    ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::OnDemand>> {
34994        #[allow(unreachable_patterns)]
34995        self.mode.as_ref().and_then(|v| match v {
34996            crate::model::trigger::Mode::OnDemand(v) => std::option::Option::Some(v),
34997            _ => std::option::Option::None,
34998        })
34999    }
35000
35001    /// Sets the value of [mode][crate::model::Trigger::mode]
35002    /// to hold a `OnDemand`.
35003    ///
35004    /// Note that all the setters affecting `mode` are
35005    /// mutually exclusive.
35006    ///
35007    /// # Example
35008    /// ```ignore,no_run
35009    /// # use google_cloud_dataplex_v1::model::Trigger;
35010    /// use google_cloud_dataplex_v1::model::trigger::OnDemand;
35011    /// let x = Trigger::new().set_on_demand(OnDemand::default()/* use setters */);
35012    /// assert!(x.on_demand().is_some());
35013    /// assert!(x.schedule().is_none());
35014    /// ```
35015    pub fn set_on_demand<
35016        T: std::convert::Into<std::boxed::Box<crate::model::trigger::OnDemand>>,
35017    >(
35018        mut self,
35019        v: T,
35020    ) -> Self {
35021        self.mode = std::option::Option::Some(crate::model::trigger::Mode::OnDemand(v.into()));
35022        self
35023    }
35024
35025    /// The value of [mode][crate::model::Trigger::mode]
35026    /// if it holds a `Schedule`, `None` if the field is not set or
35027    /// holds a different branch.
35028    pub fn schedule(
35029        &self,
35030    ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::Schedule>> {
35031        #[allow(unreachable_patterns)]
35032        self.mode.as_ref().and_then(|v| match v {
35033            crate::model::trigger::Mode::Schedule(v) => std::option::Option::Some(v),
35034            _ => std::option::Option::None,
35035        })
35036    }
35037
35038    /// Sets the value of [mode][crate::model::Trigger::mode]
35039    /// to hold a `Schedule`.
35040    ///
35041    /// Note that all the setters affecting `mode` are
35042    /// mutually exclusive.
35043    ///
35044    /// # Example
35045    /// ```ignore,no_run
35046    /// # use google_cloud_dataplex_v1::model::Trigger;
35047    /// use google_cloud_dataplex_v1::model::trigger::Schedule;
35048    /// let x = Trigger::new().set_schedule(Schedule::default()/* use setters */);
35049    /// assert!(x.schedule().is_some());
35050    /// assert!(x.on_demand().is_none());
35051    /// ```
35052    pub fn set_schedule<T: std::convert::Into<std::boxed::Box<crate::model::trigger::Schedule>>>(
35053        mut self,
35054        v: T,
35055    ) -> Self {
35056        self.mode = std::option::Option::Some(crate::model::trigger::Mode::Schedule(v.into()));
35057        self
35058    }
35059}
35060
35061impl wkt::message::Message for Trigger {
35062    fn typename() -> &'static str {
35063        "type.googleapis.com/google.cloud.dataplex.v1.Trigger"
35064    }
35065}
35066
35067/// Defines additional types related to [Trigger].
35068pub mod trigger {
35069    #[allow(unused_imports)]
35070    use super::*;
35071
35072    /// The scan runs once via `RunDataScan` API.
35073    #[derive(Clone, Default, PartialEq)]
35074    #[non_exhaustive]
35075    pub struct OnDemand {
35076        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35077    }
35078
35079    impl OnDemand {
35080        pub fn new() -> Self {
35081            std::default::Default::default()
35082        }
35083    }
35084
35085    impl wkt::message::Message for OnDemand {
35086        fn typename() -> &'static str {
35087            "type.googleapis.com/google.cloud.dataplex.v1.Trigger.OnDemand"
35088        }
35089    }
35090
35091    /// The scan is scheduled to run periodically.
35092    #[derive(Clone, Default, PartialEq)]
35093    #[non_exhaustive]
35094    pub struct Schedule {
35095        /// Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running
35096        /// scans periodically.
35097        ///
35098        /// To explicitly set a timezone in the cron tab, apply a prefix in the
35099        /// cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**.
35100        /// The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone
35101        /// database
35102        /// ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)).
35103        /// For example, `CRON_TZ=America/New_York 1 * * * *`, or
35104        /// `TZ=America/New_York 1 * * * *`.
35105        ///
35106        /// This field is required for Schedule scans.
35107        pub cron: std::string::String,
35108
35109        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35110    }
35111
35112    impl Schedule {
35113        pub fn new() -> Self {
35114            std::default::Default::default()
35115        }
35116
35117        /// Sets the value of [cron][crate::model::trigger::Schedule::cron].
35118        ///
35119        /// # Example
35120        /// ```ignore,no_run
35121        /// # use google_cloud_dataplex_v1::model::trigger::Schedule;
35122        /// let x = Schedule::new().set_cron("example");
35123        /// ```
35124        pub fn set_cron<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35125            self.cron = v.into();
35126            self
35127        }
35128    }
35129
35130    impl wkt::message::Message for Schedule {
35131        fn typename() -> &'static str {
35132            "type.googleapis.com/google.cloud.dataplex.v1.Trigger.Schedule"
35133        }
35134    }
35135
35136    /// DataScan scheduling and trigger settings.
35137    ///
35138    /// If not specified, the default is `onDemand`.
35139    #[derive(Clone, Debug, PartialEq)]
35140    #[non_exhaustive]
35141    pub enum Mode {
35142        /// The scan runs once via `RunDataScan` API.
35143        OnDemand(std::boxed::Box<crate::model::trigger::OnDemand>),
35144        /// The scan is scheduled to run periodically.
35145        Schedule(std::boxed::Box<crate::model::trigger::Schedule>),
35146    }
35147}
35148
35149/// The data source for DataScan.
35150#[derive(Clone, Default, PartialEq)]
35151#[non_exhaustive]
35152pub struct DataSource {
35153    /// The source is required and immutable. Once it is set, it cannot be change
35154    /// to others.
35155    pub source: std::option::Option<crate::model::data_source::Source>,
35156
35157    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35158}
35159
35160impl DataSource {
35161    pub fn new() -> Self {
35162        std::default::Default::default()
35163    }
35164
35165    /// Sets the value of [source][crate::model::DataSource::source].
35166    ///
35167    /// Note that all the setters affecting `source` are mutually
35168    /// exclusive.
35169    ///
35170    /// # Example
35171    /// ```ignore,no_run
35172    /// # use google_cloud_dataplex_v1::model::DataSource;
35173    /// use google_cloud_dataplex_v1::model::data_source::Source;
35174    /// let x = DataSource::new().set_source(Some(Source::Entity("example".to_string())));
35175    /// ```
35176    pub fn set_source<
35177        T: std::convert::Into<std::option::Option<crate::model::data_source::Source>>,
35178    >(
35179        mut self,
35180        v: T,
35181    ) -> Self {
35182        self.source = v.into();
35183        self
35184    }
35185
35186    /// The value of [source][crate::model::DataSource::source]
35187    /// if it holds a `Entity`, `None` if the field is not set or
35188    /// holds a different branch.
35189    pub fn entity(&self) -> std::option::Option<&std::string::String> {
35190        #[allow(unreachable_patterns)]
35191        self.source.as_ref().and_then(|v| match v {
35192            crate::model::data_source::Source::Entity(v) => std::option::Option::Some(v),
35193            _ => std::option::Option::None,
35194        })
35195    }
35196
35197    /// Sets the value of [source][crate::model::DataSource::source]
35198    /// to hold a `Entity`.
35199    ///
35200    /// Note that all the setters affecting `source` are
35201    /// mutually exclusive.
35202    ///
35203    /// # Example
35204    /// ```ignore,no_run
35205    /// # use google_cloud_dataplex_v1::model::DataSource;
35206    /// let x = DataSource::new().set_entity("example");
35207    /// assert!(x.entity().is_some());
35208    /// assert!(x.resource().is_none());
35209    /// ```
35210    pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35211        self.source =
35212            std::option::Option::Some(crate::model::data_source::Source::Entity(v.into()));
35213        self
35214    }
35215
35216    /// The value of [source][crate::model::DataSource::source]
35217    /// if it holds a `Resource`, `None` if the field is not set or
35218    /// holds a different branch.
35219    pub fn resource(&self) -> std::option::Option<&std::string::String> {
35220        #[allow(unreachable_patterns)]
35221        self.source.as_ref().and_then(|v| match v {
35222            crate::model::data_source::Source::Resource(v) => std::option::Option::Some(v),
35223            _ => std::option::Option::None,
35224        })
35225    }
35226
35227    /// Sets the value of [source][crate::model::DataSource::source]
35228    /// to hold a `Resource`.
35229    ///
35230    /// Note that all the setters affecting `source` are
35231    /// mutually exclusive.
35232    ///
35233    /// # Example
35234    /// ```ignore,no_run
35235    /// # use google_cloud_dataplex_v1::model::DataSource;
35236    /// let x = DataSource::new().set_resource("example");
35237    /// assert!(x.resource().is_some());
35238    /// assert!(x.entity().is_none());
35239    /// ```
35240    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35241        self.source =
35242            std::option::Option::Some(crate::model::data_source::Source::Resource(v.into()));
35243        self
35244    }
35245}
35246
35247impl wkt::message::Message for DataSource {
35248    fn typename() -> &'static str {
35249        "type.googleapis.com/google.cloud.dataplex.v1.DataSource"
35250    }
35251}
35252
35253/// Defines additional types related to [DataSource].
35254pub mod data_source {
35255    #[allow(unused_imports)]
35256    use super::*;
35257
35258    /// The source is required and immutable. Once it is set, it cannot be change
35259    /// to others.
35260    #[derive(Clone, Debug, PartialEq)]
35261    #[non_exhaustive]
35262    pub enum Source {
35263        /// Immutable. The Dataplex Universal Catalog entity that represents the data
35264        /// source (e.g. BigQuery table) for DataScan, of the form:
35265        /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
35266        Entity(std::string::String),
35267        /// Immutable. The service-qualified full resource name of the cloud resource
35268        /// for a DataScan job to scan against. The field could either be: Cloud
35269        /// Storage bucket for DataDiscoveryScan Format:
35270        /// //storage.googleapis.com/projects/PROJECT_ID/buckets/BUCKET_ID
35271        /// or
35272        /// BigQuery table of type "TABLE" for
35273        /// DataProfileScan/DataQualityScan/DataDocumentationScan Format:
35274        /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
35275        Resource(std::string::String),
35276    }
35277}
35278
35279/// The data scanned during processing (e.g. in incremental DataScan)
35280#[derive(Clone, Default, PartialEq)]
35281#[non_exhaustive]
35282pub struct ScannedData {
35283    /// The range of scanned data
35284    pub data_range: std::option::Option<crate::model::scanned_data::DataRange>,
35285
35286    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35287}
35288
35289impl ScannedData {
35290    pub fn new() -> Self {
35291        std::default::Default::default()
35292    }
35293
35294    /// Sets the value of [data_range][crate::model::ScannedData::data_range].
35295    ///
35296    /// Note that all the setters affecting `data_range` are mutually
35297    /// exclusive.
35298    ///
35299    /// # Example
35300    /// ```ignore,no_run
35301    /// # use google_cloud_dataplex_v1::model::ScannedData;
35302    /// use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35303    /// let x = ScannedData::new().set_data_range(Some(
35304    ///     google_cloud_dataplex_v1::model::scanned_data::DataRange::IncrementalField(IncrementalField::default().into())));
35305    /// ```
35306    pub fn set_data_range<
35307        T: std::convert::Into<std::option::Option<crate::model::scanned_data::DataRange>>,
35308    >(
35309        mut self,
35310        v: T,
35311    ) -> Self {
35312        self.data_range = v.into();
35313        self
35314    }
35315
35316    /// The value of [data_range][crate::model::ScannedData::data_range]
35317    /// if it holds a `IncrementalField`, `None` if the field is not set or
35318    /// holds a different branch.
35319    pub fn incremental_field(
35320        &self,
35321    ) -> std::option::Option<&std::boxed::Box<crate::model::scanned_data::IncrementalField>> {
35322        #[allow(unreachable_patterns)]
35323        self.data_range.as_ref().and_then(|v| match v {
35324            crate::model::scanned_data::DataRange::IncrementalField(v) => {
35325                std::option::Option::Some(v)
35326            }
35327            _ => std::option::Option::None,
35328        })
35329    }
35330
35331    /// Sets the value of [data_range][crate::model::ScannedData::data_range]
35332    /// to hold a `IncrementalField`.
35333    ///
35334    /// Note that all the setters affecting `data_range` are
35335    /// mutually exclusive.
35336    ///
35337    /// # Example
35338    /// ```ignore,no_run
35339    /// # use google_cloud_dataplex_v1::model::ScannedData;
35340    /// use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35341    /// let x = ScannedData::new().set_incremental_field(IncrementalField::default()/* use setters */);
35342    /// assert!(x.incremental_field().is_some());
35343    /// ```
35344    pub fn set_incremental_field<
35345        T: std::convert::Into<std::boxed::Box<crate::model::scanned_data::IncrementalField>>,
35346    >(
35347        mut self,
35348        v: T,
35349    ) -> Self {
35350        self.data_range = std::option::Option::Some(
35351            crate::model::scanned_data::DataRange::IncrementalField(v.into()),
35352        );
35353        self
35354    }
35355}
35356
35357impl wkt::message::Message for ScannedData {
35358    fn typename() -> &'static str {
35359        "type.googleapis.com/google.cloud.dataplex.v1.ScannedData"
35360    }
35361}
35362
35363/// Defines additional types related to [ScannedData].
35364pub mod scanned_data {
35365    #[allow(unused_imports)]
35366    use super::*;
35367
35368    /// A data range denoted by a pair of start/end values of a field.
35369    #[derive(Clone, Default, PartialEq)]
35370    #[non_exhaustive]
35371    pub struct IncrementalField {
35372        /// Output only. The field that contains values which monotonically increases
35373        /// over time (e.g. a timestamp column).
35374        pub field: std::string::String,
35375
35376        /// Output only. Value that marks the start of the range.
35377        pub start: std::string::String,
35378
35379        /// Output only. Value that marks the end of the range.
35380        pub end: std::string::String,
35381
35382        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35383    }
35384
35385    impl IncrementalField {
35386        pub fn new() -> Self {
35387            std::default::Default::default()
35388        }
35389
35390        /// Sets the value of [field][crate::model::scanned_data::IncrementalField::field].
35391        ///
35392        /// # Example
35393        /// ```ignore,no_run
35394        /// # use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35395        /// let x = IncrementalField::new().set_field("example");
35396        /// ```
35397        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35398            self.field = v.into();
35399            self
35400        }
35401
35402        /// Sets the value of [start][crate::model::scanned_data::IncrementalField::start].
35403        ///
35404        /// # Example
35405        /// ```ignore,no_run
35406        /// # use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35407        /// let x = IncrementalField::new().set_start("example");
35408        /// ```
35409        pub fn set_start<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35410            self.start = v.into();
35411            self
35412        }
35413
35414        /// Sets the value of [end][crate::model::scanned_data::IncrementalField::end].
35415        ///
35416        /// # Example
35417        /// ```ignore,no_run
35418        /// # use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35419        /// let x = IncrementalField::new().set_end("example");
35420        /// ```
35421        pub fn set_end<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35422            self.end = v.into();
35423            self
35424        }
35425    }
35426
35427    impl wkt::message::Message for IncrementalField {
35428        fn typename() -> &'static str {
35429            "type.googleapis.com/google.cloud.dataplex.v1.ScannedData.IncrementalField"
35430        }
35431    }
35432
35433    /// The range of scanned data
35434    #[derive(Clone, Debug, PartialEq)]
35435    #[non_exhaustive]
35436    pub enum DataRange {
35437        /// The range denoted by values of an incremental field
35438        IncrementalField(std::boxed::Box<crate::model::scanned_data::IncrementalField>),
35439    }
35440}
35441
35442/// A lake is a centralized repository for managing enterprise data across the
35443/// organization distributed across many cloud projects, and stored in a variety
35444/// of storage services such as Google Cloud Storage and BigQuery. The resources
35445/// attached to a lake are referred to as managed resources. Data within these
35446/// managed resources can be structured or unstructured. A lake provides data
35447/// admins with tools to organize, secure and manage their data at scale, and
35448/// provides data scientists and data engineers an integrated experience to
35449/// easily search, discover, analyze and transform data and associated metadata.
35450#[derive(Clone, Default, PartialEq)]
35451#[non_exhaustive]
35452pub struct Lake {
35453    /// Output only. The relative resource name of the lake, of the form:
35454    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
35455    pub name: std::string::String,
35456
35457    /// Optional. User friendly display name.
35458    pub display_name: std::string::String,
35459
35460    /// Output only. System generated globally unique ID for the lake. This ID will
35461    /// be different if the lake is deleted and re-created with the same name.
35462    pub uid: std::string::String,
35463
35464    /// Output only. The time when the lake was created.
35465    pub create_time: std::option::Option<wkt::Timestamp>,
35466
35467    /// Output only. The time when the lake was last updated.
35468    pub update_time: std::option::Option<wkt::Timestamp>,
35469
35470    /// Optional. User-defined labels for the lake.
35471    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
35472
35473    /// Optional. Description of the lake.
35474    pub description: std::string::String,
35475
35476    /// Output only. Current state of the lake.
35477    pub state: crate::model::State,
35478
35479    /// Output only. Service account associated with this lake. This service
35480    /// account must be authorized to access or operate on resources managed by the
35481    /// lake.
35482    pub service_account: std::string::String,
35483
35484    /// Optional. Settings to manage lake and Dataproc Metastore service instance
35485    /// association.
35486    pub metastore: std::option::Option<crate::model::lake::Metastore>,
35487
35488    /// Output only. Aggregated status of the underlying assets of the lake.
35489    pub asset_status: std::option::Option<crate::model::AssetStatus>,
35490
35491    /// Output only. Metastore status of the lake.
35492    pub metastore_status: std::option::Option<crate::model::lake::MetastoreStatus>,
35493
35494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35495}
35496
35497impl Lake {
35498    pub fn new() -> Self {
35499        std::default::Default::default()
35500    }
35501
35502    /// Sets the value of [name][crate::model::Lake::name].
35503    ///
35504    /// # Example
35505    /// ```ignore,no_run
35506    /// # use google_cloud_dataplex_v1::model::Lake;
35507    /// let x = Lake::new().set_name("example");
35508    /// ```
35509    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35510        self.name = v.into();
35511        self
35512    }
35513
35514    /// Sets the value of [display_name][crate::model::Lake::display_name].
35515    ///
35516    /// # Example
35517    /// ```ignore,no_run
35518    /// # use google_cloud_dataplex_v1::model::Lake;
35519    /// let x = Lake::new().set_display_name("example");
35520    /// ```
35521    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35522        self.display_name = v.into();
35523        self
35524    }
35525
35526    /// Sets the value of [uid][crate::model::Lake::uid].
35527    ///
35528    /// # Example
35529    /// ```ignore,no_run
35530    /// # use google_cloud_dataplex_v1::model::Lake;
35531    /// let x = Lake::new().set_uid("example");
35532    /// ```
35533    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35534        self.uid = v.into();
35535        self
35536    }
35537
35538    /// Sets the value of [create_time][crate::model::Lake::create_time].
35539    ///
35540    /// # Example
35541    /// ```ignore,no_run
35542    /// # use google_cloud_dataplex_v1::model::Lake;
35543    /// use wkt::Timestamp;
35544    /// let x = Lake::new().set_create_time(Timestamp::default()/* use setters */);
35545    /// ```
35546    pub fn set_create_time<T>(mut self, v: T) -> Self
35547    where
35548        T: std::convert::Into<wkt::Timestamp>,
35549    {
35550        self.create_time = std::option::Option::Some(v.into());
35551        self
35552    }
35553
35554    /// Sets or clears the value of [create_time][crate::model::Lake::create_time].
35555    ///
35556    /// # Example
35557    /// ```ignore,no_run
35558    /// # use google_cloud_dataplex_v1::model::Lake;
35559    /// use wkt::Timestamp;
35560    /// let x = Lake::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
35561    /// let x = Lake::new().set_or_clear_create_time(None::<Timestamp>);
35562    /// ```
35563    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
35564    where
35565        T: std::convert::Into<wkt::Timestamp>,
35566    {
35567        self.create_time = v.map(|x| x.into());
35568        self
35569    }
35570
35571    /// Sets the value of [update_time][crate::model::Lake::update_time].
35572    ///
35573    /// # Example
35574    /// ```ignore,no_run
35575    /// # use google_cloud_dataplex_v1::model::Lake;
35576    /// use wkt::Timestamp;
35577    /// let x = Lake::new().set_update_time(Timestamp::default()/* use setters */);
35578    /// ```
35579    pub fn set_update_time<T>(mut self, v: T) -> Self
35580    where
35581        T: std::convert::Into<wkt::Timestamp>,
35582    {
35583        self.update_time = std::option::Option::Some(v.into());
35584        self
35585    }
35586
35587    /// Sets or clears the value of [update_time][crate::model::Lake::update_time].
35588    ///
35589    /// # Example
35590    /// ```ignore,no_run
35591    /// # use google_cloud_dataplex_v1::model::Lake;
35592    /// use wkt::Timestamp;
35593    /// let x = Lake::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
35594    /// let x = Lake::new().set_or_clear_update_time(None::<Timestamp>);
35595    /// ```
35596    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
35597    where
35598        T: std::convert::Into<wkt::Timestamp>,
35599    {
35600        self.update_time = v.map(|x| x.into());
35601        self
35602    }
35603
35604    /// Sets the value of [labels][crate::model::Lake::labels].
35605    ///
35606    /// # Example
35607    /// ```ignore,no_run
35608    /// # use google_cloud_dataplex_v1::model::Lake;
35609    /// let x = Lake::new().set_labels([
35610    ///     ("key0", "abc"),
35611    ///     ("key1", "xyz"),
35612    /// ]);
35613    /// ```
35614    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
35615    where
35616        T: std::iter::IntoIterator<Item = (K, V)>,
35617        K: std::convert::Into<std::string::String>,
35618        V: std::convert::Into<std::string::String>,
35619    {
35620        use std::iter::Iterator;
35621        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
35622        self
35623    }
35624
35625    /// Sets the value of [description][crate::model::Lake::description].
35626    ///
35627    /// # Example
35628    /// ```ignore,no_run
35629    /// # use google_cloud_dataplex_v1::model::Lake;
35630    /// let x = Lake::new().set_description("example");
35631    /// ```
35632    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35633        self.description = v.into();
35634        self
35635    }
35636
35637    /// Sets the value of [state][crate::model::Lake::state].
35638    ///
35639    /// # Example
35640    /// ```ignore,no_run
35641    /// # use google_cloud_dataplex_v1::model::Lake;
35642    /// use google_cloud_dataplex_v1::model::State;
35643    /// let x0 = Lake::new().set_state(State::Active);
35644    /// let x1 = Lake::new().set_state(State::Creating);
35645    /// let x2 = Lake::new().set_state(State::Deleting);
35646    /// ```
35647    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
35648        self.state = v.into();
35649        self
35650    }
35651
35652    /// Sets the value of [service_account][crate::model::Lake::service_account].
35653    ///
35654    /// # Example
35655    /// ```ignore,no_run
35656    /// # use google_cloud_dataplex_v1::model::Lake;
35657    /// let x = Lake::new().set_service_account("example");
35658    /// ```
35659    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35660        self.service_account = v.into();
35661        self
35662    }
35663
35664    /// Sets the value of [metastore][crate::model::Lake::metastore].
35665    ///
35666    /// # Example
35667    /// ```ignore,no_run
35668    /// # use google_cloud_dataplex_v1::model::Lake;
35669    /// use google_cloud_dataplex_v1::model::lake::Metastore;
35670    /// let x = Lake::new().set_metastore(Metastore::default()/* use setters */);
35671    /// ```
35672    pub fn set_metastore<T>(mut self, v: T) -> Self
35673    where
35674        T: std::convert::Into<crate::model::lake::Metastore>,
35675    {
35676        self.metastore = std::option::Option::Some(v.into());
35677        self
35678    }
35679
35680    /// Sets or clears the value of [metastore][crate::model::Lake::metastore].
35681    ///
35682    /// # Example
35683    /// ```ignore,no_run
35684    /// # use google_cloud_dataplex_v1::model::Lake;
35685    /// use google_cloud_dataplex_v1::model::lake::Metastore;
35686    /// let x = Lake::new().set_or_clear_metastore(Some(Metastore::default()/* use setters */));
35687    /// let x = Lake::new().set_or_clear_metastore(None::<Metastore>);
35688    /// ```
35689    pub fn set_or_clear_metastore<T>(mut self, v: std::option::Option<T>) -> Self
35690    where
35691        T: std::convert::Into<crate::model::lake::Metastore>,
35692    {
35693        self.metastore = v.map(|x| x.into());
35694        self
35695    }
35696
35697    /// Sets the value of [asset_status][crate::model::Lake::asset_status].
35698    ///
35699    /// # Example
35700    /// ```ignore,no_run
35701    /// # use google_cloud_dataplex_v1::model::Lake;
35702    /// use google_cloud_dataplex_v1::model::AssetStatus;
35703    /// let x = Lake::new().set_asset_status(AssetStatus::default()/* use setters */);
35704    /// ```
35705    pub fn set_asset_status<T>(mut self, v: T) -> Self
35706    where
35707        T: std::convert::Into<crate::model::AssetStatus>,
35708    {
35709        self.asset_status = std::option::Option::Some(v.into());
35710        self
35711    }
35712
35713    /// Sets or clears the value of [asset_status][crate::model::Lake::asset_status].
35714    ///
35715    /// # Example
35716    /// ```ignore,no_run
35717    /// # use google_cloud_dataplex_v1::model::Lake;
35718    /// use google_cloud_dataplex_v1::model::AssetStatus;
35719    /// let x = Lake::new().set_or_clear_asset_status(Some(AssetStatus::default()/* use setters */));
35720    /// let x = Lake::new().set_or_clear_asset_status(None::<AssetStatus>);
35721    /// ```
35722    pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
35723    where
35724        T: std::convert::Into<crate::model::AssetStatus>,
35725    {
35726        self.asset_status = v.map(|x| x.into());
35727        self
35728    }
35729
35730    /// Sets the value of [metastore_status][crate::model::Lake::metastore_status].
35731    ///
35732    /// # Example
35733    /// ```ignore,no_run
35734    /// # use google_cloud_dataplex_v1::model::Lake;
35735    /// use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35736    /// let x = Lake::new().set_metastore_status(MetastoreStatus::default()/* use setters */);
35737    /// ```
35738    pub fn set_metastore_status<T>(mut self, v: T) -> Self
35739    where
35740        T: std::convert::Into<crate::model::lake::MetastoreStatus>,
35741    {
35742        self.metastore_status = std::option::Option::Some(v.into());
35743        self
35744    }
35745
35746    /// Sets or clears the value of [metastore_status][crate::model::Lake::metastore_status].
35747    ///
35748    /// # Example
35749    /// ```ignore,no_run
35750    /// # use google_cloud_dataplex_v1::model::Lake;
35751    /// use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35752    /// let x = Lake::new().set_or_clear_metastore_status(Some(MetastoreStatus::default()/* use setters */));
35753    /// let x = Lake::new().set_or_clear_metastore_status(None::<MetastoreStatus>);
35754    /// ```
35755    pub fn set_or_clear_metastore_status<T>(mut self, v: std::option::Option<T>) -> Self
35756    where
35757        T: std::convert::Into<crate::model::lake::MetastoreStatus>,
35758    {
35759        self.metastore_status = v.map(|x| x.into());
35760        self
35761    }
35762}
35763
35764impl wkt::message::Message for Lake {
35765    fn typename() -> &'static str {
35766        "type.googleapis.com/google.cloud.dataplex.v1.Lake"
35767    }
35768}
35769
35770/// Defines additional types related to [Lake].
35771pub mod lake {
35772    #[allow(unused_imports)]
35773    use super::*;
35774
35775    /// Settings to manage association of Dataproc Metastore with a lake.
35776    #[derive(Clone, Default, PartialEq)]
35777    #[non_exhaustive]
35778    pub struct Metastore {
35779        /// Optional. A relative reference to the Dataproc Metastore
35780        /// (<https://cloud.google.com/dataproc-metastore/docs>) service associated
35781        /// with the lake:
35782        /// `projects/{project_id}/locations/{location_id}/services/{service_id}`
35783        pub service: std::string::String,
35784
35785        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35786    }
35787
35788    impl Metastore {
35789        pub fn new() -> Self {
35790            std::default::Default::default()
35791        }
35792
35793        /// Sets the value of [service][crate::model::lake::Metastore::service].
35794        ///
35795        /// # Example
35796        /// ```ignore,no_run
35797        /// # use google_cloud_dataplex_v1::model::lake::Metastore;
35798        /// let x = Metastore::new().set_service("example");
35799        /// ```
35800        pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35801            self.service = v.into();
35802            self
35803        }
35804    }
35805
35806    impl wkt::message::Message for Metastore {
35807        fn typename() -> &'static str {
35808            "type.googleapis.com/google.cloud.dataplex.v1.Lake.Metastore"
35809        }
35810    }
35811
35812    /// Status of Lake and Dataproc Metastore service instance association.
35813    #[derive(Clone, Default, PartialEq)]
35814    #[non_exhaustive]
35815    pub struct MetastoreStatus {
35816        /// Current state of association.
35817        pub state: crate::model::lake::metastore_status::State,
35818
35819        /// Additional information about the current status.
35820        pub message: std::string::String,
35821
35822        /// Last update time of the metastore status of the lake.
35823        pub update_time: std::option::Option<wkt::Timestamp>,
35824
35825        /// The URI of the endpoint used to access the Metastore service.
35826        pub endpoint: std::string::String,
35827
35828        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35829    }
35830
35831    impl MetastoreStatus {
35832        pub fn new() -> Self {
35833            std::default::Default::default()
35834        }
35835
35836        /// Sets the value of [state][crate::model::lake::MetastoreStatus::state].
35837        ///
35838        /// # Example
35839        /// ```ignore,no_run
35840        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35841        /// use google_cloud_dataplex_v1::model::lake::metastore_status::State;
35842        /// let x0 = MetastoreStatus::new().set_state(State::None);
35843        /// let x1 = MetastoreStatus::new().set_state(State::Ready);
35844        /// let x2 = MetastoreStatus::new().set_state(State::Updating);
35845        /// ```
35846        pub fn set_state<T: std::convert::Into<crate::model::lake::metastore_status::State>>(
35847            mut self,
35848            v: T,
35849        ) -> Self {
35850            self.state = v.into();
35851            self
35852        }
35853
35854        /// Sets the value of [message][crate::model::lake::MetastoreStatus::message].
35855        ///
35856        /// # Example
35857        /// ```ignore,no_run
35858        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35859        /// let x = MetastoreStatus::new().set_message("example");
35860        /// ```
35861        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35862            self.message = v.into();
35863            self
35864        }
35865
35866        /// Sets the value of [update_time][crate::model::lake::MetastoreStatus::update_time].
35867        ///
35868        /// # Example
35869        /// ```ignore,no_run
35870        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35871        /// use wkt::Timestamp;
35872        /// let x = MetastoreStatus::new().set_update_time(Timestamp::default()/* use setters */);
35873        /// ```
35874        pub fn set_update_time<T>(mut self, v: T) -> Self
35875        where
35876            T: std::convert::Into<wkt::Timestamp>,
35877        {
35878            self.update_time = std::option::Option::Some(v.into());
35879            self
35880        }
35881
35882        /// Sets or clears the value of [update_time][crate::model::lake::MetastoreStatus::update_time].
35883        ///
35884        /// # Example
35885        /// ```ignore,no_run
35886        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35887        /// use wkt::Timestamp;
35888        /// let x = MetastoreStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
35889        /// let x = MetastoreStatus::new().set_or_clear_update_time(None::<Timestamp>);
35890        /// ```
35891        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
35892        where
35893            T: std::convert::Into<wkt::Timestamp>,
35894        {
35895            self.update_time = v.map(|x| x.into());
35896            self
35897        }
35898
35899        /// Sets the value of [endpoint][crate::model::lake::MetastoreStatus::endpoint].
35900        ///
35901        /// # Example
35902        /// ```ignore,no_run
35903        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35904        /// let x = MetastoreStatus::new().set_endpoint("example");
35905        /// ```
35906        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35907            self.endpoint = v.into();
35908            self
35909        }
35910    }
35911
35912    impl wkt::message::Message for MetastoreStatus {
35913        fn typename() -> &'static str {
35914            "type.googleapis.com/google.cloud.dataplex.v1.Lake.MetastoreStatus"
35915        }
35916    }
35917
35918    /// Defines additional types related to [MetastoreStatus].
35919    pub mod metastore_status {
35920        #[allow(unused_imports)]
35921        use super::*;
35922
35923        /// Current state of association.
35924        ///
35925        /// # Working with unknown values
35926        ///
35927        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
35928        /// additional enum variants at any time. Adding new variants is not considered
35929        /// a breaking change. Applications should write their code in anticipation of:
35930        ///
35931        /// - New values appearing in future releases of the client library, **and**
35932        /// - New values received dynamically, without application changes.
35933        ///
35934        /// Please consult the [Working with enums] section in the user guide for some
35935        /// guidelines.
35936        ///
35937        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
35938        #[derive(Clone, Debug, PartialEq)]
35939        #[non_exhaustive]
35940        pub enum State {
35941            /// Unspecified.
35942            Unspecified,
35943            /// A Metastore service instance is not associated with the lake.
35944            None,
35945            /// A Metastore service instance is attached to the lake.
35946            Ready,
35947            /// Attach/detach is in progress.
35948            Updating,
35949            /// Attach/detach could not be done due to errors.
35950            Error,
35951            /// If set, the enum was initialized with an unknown value.
35952            ///
35953            /// Applications can examine the value using [State::value] or
35954            /// [State::name].
35955            UnknownValue(state::UnknownValue),
35956        }
35957
35958        #[doc(hidden)]
35959        pub mod state {
35960            #[allow(unused_imports)]
35961            use super::*;
35962            #[derive(Clone, Debug, PartialEq)]
35963            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
35964        }
35965
35966        impl State {
35967            /// Gets the enum value.
35968            ///
35969            /// Returns `None` if the enum contains an unknown value deserialized from
35970            /// the string representation of enums.
35971            pub fn value(&self) -> std::option::Option<i32> {
35972                match self {
35973                    Self::Unspecified => std::option::Option::Some(0),
35974                    Self::None => std::option::Option::Some(1),
35975                    Self::Ready => std::option::Option::Some(2),
35976                    Self::Updating => std::option::Option::Some(3),
35977                    Self::Error => std::option::Option::Some(4),
35978                    Self::UnknownValue(u) => u.0.value(),
35979                }
35980            }
35981
35982            /// Gets the enum value as a string.
35983            ///
35984            /// Returns `None` if the enum contains an unknown value deserialized from
35985            /// the integer representation of enums.
35986            pub fn name(&self) -> std::option::Option<&str> {
35987                match self {
35988                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
35989                    Self::None => std::option::Option::Some("NONE"),
35990                    Self::Ready => std::option::Option::Some("READY"),
35991                    Self::Updating => std::option::Option::Some("UPDATING"),
35992                    Self::Error => std::option::Option::Some("ERROR"),
35993                    Self::UnknownValue(u) => u.0.name(),
35994                }
35995            }
35996        }
35997
35998        impl std::default::Default for State {
35999            fn default() -> Self {
36000                use std::convert::From;
36001                Self::from(0)
36002            }
36003        }
36004
36005        impl std::fmt::Display for State {
36006            fn fmt(
36007                &self,
36008                f: &mut std::fmt::Formatter<'_>,
36009            ) -> std::result::Result<(), std::fmt::Error> {
36010                wkt::internal::display_enum(f, self.name(), self.value())
36011            }
36012        }
36013
36014        impl std::convert::From<i32> for State {
36015            fn from(value: i32) -> Self {
36016                match value {
36017                    0 => Self::Unspecified,
36018                    1 => Self::None,
36019                    2 => Self::Ready,
36020                    3 => Self::Updating,
36021                    4 => Self::Error,
36022                    _ => Self::UnknownValue(state::UnknownValue(
36023                        wkt::internal::UnknownEnumValue::Integer(value),
36024                    )),
36025                }
36026            }
36027        }
36028
36029        impl std::convert::From<&str> for State {
36030            fn from(value: &str) -> Self {
36031                use std::string::ToString;
36032                match value {
36033                    "STATE_UNSPECIFIED" => Self::Unspecified,
36034                    "NONE" => Self::None,
36035                    "READY" => Self::Ready,
36036                    "UPDATING" => Self::Updating,
36037                    "ERROR" => Self::Error,
36038                    _ => Self::UnknownValue(state::UnknownValue(
36039                        wkt::internal::UnknownEnumValue::String(value.to_string()),
36040                    )),
36041                }
36042            }
36043        }
36044
36045        impl serde::ser::Serialize for State {
36046            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36047            where
36048                S: serde::Serializer,
36049            {
36050                match self {
36051                    Self::Unspecified => serializer.serialize_i32(0),
36052                    Self::None => serializer.serialize_i32(1),
36053                    Self::Ready => serializer.serialize_i32(2),
36054                    Self::Updating => serializer.serialize_i32(3),
36055                    Self::Error => serializer.serialize_i32(4),
36056                    Self::UnknownValue(u) => u.0.serialize(serializer),
36057                }
36058            }
36059        }
36060
36061        impl<'de> serde::de::Deserialize<'de> for State {
36062            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36063            where
36064                D: serde::Deserializer<'de>,
36065            {
36066                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
36067                    ".google.cloud.dataplex.v1.Lake.MetastoreStatus.State",
36068                ))
36069            }
36070        }
36071    }
36072}
36073
36074/// Aggregated status of the underlying assets of a lake or zone.
36075#[derive(Clone, Default, PartialEq)]
36076#[non_exhaustive]
36077pub struct AssetStatus {
36078    /// Last update time of the status.
36079    pub update_time: std::option::Option<wkt::Timestamp>,
36080
36081    /// Number of active assets.
36082    pub active_assets: i32,
36083
36084    /// Number of assets that are in process of updating the security policy on
36085    /// attached resources.
36086    pub security_policy_applying_assets: i32,
36087
36088    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36089}
36090
36091impl AssetStatus {
36092    pub fn new() -> Self {
36093        std::default::Default::default()
36094    }
36095
36096    /// Sets the value of [update_time][crate::model::AssetStatus::update_time].
36097    ///
36098    /// # Example
36099    /// ```ignore,no_run
36100    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36101    /// use wkt::Timestamp;
36102    /// let x = AssetStatus::new().set_update_time(Timestamp::default()/* use setters */);
36103    /// ```
36104    pub fn set_update_time<T>(mut self, v: T) -> Self
36105    where
36106        T: std::convert::Into<wkt::Timestamp>,
36107    {
36108        self.update_time = std::option::Option::Some(v.into());
36109        self
36110    }
36111
36112    /// Sets or clears the value of [update_time][crate::model::AssetStatus::update_time].
36113    ///
36114    /// # Example
36115    /// ```ignore,no_run
36116    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36117    /// use wkt::Timestamp;
36118    /// let x = AssetStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
36119    /// let x = AssetStatus::new().set_or_clear_update_time(None::<Timestamp>);
36120    /// ```
36121    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
36122    where
36123        T: std::convert::Into<wkt::Timestamp>,
36124    {
36125        self.update_time = v.map(|x| x.into());
36126        self
36127    }
36128
36129    /// Sets the value of [active_assets][crate::model::AssetStatus::active_assets].
36130    ///
36131    /// # Example
36132    /// ```ignore,no_run
36133    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36134    /// let x = AssetStatus::new().set_active_assets(42);
36135    /// ```
36136    pub fn set_active_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
36137        self.active_assets = v.into();
36138        self
36139    }
36140
36141    /// Sets the value of [security_policy_applying_assets][crate::model::AssetStatus::security_policy_applying_assets].
36142    ///
36143    /// # Example
36144    /// ```ignore,no_run
36145    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36146    /// let x = AssetStatus::new().set_security_policy_applying_assets(42);
36147    /// ```
36148    pub fn set_security_policy_applying_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
36149        self.security_policy_applying_assets = v.into();
36150        self
36151    }
36152}
36153
36154impl wkt::message::Message for AssetStatus {
36155    fn typename() -> &'static str {
36156        "type.googleapis.com/google.cloud.dataplex.v1.AssetStatus"
36157    }
36158}
36159
36160/// A zone represents a logical group of related assets within a lake. A zone can
36161/// be used to map to organizational structure or represent stages of data
36162/// readiness from raw to curated. It provides managing behavior that is shared
36163/// or inherited by all contained assets.
36164#[derive(Clone, Default, PartialEq)]
36165#[non_exhaustive]
36166pub struct Zone {
36167    /// Output only. The relative resource name of the zone, of the form:
36168    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
36169    pub name: std::string::String,
36170
36171    /// Optional. User friendly display name.
36172    pub display_name: std::string::String,
36173
36174    /// Output only. System generated globally unique ID for the zone. This ID will
36175    /// be different if the zone is deleted and re-created with the same name.
36176    pub uid: std::string::String,
36177
36178    /// Output only. The time when the zone was created.
36179    pub create_time: std::option::Option<wkt::Timestamp>,
36180
36181    /// Output only. The time when the zone was last updated.
36182    pub update_time: std::option::Option<wkt::Timestamp>,
36183
36184    /// Optional. User defined labels for the zone.
36185    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
36186
36187    /// Optional. Description of the zone.
36188    pub description: std::string::String,
36189
36190    /// Output only. Current state of the zone.
36191    pub state: crate::model::State,
36192
36193    /// Required. Immutable. The type of the zone.
36194    pub r#type: crate::model::zone::Type,
36195
36196    /// Optional. Specification of the discovery feature applied to data in this
36197    /// zone.
36198    pub discovery_spec: std::option::Option<crate::model::zone::DiscoverySpec>,
36199
36200    /// Required. Specification of the resources that are referenced by the assets
36201    /// within this zone.
36202    pub resource_spec: std::option::Option<crate::model::zone::ResourceSpec>,
36203
36204    /// Output only. Aggregated status of the underlying assets of the zone.
36205    pub asset_status: std::option::Option<crate::model::AssetStatus>,
36206
36207    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36208}
36209
36210impl Zone {
36211    pub fn new() -> Self {
36212        std::default::Default::default()
36213    }
36214
36215    /// Sets the value of [name][crate::model::Zone::name].
36216    ///
36217    /// # Example
36218    /// ```ignore,no_run
36219    /// # use google_cloud_dataplex_v1::model::Zone;
36220    /// let x = Zone::new().set_name("example");
36221    /// ```
36222    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36223        self.name = v.into();
36224        self
36225    }
36226
36227    /// Sets the value of [display_name][crate::model::Zone::display_name].
36228    ///
36229    /// # Example
36230    /// ```ignore,no_run
36231    /// # use google_cloud_dataplex_v1::model::Zone;
36232    /// let x = Zone::new().set_display_name("example");
36233    /// ```
36234    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36235        self.display_name = v.into();
36236        self
36237    }
36238
36239    /// Sets the value of [uid][crate::model::Zone::uid].
36240    ///
36241    /// # Example
36242    /// ```ignore,no_run
36243    /// # use google_cloud_dataplex_v1::model::Zone;
36244    /// let x = Zone::new().set_uid("example");
36245    /// ```
36246    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36247        self.uid = v.into();
36248        self
36249    }
36250
36251    /// Sets the value of [create_time][crate::model::Zone::create_time].
36252    ///
36253    /// # Example
36254    /// ```ignore,no_run
36255    /// # use google_cloud_dataplex_v1::model::Zone;
36256    /// use wkt::Timestamp;
36257    /// let x = Zone::new().set_create_time(Timestamp::default()/* use setters */);
36258    /// ```
36259    pub fn set_create_time<T>(mut self, v: T) -> Self
36260    where
36261        T: std::convert::Into<wkt::Timestamp>,
36262    {
36263        self.create_time = std::option::Option::Some(v.into());
36264        self
36265    }
36266
36267    /// Sets or clears the value of [create_time][crate::model::Zone::create_time].
36268    ///
36269    /// # Example
36270    /// ```ignore,no_run
36271    /// # use google_cloud_dataplex_v1::model::Zone;
36272    /// use wkt::Timestamp;
36273    /// let x = Zone::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
36274    /// let x = Zone::new().set_or_clear_create_time(None::<Timestamp>);
36275    /// ```
36276    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
36277    where
36278        T: std::convert::Into<wkt::Timestamp>,
36279    {
36280        self.create_time = v.map(|x| x.into());
36281        self
36282    }
36283
36284    /// Sets the value of [update_time][crate::model::Zone::update_time].
36285    ///
36286    /// # Example
36287    /// ```ignore,no_run
36288    /// # use google_cloud_dataplex_v1::model::Zone;
36289    /// use wkt::Timestamp;
36290    /// let x = Zone::new().set_update_time(Timestamp::default()/* use setters */);
36291    /// ```
36292    pub fn set_update_time<T>(mut self, v: T) -> Self
36293    where
36294        T: std::convert::Into<wkt::Timestamp>,
36295    {
36296        self.update_time = std::option::Option::Some(v.into());
36297        self
36298    }
36299
36300    /// Sets or clears the value of [update_time][crate::model::Zone::update_time].
36301    ///
36302    /// # Example
36303    /// ```ignore,no_run
36304    /// # use google_cloud_dataplex_v1::model::Zone;
36305    /// use wkt::Timestamp;
36306    /// let x = Zone::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
36307    /// let x = Zone::new().set_or_clear_update_time(None::<Timestamp>);
36308    /// ```
36309    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
36310    where
36311        T: std::convert::Into<wkt::Timestamp>,
36312    {
36313        self.update_time = v.map(|x| x.into());
36314        self
36315    }
36316
36317    /// Sets the value of [labels][crate::model::Zone::labels].
36318    ///
36319    /// # Example
36320    /// ```ignore,no_run
36321    /// # use google_cloud_dataplex_v1::model::Zone;
36322    /// let x = Zone::new().set_labels([
36323    ///     ("key0", "abc"),
36324    ///     ("key1", "xyz"),
36325    /// ]);
36326    /// ```
36327    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
36328    where
36329        T: std::iter::IntoIterator<Item = (K, V)>,
36330        K: std::convert::Into<std::string::String>,
36331        V: std::convert::Into<std::string::String>,
36332    {
36333        use std::iter::Iterator;
36334        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
36335        self
36336    }
36337
36338    /// Sets the value of [description][crate::model::Zone::description].
36339    ///
36340    /// # Example
36341    /// ```ignore,no_run
36342    /// # use google_cloud_dataplex_v1::model::Zone;
36343    /// let x = Zone::new().set_description("example");
36344    /// ```
36345    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36346        self.description = v.into();
36347        self
36348    }
36349
36350    /// Sets the value of [state][crate::model::Zone::state].
36351    ///
36352    /// # Example
36353    /// ```ignore,no_run
36354    /// # use google_cloud_dataplex_v1::model::Zone;
36355    /// use google_cloud_dataplex_v1::model::State;
36356    /// let x0 = Zone::new().set_state(State::Active);
36357    /// let x1 = Zone::new().set_state(State::Creating);
36358    /// let x2 = Zone::new().set_state(State::Deleting);
36359    /// ```
36360    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
36361        self.state = v.into();
36362        self
36363    }
36364
36365    /// Sets the value of [r#type][crate::model::Zone::type].
36366    ///
36367    /// # Example
36368    /// ```ignore,no_run
36369    /// # use google_cloud_dataplex_v1::model::Zone;
36370    /// use google_cloud_dataplex_v1::model::zone::Type;
36371    /// let x0 = Zone::new().set_type(Type::Raw);
36372    /// let x1 = Zone::new().set_type(Type::Curated);
36373    /// ```
36374    pub fn set_type<T: std::convert::Into<crate::model::zone::Type>>(mut self, v: T) -> Self {
36375        self.r#type = v.into();
36376        self
36377    }
36378
36379    /// Sets the value of [discovery_spec][crate::model::Zone::discovery_spec].
36380    ///
36381    /// # Example
36382    /// ```ignore,no_run
36383    /// # use google_cloud_dataplex_v1::model::Zone;
36384    /// use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36385    /// let x = Zone::new().set_discovery_spec(DiscoverySpec::default()/* use setters */);
36386    /// ```
36387    pub fn set_discovery_spec<T>(mut self, v: T) -> Self
36388    where
36389        T: std::convert::Into<crate::model::zone::DiscoverySpec>,
36390    {
36391        self.discovery_spec = std::option::Option::Some(v.into());
36392        self
36393    }
36394
36395    /// Sets or clears the value of [discovery_spec][crate::model::Zone::discovery_spec].
36396    ///
36397    /// # Example
36398    /// ```ignore,no_run
36399    /// # use google_cloud_dataplex_v1::model::Zone;
36400    /// use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36401    /// let x = Zone::new().set_or_clear_discovery_spec(Some(DiscoverySpec::default()/* use setters */));
36402    /// let x = Zone::new().set_or_clear_discovery_spec(None::<DiscoverySpec>);
36403    /// ```
36404    pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
36405    where
36406        T: std::convert::Into<crate::model::zone::DiscoverySpec>,
36407    {
36408        self.discovery_spec = v.map(|x| x.into());
36409        self
36410    }
36411
36412    /// Sets the value of [resource_spec][crate::model::Zone::resource_spec].
36413    ///
36414    /// # Example
36415    /// ```ignore,no_run
36416    /// # use google_cloud_dataplex_v1::model::Zone;
36417    /// use google_cloud_dataplex_v1::model::zone::ResourceSpec;
36418    /// let x = Zone::new().set_resource_spec(ResourceSpec::default()/* use setters */);
36419    /// ```
36420    pub fn set_resource_spec<T>(mut self, v: T) -> Self
36421    where
36422        T: std::convert::Into<crate::model::zone::ResourceSpec>,
36423    {
36424        self.resource_spec = std::option::Option::Some(v.into());
36425        self
36426    }
36427
36428    /// Sets or clears the value of [resource_spec][crate::model::Zone::resource_spec].
36429    ///
36430    /// # Example
36431    /// ```ignore,no_run
36432    /// # use google_cloud_dataplex_v1::model::Zone;
36433    /// use google_cloud_dataplex_v1::model::zone::ResourceSpec;
36434    /// let x = Zone::new().set_or_clear_resource_spec(Some(ResourceSpec::default()/* use setters */));
36435    /// let x = Zone::new().set_or_clear_resource_spec(None::<ResourceSpec>);
36436    /// ```
36437    pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
36438    where
36439        T: std::convert::Into<crate::model::zone::ResourceSpec>,
36440    {
36441        self.resource_spec = v.map(|x| x.into());
36442        self
36443    }
36444
36445    /// Sets the value of [asset_status][crate::model::Zone::asset_status].
36446    ///
36447    /// # Example
36448    /// ```ignore,no_run
36449    /// # use google_cloud_dataplex_v1::model::Zone;
36450    /// use google_cloud_dataplex_v1::model::AssetStatus;
36451    /// let x = Zone::new().set_asset_status(AssetStatus::default()/* use setters */);
36452    /// ```
36453    pub fn set_asset_status<T>(mut self, v: T) -> Self
36454    where
36455        T: std::convert::Into<crate::model::AssetStatus>,
36456    {
36457        self.asset_status = std::option::Option::Some(v.into());
36458        self
36459    }
36460
36461    /// Sets or clears the value of [asset_status][crate::model::Zone::asset_status].
36462    ///
36463    /// # Example
36464    /// ```ignore,no_run
36465    /// # use google_cloud_dataplex_v1::model::Zone;
36466    /// use google_cloud_dataplex_v1::model::AssetStatus;
36467    /// let x = Zone::new().set_or_clear_asset_status(Some(AssetStatus::default()/* use setters */));
36468    /// let x = Zone::new().set_or_clear_asset_status(None::<AssetStatus>);
36469    /// ```
36470    pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
36471    where
36472        T: std::convert::Into<crate::model::AssetStatus>,
36473    {
36474        self.asset_status = v.map(|x| x.into());
36475        self
36476    }
36477}
36478
36479impl wkt::message::Message for Zone {
36480    fn typename() -> &'static str {
36481        "type.googleapis.com/google.cloud.dataplex.v1.Zone"
36482    }
36483}
36484
36485/// Defines additional types related to [Zone].
36486pub mod zone {
36487    #[allow(unused_imports)]
36488    use super::*;
36489
36490    /// Settings for resources attached as assets within a zone.
36491    #[derive(Clone, Default, PartialEq)]
36492    #[non_exhaustive]
36493    pub struct ResourceSpec {
36494        /// Required. Immutable. The location type of the resources that are allowed
36495        /// to be attached to the assets within this zone.
36496        pub location_type: crate::model::zone::resource_spec::LocationType,
36497
36498        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36499    }
36500
36501    impl ResourceSpec {
36502        pub fn new() -> Self {
36503            std::default::Default::default()
36504        }
36505
36506        /// Sets the value of [location_type][crate::model::zone::ResourceSpec::location_type].
36507        ///
36508        /// # Example
36509        /// ```ignore,no_run
36510        /// # use google_cloud_dataplex_v1::model::zone::ResourceSpec;
36511        /// use google_cloud_dataplex_v1::model::zone::resource_spec::LocationType;
36512        /// let x0 = ResourceSpec::new().set_location_type(LocationType::SingleRegion);
36513        /// let x1 = ResourceSpec::new().set_location_type(LocationType::MultiRegion);
36514        /// ```
36515        pub fn set_location_type<
36516            T: std::convert::Into<crate::model::zone::resource_spec::LocationType>,
36517        >(
36518            mut self,
36519            v: T,
36520        ) -> Self {
36521            self.location_type = v.into();
36522            self
36523        }
36524    }
36525
36526    impl wkt::message::Message for ResourceSpec {
36527        fn typename() -> &'static str {
36528            "type.googleapis.com/google.cloud.dataplex.v1.Zone.ResourceSpec"
36529        }
36530    }
36531
36532    /// Defines additional types related to [ResourceSpec].
36533    pub mod resource_spec {
36534        #[allow(unused_imports)]
36535        use super::*;
36536
36537        /// Location type of the resources attached to a zone.
36538        ///
36539        /// # Working with unknown values
36540        ///
36541        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36542        /// additional enum variants at any time. Adding new variants is not considered
36543        /// a breaking change. Applications should write their code in anticipation of:
36544        ///
36545        /// - New values appearing in future releases of the client library, **and**
36546        /// - New values received dynamically, without application changes.
36547        ///
36548        /// Please consult the [Working with enums] section in the user guide for some
36549        /// guidelines.
36550        ///
36551        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36552        #[derive(Clone, Debug, PartialEq)]
36553        #[non_exhaustive]
36554        pub enum LocationType {
36555            /// Unspecified location type.
36556            Unspecified,
36557            /// Resources that are associated with a single region.
36558            SingleRegion,
36559            /// Resources that are associated with a multi-region location.
36560            MultiRegion,
36561            /// If set, the enum was initialized with an unknown value.
36562            ///
36563            /// Applications can examine the value using [LocationType::value] or
36564            /// [LocationType::name].
36565            UnknownValue(location_type::UnknownValue),
36566        }
36567
36568        #[doc(hidden)]
36569        pub mod location_type {
36570            #[allow(unused_imports)]
36571            use super::*;
36572            #[derive(Clone, Debug, PartialEq)]
36573            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36574        }
36575
36576        impl LocationType {
36577            /// Gets the enum value.
36578            ///
36579            /// Returns `None` if the enum contains an unknown value deserialized from
36580            /// the string representation of enums.
36581            pub fn value(&self) -> std::option::Option<i32> {
36582                match self {
36583                    Self::Unspecified => std::option::Option::Some(0),
36584                    Self::SingleRegion => std::option::Option::Some(1),
36585                    Self::MultiRegion => std::option::Option::Some(2),
36586                    Self::UnknownValue(u) => u.0.value(),
36587                }
36588            }
36589
36590            /// Gets the enum value as a string.
36591            ///
36592            /// Returns `None` if the enum contains an unknown value deserialized from
36593            /// the integer representation of enums.
36594            pub fn name(&self) -> std::option::Option<&str> {
36595                match self {
36596                    Self::Unspecified => std::option::Option::Some("LOCATION_TYPE_UNSPECIFIED"),
36597                    Self::SingleRegion => std::option::Option::Some("SINGLE_REGION"),
36598                    Self::MultiRegion => std::option::Option::Some("MULTI_REGION"),
36599                    Self::UnknownValue(u) => u.0.name(),
36600                }
36601            }
36602        }
36603
36604        impl std::default::Default for LocationType {
36605            fn default() -> Self {
36606                use std::convert::From;
36607                Self::from(0)
36608            }
36609        }
36610
36611        impl std::fmt::Display for LocationType {
36612            fn fmt(
36613                &self,
36614                f: &mut std::fmt::Formatter<'_>,
36615            ) -> std::result::Result<(), std::fmt::Error> {
36616                wkt::internal::display_enum(f, self.name(), self.value())
36617            }
36618        }
36619
36620        impl std::convert::From<i32> for LocationType {
36621            fn from(value: i32) -> Self {
36622                match value {
36623                    0 => Self::Unspecified,
36624                    1 => Self::SingleRegion,
36625                    2 => Self::MultiRegion,
36626                    _ => Self::UnknownValue(location_type::UnknownValue(
36627                        wkt::internal::UnknownEnumValue::Integer(value),
36628                    )),
36629                }
36630            }
36631        }
36632
36633        impl std::convert::From<&str> for LocationType {
36634            fn from(value: &str) -> Self {
36635                use std::string::ToString;
36636                match value {
36637                    "LOCATION_TYPE_UNSPECIFIED" => Self::Unspecified,
36638                    "SINGLE_REGION" => Self::SingleRegion,
36639                    "MULTI_REGION" => Self::MultiRegion,
36640                    _ => Self::UnknownValue(location_type::UnknownValue(
36641                        wkt::internal::UnknownEnumValue::String(value.to_string()),
36642                    )),
36643                }
36644            }
36645        }
36646
36647        impl serde::ser::Serialize for LocationType {
36648            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36649            where
36650                S: serde::Serializer,
36651            {
36652                match self {
36653                    Self::Unspecified => serializer.serialize_i32(0),
36654                    Self::SingleRegion => serializer.serialize_i32(1),
36655                    Self::MultiRegion => serializer.serialize_i32(2),
36656                    Self::UnknownValue(u) => u.0.serialize(serializer),
36657                }
36658            }
36659        }
36660
36661        impl<'de> serde::de::Deserialize<'de> for LocationType {
36662            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36663            where
36664                D: serde::Deserializer<'de>,
36665            {
36666                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationType>::new(
36667                    ".google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType",
36668                ))
36669            }
36670        }
36671    }
36672
36673    /// Settings to manage the metadata discovery and publishing in a zone.
36674    #[derive(Clone, Default, PartialEq)]
36675    #[non_exhaustive]
36676    pub struct DiscoverySpec {
36677        /// Required. Whether discovery is enabled.
36678        pub enabled: bool,
36679
36680        /// Optional. The list of patterns to apply for selecting data to include
36681        /// during discovery if only a subset of the data should considered. For
36682        /// Cloud Storage bucket assets, these are interpreted as glob patterns used
36683        /// to match object names. For BigQuery dataset assets, these are interpreted
36684        /// as patterns to match table names.
36685        pub include_patterns: std::vec::Vec<std::string::String>,
36686
36687        /// Optional. The list of patterns to apply for selecting data to exclude
36688        /// during discovery.  For Cloud Storage bucket assets, these are interpreted
36689        /// as glob patterns used to match object names. For BigQuery dataset assets,
36690        /// these are interpreted as patterns to match table names.
36691        pub exclude_patterns: std::vec::Vec<std::string::String>,
36692
36693        /// Optional. Configuration for CSV data.
36694        pub csv_options: std::option::Option<crate::model::zone::discovery_spec::CsvOptions>,
36695
36696        /// Optional. Configuration for Json data.
36697        pub json_options: std::option::Option<crate::model::zone::discovery_spec::JsonOptions>,
36698
36699        /// Determines when discovery is triggered.
36700        pub trigger: std::option::Option<crate::model::zone::discovery_spec::Trigger>,
36701
36702        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36703    }
36704
36705    impl DiscoverySpec {
36706        pub fn new() -> Self {
36707            std::default::Default::default()
36708        }
36709
36710        /// Sets the value of [enabled][crate::model::zone::DiscoverySpec::enabled].
36711        ///
36712        /// # Example
36713        /// ```ignore,no_run
36714        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36715        /// let x = DiscoverySpec::new().set_enabled(true);
36716        /// ```
36717        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
36718            self.enabled = v.into();
36719            self
36720        }
36721
36722        /// Sets the value of [include_patterns][crate::model::zone::DiscoverySpec::include_patterns].
36723        ///
36724        /// # Example
36725        /// ```ignore,no_run
36726        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36727        /// let x = DiscoverySpec::new().set_include_patterns(["a", "b", "c"]);
36728        /// ```
36729        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
36730        where
36731            T: std::iter::IntoIterator<Item = V>,
36732            V: std::convert::Into<std::string::String>,
36733        {
36734            use std::iter::Iterator;
36735            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
36736            self
36737        }
36738
36739        /// Sets the value of [exclude_patterns][crate::model::zone::DiscoverySpec::exclude_patterns].
36740        ///
36741        /// # Example
36742        /// ```ignore,no_run
36743        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36744        /// let x = DiscoverySpec::new().set_exclude_patterns(["a", "b", "c"]);
36745        /// ```
36746        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
36747        where
36748            T: std::iter::IntoIterator<Item = V>,
36749            V: std::convert::Into<std::string::String>,
36750        {
36751            use std::iter::Iterator;
36752            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
36753            self
36754        }
36755
36756        /// Sets the value of [csv_options][crate::model::zone::DiscoverySpec::csv_options].
36757        ///
36758        /// # Example
36759        /// ```ignore,no_run
36760        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36761        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36762        /// let x = DiscoverySpec::new().set_csv_options(CsvOptions::default()/* use setters */);
36763        /// ```
36764        pub fn set_csv_options<T>(mut self, v: T) -> Self
36765        where
36766            T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
36767        {
36768            self.csv_options = std::option::Option::Some(v.into());
36769            self
36770        }
36771
36772        /// Sets or clears the value of [csv_options][crate::model::zone::DiscoverySpec::csv_options].
36773        ///
36774        /// # Example
36775        /// ```ignore,no_run
36776        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36777        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36778        /// let x = DiscoverySpec::new().set_or_clear_csv_options(Some(CsvOptions::default()/* use setters */));
36779        /// let x = DiscoverySpec::new().set_or_clear_csv_options(None::<CsvOptions>);
36780        /// ```
36781        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
36782        where
36783            T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
36784        {
36785            self.csv_options = v.map(|x| x.into());
36786            self
36787        }
36788
36789        /// Sets the value of [json_options][crate::model::zone::DiscoverySpec::json_options].
36790        ///
36791        /// # Example
36792        /// ```ignore,no_run
36793        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36794        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
36795        /// let x = DiscoverySpec::new().set_json_options(JsonOptions::default()/* use setters */);
36796        /// ```
36797        pub fn set_json_options<T>(mut self, v: T) -> Self
36798        where
36799            T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
36800        {
36801            self.json_options = std::option::Option::Some(v.into());
36802            self
36803        }
36804
36805        /// Sets or clears the value of [json_options][crate::model::zone::DiscoverySpec::json_options].
36806        ///
36807        /// # Example
36808        /// ```ignore,no_run
36809        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36810        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
36811        /// let x = DiscoverySpec::new().set_or_clear_json_options(Some(JsonOptions::default()/* use setters */));
36812        /// let x = DiscoverySpec::new().set_or_clear_json_options(None::<JsonOptions>);
36813        /// ```
36814        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
36815        where
36816            T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
36817        {
36818            self.json_options = v.map(|x| x.into());
36819            self
36820        }
36821
36822        /// Sets the value of [trigger][crate::model::zone::DiscoverySpec::trigger].
36823        ///
36824        /// Note that all the setters affecting `trigger` are mutually
36825        /// exclusive.
36826        ///
36827        /// # Example
36828        /// ```ignore,no_run
36829        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36830        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::Trigger;
36831        /// let x = DiscoverySpec::new().set_trigger(Some(Trigger::Schedule("example".to_string())));
36832        /// ```
36833        pub fn set_trigger<
36834            T: std::convert::Into<std::option::Option<crate::model::zone::discovery_spec::Trigger>>,
36835        >(
36836            mut self,
36837            v: T,
36838        ) -> Self {
36839            self.trigger = v.into();
36840            self
36841        }
36842
36843        /// The value of [trigger][crate::model::zone::DiscoverySpec::trigger]
36844        /// if it holds a `Schedule`, `None` if the field is not set or
36845        /// holds a different branch.
36846        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
36847            #[allow(unreachable_patterns)]
36848            self.trigger.as_ref().and_then(|v| match v {
36849                crate::model::zone::discovery_spec::Trigger::Schedule(v) => {
36850                    std::option::Option::Some(v)
36851                }
36852                _ => std::option::Option::None,
36853            })
36854        }
36855
36856        /// Sets the value of [trigger][crate::model::zone::DiscoverySpec::trigger]
36857        /// to hold a `Schedule`.
36858        ///
36859        /// Note that all the setters affecting `trigger` are
36860        /// mutually exclusive.
36861        ///
36862        /// # Example
36863        /// ```ignore,no_run
36864        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36865        /// let x = DiscoverySpec::new().set_schedule("example");
36866        /// assert!(x.schedule().is_some());
36867        /// ```
36868        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36869            self.trigger = std::option::Option::Some(
36870                crate::model::zone::discovery_spec::Trigger::Schedule(v.into()),
36871            );
36872            self
36873        }
36874    }
36875
36876    impl wkt::message::Message for DiscoverySpec {
36877        fn typename() -> &'static str {
36878            "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec"
36879        }
36880    }
36881
36882    /// Defines additional types related to [DiscoverySpec].
36883    pub mod discovery_spec {
36884        #[allow(unused_imports)]
36885        use super::*;
36886
36887        /// Describe CSV and similar semi-structured data formats.
36888        #[derive(Clone, Default, PartialEq)]
36889        #[non_exhaustive]
36890        pub struct CsvOptions {
36891            /// Optional. The number of rows to interpret as header rows that should be
36892            /// skipped when reading data rows.
36893            pub header_rows: i32,
36894
36895            /// Optional. The delimiter being used to separate values. This defaults to
36896            /// ','.
36897            pub delimiter: std::string::String,
36898
36899            /// Optional. The character encoding of the data. The default is UTF-8.
36900            pub encoding: std::string::String,
36901
36902            /// Optional. Whether to disable the inference of data type for CSV data.
36903            /// If true, all columns will be registered as strings.
36904            pub disable_type_inference: bool,
36905
36906            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36907        }
36908
36909        impl CsvOptions {
36910            pub fn new() -> Self {
36911                std::default::Default::default()
36912            }
36913
36914            /// Sets the value of [header_rows][crate::model::zone::discovery_spec::CsvOptions::header_rows].
36915            ///
36916            /// # Example
36917            /// ```ignore,no_run
36918            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36919            /// let x = CsvOptions::new().set_header_rows(42);
36920            /// ```
36921            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
36922                self.header_rows = v.into();
36923                self
36924            }
36925
36926            /// Sets the value of [delimiter][crate::model::zone::discovery_spec::CsvOptions::delimiter].
36927            ///
36928            /// # Example
36929            /// ```ignore,no_run
36930            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36931            /// let x = CsvOptions::new().set_delimiter("example");
36932            /// ```
36933            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
36934                mut self,
36935                v: T,
36936            ) -> Self {
36937                self.delimiter = v.into();
36938                self
36939            }
36940
36941            /// Sets the value of [encoding][crate::model::zone::discovery_spec::CsvOptions::encoding].
36942            ///
36943            /// # Example
36944            /// ```ignore,no_run
36945            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36946            /// let x = CsvOptions::new().set_encoding("example");
36947            /// ```
36948            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
36949                mut self,
36950                v: T,
36951            ) -> Self {
36952                self.encoding = v.into();
36953                self
36954            }
36955
36956            /// Sets the value of [disable_type_inference][crate::model::zone::discovery_spec::CsvOptions::disable_type_inference].
36957            ///
36958            /// # Example
36959            /// ```ignore,no_run
36960            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36961            /// let x = CsvOptions::new().set_disable_type_inference(true);
36962            /// ```
36963            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
36964                self.disable_type_inference = v.into();
36965                self
36966            }
36967        }
36968
36969        impl wkt::message::Message for CsvOptions {
36970            fn typename() -> &'static str {
36971                "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions"
36972            }
36973        }
36974
36975        /// Describe JSON data format.
36976        #[derive(Clone, Default, PartialEq)]
36977        #[non_exhaustive]
36978        pub struct JsonOptions {
36979            /// Optional. The character encoding of the data. The default is UTF-8.
36980            pub encoding: std::string::String,
36981
36982            /// Optional. Whether to disable the inference of data type for Json data.
36983            /// If true, all columns will be registered as their primitive types
36984            /// (strings, number or boolean).
36985            pub disable_type_inference: bool,
36986
36987            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36988        }
36989
36990        impl JsonOptions {
36991            pub fn new() -> Self {
36992                std::default::Default::default()
36993            }
36994
36995            /// Sets the value of [encoding][crate::model::zone::discovery_spec::JsonOptions::encoding].
36996            ///
36997            /// # Example
36998            /// ```ignore,no_run
36999            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
37000            /// let x = JsonOptions::new().set_encoding("example");
37001            /// ```
37002            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
37003                mut self,
37004                v: T,
37005            ) -> Self {
37006                self.encoding = v.into();
37007                self
37008            }
37009
37010            /// Sets the value of [disable_type_inference][crate::model::zone::discovery_spec::JsonOptions::disable_type_inference].
37011            ///
37012            /// # Example
37013            /// ```ignore,no_run
37014            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
37015            /// let x = JsonOptions::new().set_disable_type_inference(true);
37016            /// ```
37017            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
37018                self.disable_type_inference = v.into();
37019                self
37020            }
37021        }
37022
37023        impl wkt::message::Message for JsonOptions {
37024            fn typename() -> &'static str {
37025                "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions"
37026            }
37027        }
37028
37029        /// Determines when discovery is triggered.
37030        #[derive(Clone, Debug, PartialEq)]
37031        #[non_exhaustive]
37032        pub enum Trigger {
37033            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
37034            /// running discovery periodically. Successive discovery runs must be
37035            /// scheduled at least 60 minutes apart. The default value is to run
37036            /// discovery every 60 minutes.
37037            ///
37038            /// To explicitly set a timezone to the cron tab, apply a prefix in the
37039            /// cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}".
37040            /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
37041            /// database. For example, `CRON_TZ=America/New_York 1 * * * *`, or
37042            /// `TZ=America/New_York 1 * * * *`.
37043            Schedule(std::string::String),
37044        }
37045    }
37046
37047    /// Type of zone.
37048    ///
37049    /// # Working with unknown values
37050    ///
37051    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
37052    /// additional enum variants at any time. Adding new variants is not considered
37053    /// a breaking change. Applications should write their code in anticipation of:
37054    ///
37055    /// - New values appearing in future releases of the client library, **and**
37056    /// - New values received dynamically, without application changes.
37057    ///
37058    /// Please consult the [Working with enums] section in the user guide for some
37059    /// guidelines.
37060    ///
37061    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
37062    #[derive(Clone, Debug, PartialEq)]
37063    #[non_exhaustive]
37064    pub enum Type {
37065        /// Zone type not specified.
37066        Unspecified,
37067        /// A zone that contains data that needs further processing before it is
37068        /// considered generally ready for consumption and analytics workloads.
37069        Raw,
37070        /// A zone that contains data that is considered to be ready for broader
37071        /// consumption and analytics workloads. Curated structured data stored in
37072        /// Cloud Storage must conform to certain file formats (parquet, avro and
37073        /// orc) and organized in a hive-compatible directory layout.
37074        Curated,
37075        /// If set, the enum was initialized with an unknown value.
37076        ///
37077        /// Applications can examine the value using [Type::value] or
37078        /// [Type::name].
37079        UnknownValue(r#type::UnknownValue),
37080    }
37081
37082    #[doc(hidden)]
37083    pub mod r#type {
37084        #[allow(unused_imports)]
37085        use super::*;
37086        #[derive(Clone, Debug, PartialEq)]
37087        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
37088    }
37089
37090    impl Type {
37091        /// Gets the enum value.
37092        ///
37093        /// Returns `None` if the enum contains an unknown value deserialized from
37094        /// the string representation of enums.
37095        pub fn value(&self) -> std::option::Option<i32> {
37096            match self {
37097                Self::Unspecified => std::option::Option::Some(0),
37098                Self::Raw => std::option::Option::Some(1),
37099                Self::Curated => std::option::Option::Some(2),
37100                Self::UnknownValue(u) => u.0.value(),
37101            }
37102        }
37103
37104        /// Gets the enum value as a string.
37105        ///
37106        /// Returns `None` if the enum contains an unknown value deserialized from
37107        /// the integer representation of enums.
37108        pub fn name(&self) -> std::option::Option<&str> {
37109            match self {
37110                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
37111                Self::Raw => std::option::Option::Some("RAW"),
37112                Self::Curated => std::option::Option::Some("CURATED"),
37113                Self::UnknownValue(u) => u.0.name(),
37114            }
37115        }
37116    }
37117
37118    impl std::default::Default for Type {
37119        fn default() -> Self {
37120            use std::convert::From;
37121            Self::from(0)
37122        }
37123    }
37124
37125    impl std::fmt::Display for Type {
37126        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
37127            wkt::internal::display_enum(f, self.name(), self.value())
37128        }
37129    }
37130
37131    impl std::convert::From<i32> for Type {
37132        fn from(value: i32) -> Self {
37133            match value {
37134                0 => Self::Unspecified,
37135                1 => Self::Raw,
37136                2 => Self::Curated,
37137                _ => Self::UnknownValue(r#type::UnknownValue(
37138                    wkt::internal::UnknownEnumValue::Integer(value),
37139                )),
37140            }
37141        }
37142    }
37143
37144    impl std::convert::From<&str> for Type {
37145        fn from(value: &str) -> Self {
37146            use std::string::ToString;
37147            match value {
37148                "TYPE_UNSPECIFIED" => Self::Unspecified,
37149                "RAW" => Self::Raw,
37150                "CURATED" => Self::Curated,
37151                _ => Self::UnknownValue(r#type::UnknownValue(
37152                    wkt::internal::UnknownEnumValue::String(value.to_string()),
37153                )),
37154            }
37155        }
37156    }
37157
37158    impl serde::ser::Serialize for Type {
37159        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
37160        where
37161            S: serde::Serializer,
37162        {
37163            match self {
37164                Self::Unspecified => serializer.serialize_i32(0),
37165                Self::Raw => serializer.serialize_i32(1),
37166                Self::Curated => serializer.serialize_i32(2),
37167                Self::UnknownValue(u) => u.0.serialize(serializer),
37168            }
37169        }
37170    }
37171
37172    impl<'de> serde::de::Deserialize<'de> for Type {
37173        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
37174        where
37175            D: serde::Deserializer<'de>,
37176        {
37177            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
37178                ".google.cloud.dataplex.v1.Zone.Type",
37179            ))
37180        }
37181    }
37182}
37183
37184/// Action represents an issue requiring administrator action for resolution.
37185#[derive(Clone, Default, PartialEq)]
37186#[non_exhaustive]
37187pub struct Action {
37188    /// The category of issue associated with the action.
37189    pub category: crate::model::action::Category,
37190
37191    /// Detailed description of the issue requiring action.
37192    pub issue: std::string::String,
37193
37194    /// The time that the issue was detected.
37195    pub detect_time: std::option::Option<wkt::Timestamp>,
37196
37197    /// Output only. The relative resource name of the action, of the form:
37198    /// `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}`
37199    /// `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}`
37200    /// `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`.
37201    pub name: std::string::String,
37202
37203    /// Output only. The relative resource name of the lake, of the form:
37204    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
37205    pub lake: std::string::String,
37206
37207    /// Output only. The relative resource name of the zone, of the form:
37208    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
37209    pub zone: std::string::String,
37210
37211    /// Output only. The relative resource name of the asset, of the form:
37212    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
37213    pub asset: std::string::String,
37214
37215    /// The list of data locations associated with this action. Cloud Storage
37216    /// locations are represented as URI paths(E.g.
37217    /// `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to
37218    /// resource names(E.g.
37219    /// `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`).
37220    pub data_locations: std::vec::Vec<std::string::String>,
37221
37222    /// Additional details about the action based on the action category.
37223    pub details: std::option::Option<crate::model::action::Details>,
37224
37225    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37226}
37227
37228impl Action {
37229    pub fn new() -> Self {
37230        std::default::Default::default()
37231    }
37232
37233    /// Sets the value of [category][crate::model::Action::category].
37234    ///
37235    /// # Example
37236    /// ```ignore,no_run
37237    /// # use google_cloud_dataplex_v1::model::Action;
37238    /// use google_cloud_dataplex_v1::model::action::Category;
37239    /// let x0 = Action::new().set_category(Category::ResourceManagement);
37240    /// let x1 = Action::new().set_category(Category::SecurityPolicy);
37241    /// let x2 = Action::new().set_category(Category::DataDiscovery);
37242    /// ```
37243    pub fn set_category<T: std::convert::Into<crate::model::action::Category>>(
37244        mut self,
37245        v: T,
37246    ) -> Self {
37247        self.category = v.into();
37248        self
37249    }
37250
37251    /// Sets the value of [issue][crate::model::Action::issue].
37252    ///
37253    /// # Example
37254    /// ```ignore,no_run
37255    /// # use google_cloud_dataplex_v1::model::Action;
37256    /// let x = Action::new().set_issue("example");
37257    /// ```
37258    pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37259        self.issue = v.into();
37260        self
37261    }
37262
37263    /// Sets the value of [detect_time][crate::model::Action::detect_time].
37264    ///
37265    /// # Example
37266    /// ```ignore,no_run
37267    /// # use google_cloud_dataplex_v1::model::Action;
37268    /// use wkt::Timestamp;
37269    /// let x = Action::new().set_detect_time(Timestamp::default()/* use setters */);
37270    /// ```
37271    pub fn set_detect_time<T>(mut self, v: T) -> Self
37272    where
37273        T: std::convert::Into<wkt::Timestamp>,
37274    {
37275        self.detect_time = std::option::Option::Some(v.into());
37276        self
37277    }
37278
37279    /// Sets or clears the value of [detect_time][crate::model::Action::detect_time].
37280    ///
37281    /// # Example
37282    /// ```ignore,no_run
37283    /// # use google_cloud_dataplex_v1::model::Action;
37284    /// use wkt::Timestamp;
37285    /// let x = Action::new().set_or_clear_detect_time(Some(Timestamp::default()/* use setters */));
37286    /// let x = Action::new().set_or_clear_detect_time(None::<Timestamp>);
37287    /// ```
37288    pub fn set_or_clear_detect_time<T>(mut self, v: std::option::Option<T>) -> Self
37289    where
37290        T: std::convert::Into<wkt::Timestamp>,
37291    {
37292        self.detect_time = v.map(|x| x.into());
37293        self
37294    }
37295
37296    /// Sets the value of [name][crate::model::Action::name].
37297    ///
37298    /// # Example
37299    /// ```ignore,no_run
37300    /// # use google_cloud_dataplex_v1::model::Action;
37301    /// let x = Action::new().set_name("example");
37302    /// ```
37303    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37304        self.name = v.into();
37305        self
37306    }
37307
37308    /// Sets the value of [lake][crate::model::Action::lake].
37309    ///
37310    /// # Example
37311    /// ```ignore,no_run
37312    /// # use google_cloud_dataplex_v1::model::Action;
37313    /// let x = Action::new().set_lake("example");
37314    /// ```
37315    pub fn set_lake<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37316        self.lake = v.into();
37317        self
37318    }
37319
37320    /// Sets the value of [zone][crate::model::Action::zone].
37321    ///
37322    /// # Example
37323    /// ```ignore,no_run
37324    /// # use google_cloud_dataplex_v1::model::Action;
37325    /// let x = Action::new().set_zone("example");
37326    /// ```
37327    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37328        self.zone = v.into();
37329        self
37330    }
37331
37332    /// Sets the value of [asset][crate::model::Action::asset].
37333    ///
37334    /// # Example
37335    /// ```ignore,no_run
37336    /// # use google_cloud_dataplex_v1::model::Action;
37337    /// let x = Action::new().set_asset("example");
37338    /// ```
37339    pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37340        self.asset = v.into();
37341        self
37342    }
37343
37344    /// Sets the value of [data_locations][crate::model::Action::data_locations].
37345    ///
37346    /// # Example
37347    /// ```ignore,no_run
37348    /// # use google_cloud_dataplex_v1::model::Action;
37349    /// let x = Action::new().set_data_locations(["a", "b", "c"]);
37350    /// ```
37351    pub fn set_data_locations<T, V>(mut self, v: T) -> Self
37352    where
37353        T: std::iter::IntoIterator<Item = V>,
37354        V: std::convert::Into<std::string::String>,
37355    {
37356        use std::iter::Iterator;
37357        self.data_locations = v.into_iter().map(|i| i.into()).collect();
37358        self
37359    }
37360
37361    /// Sets the value of [details][crate::model::Action::details].
37362    ///
37363    /// Note that all the setters affecting `details` are mutually
37364    /// exclusive.
37365    ///
37366    /// # Example
37367    /// ```ignore,no_run
37368    /// # use google_cloud_dataplex_v1::model::Action;
37369    /// use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37370    /// let x = Action::new().set_details(Some(
37371    ///     google_cloud_dataplex_v1::model::action::Details::InvalidDataFormat(InvalidDataFormat::default().into())));
37372    /// ```
37373    pub fn set_details<
37374        T: std::convert::Into<std::option::Option<crate::model::action::Details>>,
37375    >(
37376        mut self,
37377        v: T,
37378    ) -> Self {
37379        self.details = v.into();
37380        self
37381    }
37382
37383    /// The value of [details][crate::model::Action::details]
37384    /// if it holds a `InvalidDataFormat`, `None` if the field is not set or
37385    /// holds a different branch.
37386    pub fn invalid_data_format(
37387        &self,
37388    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataFormat>> {
37389        #[allow(unreachable_patterns)]
37390        self.details.as_ref().and_then(|v| match v {
37391            crate::model::action::Details::InvalidDataFormat(v) => std::option::Option::Some(v),
37392            _ => std::option::Option::None,
37393        })
37394    }
37395
37396    /// Sets the value of [details][crate::model::Action::details]
37397    /// to hold a `InvalidDataFormat`.
37398    ///
37399    /// Note that all the setters affecting `details` are
37400    /// mutually exclusive.
37401    ///
37402    /// # Example
37403    /// ```ignore,no_run
37404    /// # use google_cloud_dataplex_v1::model::Action;
37405    /// use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37406    /// let x = Action::new().set_invalid_data_format(InvalidDataFormat::default()/* use setters */);
37407    /// assert!(x.invalid_data_format().is_some());
37408    /// assert!(x.incompatible_data_schema().is_none());
37409    /// assert!(x.invalid_data_partition().is_none());
37410    /// assert!(x.missing_data().is_none());
37411    /// assert!(x.missing_resource().is_none());
37412    /// assert!(x.unauthorized_resource().is_none());
37413    /// assert!(x.failed_security_policy_apply().is_none());
37414    /// assert!(x.invalid_data_organization().is_none());
37415    /// ```
37416    pub fn set_invalid_data_format<
37417        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataFormat>>,
37418    >(
37419        mut self,
37420        v: T,
37421    ) -> Self {
37422        self.details =
37423            std::option::Option::Some(crate::model::action::Details::InvalidDataFormat(v.into()));
37424        self
37425    }
37426
37427    /// The value of [details][crate::model::Action::details]
37428    /// if it holds a `IncompatibleDataSchema`, `None` if the field is not set or
37429    /// holds a different branch.
37430    pub fn incompatible_data_schema(
37431        &self,
37432    ) -> std::option::Option<&std::boxed::Box<crate::model::action::IncompatibleDataSchema>> {
37433        #[allow(unreachable_patterns)]
37434        self.details.as_ref().and_then(|v| match v {
37435            crate::model::action::Details::IncompatibleDataSchema(v) => {
37436                std::option::Option::Some(v)
37437            }
37438            _ => std::option::Option::None,
37439        })
37440    }
37441
37442    /// Sets the value of [details][crate::model::Action::details]
37443    /// to hold a `IncompatibleDataSchema`.
37444    ///
37445    /// Note that all the setters affecting `details` are
37446    /// mutually exclusive.
37447    ///
37448    /// # Example
37449    /// ```ignore,no_run
37450    /// # use google_cloud_dataplex_v1::model::Action;
37451    /// use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37452    /// let x = Action::new().set_incompatible_data_schema(IncompatibleDataSchema::default()/* use setters */);
37453    /// assert!(x.incompatible_data_schema().is_some());
37454    /// assert!(x.invalid_data_format().is_none());
37455    /// assert!(x.invalid_data_partition().is_none());
37456    /// assert!(x.missing_data().is_none());
37457    /// assert!(x.missing_resource().is_none());
37458    /// assert!(x.unauthorized_resource().is_none());
37459    /// assert!(x.failed_security_policy_apply().is_none());
37460    /// assert!(x.invalid_data_organization().is_none());
37461    /// ```
37462    pub fn set_incompatible_data_schema<
37463        T: std::convert::Into<std::boxed::Box<crate::model::action::IncompatibleDataSchema>>,
37464    >(
37465        mut self,
37466        v: T,
37467    ) -> Self {
37468        self.details = std::option::Option::Some(
37469            crate::model::action::Details::IncompatibleDataSchema(v.into()),
37470        );
37471        self
37472    }
37473
37474    /// The value of [details][crate::model::Action::details]
37475    /// if it holds a `InvalidDataPartition`, `None` if the field is not set or
37476    /// holds a different branch.
37477    pub fn invalid_data_partition(
37478        &self,
37479    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataPartition>> {
37480        #[allow(unreachable_patterns)]
37481        self.details.as_ref().and_then(|v| match v {
37482            crate::model::action::Details::InvalidDataPartition(v) => std::option::Option::Some(v),
37483            _ => std::option::Option::None,
37484        })
37485    }
37486
37487    /// Sets the value of [details][crate::model::Action::details]
37488    /// to hold a `InvalidDataPartition`.
37489    ///
37490    /// Note that all the setters affecting `details` are
37491    /// mutually exclusive.
37492    ///
37493    /// # Example
37494    /// ```ignore,no_run
37495    /// # use google_cloud_dataplex_v1::model::Action;
37496    /// use google_cloud_dataplex_v1::model::action::InvalidDataPartition;
37497    /// let x = Action::new().set_invalid_data_partition(InvalidDataPartition::default()/* use setters */);
37498    /// assert!(x.invalid_data_partition().is_some());
37499    /// assert!(x.invalid_data_format().is_none());
37500    /// assert!(x.incompatible_data_schema().is_none());
37501    /// assert!(x.missing_data().is_none());
37502    /// assert!(x.missing_resource().is_none());
37503    /// assert!(x.unauthorized_resource().is_none());
37504    /// assert!(x.failed_security_policy_apply().is_none());
37505    /// assert!(x.invalid_data_organization().is_none());
37506    /// ```
37507    pub fn set_invalid_data_partition<
37508        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataPartition>>,
37509    >(
37510        mut self,
37511        v: T,
37512    ) -> Self {
37513        self.details = std::option::Option::Some(
37514            crate::model::action::Details::InvalidDataPartition(v.into()),
37515        );
37516        self
37517    }
37518
37519    /// The value of [details][crate::model::Action::details]
37520    /// if it holds a `MissingData`, `None` if the field is not set or
37521    /// holds a different branch.
37522    pub fn missing_data(
37523        &self,
37524    ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingData>> {
37525        #[allow(unreachable_patterns)]
37526        self.details.as_ref().and_then(|v| match v {
37527            crate::model::action::Details::MissingData(v) => std::option::Option::Some(v),
37528            _ => std::option::Option::None,
37529        })
37530    }
37531
37532    /// Sets the value of [details][crate::model::Action::details]
37533    /// to hold a `MissingData`.
37534    ///
37535    /// Note that all the setters affecting `details` are
37536    /// mutually exclusive.
37537    ///
37538    /// # Example
37539    /// ```ignore,no_run
37540    /// # use google_cloud_dataplex_v1::model::Action;
37541    /// use google_cloud_dataplex_v1::model::action::MissingData;
37542    /// let x = Action::new().set_missing_data(MissingData::default()/* use setters */);
37543    /// assert!(x.missing_data().is_some());
37544    /// assert!(x.invalid_data_format().is_none());
37545    /// assert!(x.incompatible_data_schema().is_none());
37546    /// assert!(x.invalid_data_partition().is_none());
37547    /// assert!(x.missing_resource().is_none());
37548    /// assert!(x.unauthorized_resource().is_none());
37549    /// assert!(x.failed_security_policy_apply().is_none());
37550    /// assert!(x.invalid_data_organization().is_none());
37551    /// ```
37552    pub fn set_missing_data<
37553        T: std::convert::Into<std::boxed::Box<crate::model::action::MissingData>>,
37554    >(
37555        mut self,
37556        v: T,
37557    ) -> Self {
37558        self.details =
37559            std::option::Option::Some(crate::model::action::Details::MissingData(v.into()));
37560        self
37561    }
37562
37563    /// The value of [details][crate::model::Action::details]
37564    /// if it holds a `MissingResource`, `None` if the field is not set or
37565    /// holds a different branch.
37566    pub fn missing_resource(
37567        &self,
37568    ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingResource>> {
37569        #[allow(unreachable_patterns)]
37570        self.details.as_ref().and_then(|v| match v {
37571            crate::model::action::Details::MissingResource(v) => std::option::Option::Some(v),
37572            _ => std::option::Option::None,
37573        })
37574    }
37575
37576    /// Sets the value of [details][crate::model::Action::details]
37577    /// to hold a `MissingResource`.
37578    ///
37579    /// Note that all the setters affecting `details` are
37580    /// mutually exclusive.
37581    ///
37582    /// # Example
37583    /// ```ignore,no_run
37584    /// # use google_cloud_dataplex_v1::model::Action;
37585    /// use google_cloud_dataplex_v1::model::action::MissingResource;
37586    /// let x = Action::new().set_missing_resource(MissingResource::default()/* use setters */);
37587    /// assert!(x.missing_resource().is_some());
37588    /// assert!(x.invalid_data_format().is_none());
37589    /// assert!(x.incompatible_data_schema().is_none());
37590    /// assert!(x.invalid_data_partition().is_none());
37591    /// assert!(x.missing_data().is_none());
37592    /// assert!(x.unauthorized_resource().is_none());
37593    /// assert!(x.failed_security_policy_apply().is_none());
37594    /// assert!(x.invalid_data_organization().is_none());
37595    /// ```
37596    pub fn set_missing_resource<
37597        T: std::convert::Into<std::boxed::Box<crate::model::action::MissingResource>>,
37598    >(
37599        mut self,
37600        v: T,
37601    ) -> Self {
37602        self.details =
37603            std::option::Option::Some(crate::model::action::Details::MissingResource(v.into()));
37604        self
37605    }
37606
37607    /// The value of [details][crate::model::Action::details]
37608    /// if it holds a `UnauthorizedResource`, `None` if the field is not set or
37609    /// holds a different branch.
37610    pub fn unauthorized_resource(
37611        &self,
37612    ) -> std::option::Option<&std::boxed::Box<crate::model::action::UnauthorizedResource>> {
37613        #[allow(unreachable_patterns)]
37614        self.details.as_ref().and_then(|v| match v {
37615            crate::model::action::Details::UnauthorizedResource(v) => std::option::Option::Some(v),
37616            _ => std::option::Option::None,
37617        })
37618    }
37619
37620    /// Sets the value of [details][crate::model::Action::details]
37621    /// to hold a `UnauthorizedResource`.
37622    ///
37623    /// Note that all the setters affecting `details` are
37624    /// mutually exclusive.
37625    ///
37626    /// # Example
37627    /// ```ignore,no_run
37628    /// # use google_cloud_dataplex_v1::model::Action;
37629    /// use google_cloud_dataplex_v1::model::action::UnauthorizedResource;
37630    /// let x = Action::new().set_unauthorized_resource(UnauthorizedResource::default()/* use setters */);
37631    /// assert!(x.unauthorized_resource().is_some());
37632    /// assert!(x.invalid_data_format().is_none());
37633    /// assert!(x.incompatible_data_schema().is_none());
37634    /// assert!(x.invalid_data_partition().is_none());
37635    /// assert!(x.missing_data().is_none());
37636    /// assert!(x.missing_resource().is_none());
37637    /// assert!(x.failed_security_policy_apply().is_none());
37638    /// assert!(x.invalid_data_organization().is_none());
37639    /// ```
37640    pub fn set_unauthorized_resource<
37641        T: std::convert::Into<std::boxed::Box<crate::model::action::UnauthorizedResource>>,
37642    >(
37643        mut self,
37644        v: T,
37645    ) -> Self {
37646        self.details = std::option::Option::Some(
37647            crate::model::action::Details::UnauthorizedResource(v.into()),
37648        );
37649        self
37650    }
37651
37652    /// The value of [details][crate::model::Action::details]
37653    /// if it holds a `FailedSecurityPolicyApply`, `None` if the field is not set or
37654    /// holds a different branch.
37655    pub fn failed_security_policy_apply(
37656        &self,
37657    ) -> std::option::Option<&std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>
37658    {
37659        #[allow(unreachable_patterns)]
37660        self.details.as_ref().and_then(|v| match v {
37661            crate::model::action::Details::FailedSecurityPolicyApply(v) => {
37662                std::option::Option::Some(v)
37663            }
37664            _ => std::option::Option::None,
37665        })
37666    }
37667
37668    /// Sets the value of [details][crate::model::Action::details]
37669    /// to hold a `FailedSecurityPolicyApply`.
37670    ///
37671    /// Note that all the setters affecting `details` are
37672    /// mutually exclusive.
37673    ///
37674    /// # Example
37675    /// ```ignore,no_run
37676    /// # use google_cloud_dataplex_v1::model::Action;
37677    /// use google_cloud_dataplex_v1::model::action::FailedSecurityPolicyApply;
37678    /// let x = Action::new().set_failed_security_policy_apply(FailedSecurityPolicyApply::default()/* use setters */);
37679    /// assert!(x.failed_security_policy_apply().is_some());
37680    /// assert!(x.invalid_data_format().is_none());
37681    /// assert!(x.incompatible_data_schema().is_none());
37682    /// assert!(x.invalid_data_partition().is_none());
37683    /// assert!(x.missing_data().is_none());
37684    /// assert!(x.missing_resource().is_none());
37685    /// assert!(x.unauthorized_resource().is_none());
37686    /// assert!(x.invalid_data_organization().is_none());
37687    /// ```
37688    pub fn set_failed_security_policy_apply<
37689        T: std::convert::Into<std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>,
37690    >(
37691        mut self,
37692        v: T,
37693    ) -> Self {
37694        self.details = std::option::Option::Some(
37695            crate::model::action::Details::FailedSecurityPolicyApply(v.into()),
37696        );
37697        self
37698    }
37699
37700    /// The value of [details][crate::model::Action::details]
37701    /// if it holds a `InvalidDataOrganization`, `None` if the field is not set or
37702    /// holds a different branch.
37703    pub fn invalid_data_organization(
37704        &self,
37705    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataOrganization>> {
37706        #[allow(unreachable_patterns)]
37707        self.details.as_ref().and_then(|v| match v {
37708            crate::model::action::Details::InvalidDataOrganization(v) => {
37709                std::option::Option::Some(v)
37710            }
37711            _ => std::option::Option::None,
37712        })
37713    }
37714
37715    /// Sets the value of [details][crate::model::Action::details]
37716    /// to hold a `InvalidDataOrganization`.
37717    ///
37718    /// Note that all the setters affecting `details` are
37719    /// mutually exclusive.
37720    ///
37721    /// # Example
37722    /// ```ignore,no_run
37723    /// # use google_cloud_dataplex_v1::model::Action;
37724    /// use google_cloud_dataplex_v1::model::action::InvalidDataOrganization;
37725    /// let x = Action::new().set_invalid_data_organization(InvalidDataOrganization::default()/* use setters */);
37726    /// assert!(x.invalid_data_organization().is_some());
37727    /// assert!(x.invalid_data_format().is_none());
37728    /// assert!(x.incompatible_data_schema().is_none());
37729    /// assert!(x.invalid_data_partition().is_none());
37730    /// assert!(x.missing_data().is_none());
37731    /// assert!(x.missing_resource().is_none());
37732    /// assert!(x.unauthorized_resource().is_none());
37733    /// assert!(x.failed_security_policy_apply().is_none());
37734    /// ```
37735    pub fn set_invalid_data_organization<
37736        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataOrganization>>,
37737    >(
37738        mut self,
37739        v: T,
37740    ) -> Self {
37741        self.details = std::option::Option::Some(
37742            crate::model::action::Details::InvalidDataOrganization(v.into()),
37743        );
37744        self
37745    }
37746}
37747
37748impl wkt::message::Message for Action {
37749    fn typename() -> &'static str {
37750        "type.googleapis.com/google.cloud.dataplex.v1.Action"
37751    }
37752}
37753
37754/// Defines additional types related to [Action].
37755pub mod action {
37756    #[allow(unused_imports)]
37757    use super::*;
37758
37759    /// Action details for resource references in assets that cannot be located.
37760    #[derive(Clone, Default, PartialEq)]
37761    #[non_exhaustive]
37762    pub struct MissingResource {
37763        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37764    }
37765
37766    impl MissingResource {
37767        pub fn new() -> Self {
37768            std::default::Default::default()
37769        }
37770    }
37771
37772    impl wkt::message::Message for MissingResource {
37773        fn typename() -> &'static str {
37774            "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingResource"
37775        }
37776    }
37777
37778    /// Action details for unauthorized resource issues raised to indicate that the
37779    /// service account associated with the lake instance is not authorized to
37780    /// access or manage the resource associated with an asset.
37781    #[derive(Clone, Default, PartialEq)]
37782    #[non_exhaustive]
37783    pub struct UnauthorizedResource {
37784        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37785    }
37786
37787    impl UnauthorizedResource {
37788        pub fn new() -> Self {
37789            std::default::Default::default()
37790        }
37791    }
37792
37793    impl wkt::message::Message for UnauthorizedResource {
37794        fn typename() -> &'static str {
37795            "type.googleapis.com/google.cloud.dataplex.v1.Action.UnauthorizedResource"
37796        }
37797    }
37798
37799    /// Failed to apply security policy to the managed resource(s) under a
37800    /// lake, zone or an asset. For a lake or zone resource, one or more underlying
37801    /// assets has a failure applying security policy to the associated managed
37802    /// resource.
37803    #[derive(Clone, Default, PartialEq)]
37804    #[non_exhaustive]
37805    pub struct FailedSecurityPolicyApply {
37806        /// Resource name of one of the assets with failing security policy
37807        /// application. Populated for a lake or zone resource only.
37808        pub asset: std::string::String,
37809
37810        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37811    }
37812
37813    impl FailedSecurityPolicyApply {
37814        pub fn new() -> Self {
37815            std::default::Default::default()
37816        }
37817
37818        /// Sets the value of [asset][crate::model::action::FailedSecurityPolicyApply::asset].
37819        ///
37820        /// # Example
37821        /// ```ignore,no_run
37822        /// # use google_cloud_dataplex_v1::model::action::FailedSecurityPolicyApply;
37823        /// let x = FailedSecurityPolicyApply::new().set_asset("example");
37824        /// ```
37825        pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37826            self.asset = v.into();
37827            self
37828        }
37829    }
37830
37831    impl wkt::message::Message for FailedSecurityPolicyApply {
37832        fn typename() -> &'static str {
37833            "type.googleapis.com/google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply"
37834        }
37835    }
37836
37837    /// Action details for invalid or unsupported data files detected by discovery.
37838    #[derive(Clone, Default, PartialEq)]
37839    #[non_exhaustive]
37840    pub struct InvalidDataFormat {
37841        /// The list of data locations sampled and used for format/schema
37842        /// inference.
37843        pub sampled_data_locations: std::vec::Vec<std::string::String>,
37844
37845        /// The expected data format of the entity.
37846        pub expected_format: std::string::String,
37847
37848        /// The new unexpected data format within the entity.
37849        pub new_format: std::string::String,
37850
37851        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37852    }
37853
37854    impl InvalidDataFormat {
37855        pub fn new() -> Self {
37856            std::default::Default::default()
37857        }
37858
37859        /// Sets the value of [sampled_data_locations][crate::model::action::InvalidDataFormat::sampled_data_locations].
37860        ///
37861        /// # Example
37862        /// ```ignore,no_run
37863        /// # use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37864        /// let x = InvalidDataFormat::new().set_sampled_data_locations(["a", "b", "c"]);
37865        /// ```
37866        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
37867        where
37868            T: std::iter::IntoIterator<Item = V>,
37869            V: std::convert::Into<std::string::String>,
37870        {
37871            use std::iter::Iterator;
37872            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
37873            self
37874        }
37875
37876        /// Sets the value of [expected_format][crate::model::action::InvalidDataFormat::expected_format].
37877        ///
37878        /// # Example
37879        /// ```ignore,no_run
37880        /// # use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37881        /// let x = InvalidDataFormat::new().set_expected_format("example");
37882        /// ```
37883        pub fn set_expected_format<T: std::convert::Into<std::string::String>>(
37884            mut self,
37885            v: T,
37886        ) -> Self {
37887            self.expected_format = v.into();
37888            self
37889        }
37890
37891        /// Sets the value of [new_format][crate::model::action::InvalidDataFormat::new_format].
37892        ///
37893        /// # Example
37894        /// ```ignore,no_run
37895        /// # use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37896        /// let x = InvalidDataFormat::new().set_new_format("example");
37897        /// ```
37898        pub fn set_new_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37899            self.new_format = v.into();
37900            self
37901        }
37902    }
37903
37904    impl wkt::message::Message for InvalidDataFormat {
37905        fn typename() -> &'static str {
37906            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataFormat"
37907        }
37908    }
37909
37910    /// Action details for incompatible schemas detected by discovery.
37911    #[derive(Clone, Default, PartialEq)]
37912    #[non_exhaustive]
37913    pub struct IncompatibleDataSchema {
37914        /// The name of the table containing invalid data.
37915        pub table: std::string::String,
37916
37917        /// The existing and expected schema of the table. The schema is provided as
37918        /// a JSON formatted structure listing columns and data types.
37919        pub existing_schema: std::string::String,
37920
37921        /// The new and incompatible schema within the table. The schema is provided
37922        /// as a JSON formatted structured listing columns and data types.
37923        pub new_schema: std::string::String,
37924
37925        /// The list of data locations sampled and used for format/schema
37926        /// inference.
37927        pub sampled_data_locations: std::vec::Vec<std::string::String>,
37928
37929        /// Whether the action relates to a schema that is incompatible or modified.
37930        pub schema_change: crate::model::action::incompatible_data_schema::SchemaChange,
37931
37932        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37933    }
37934
37935    impl IncompatibleDataSchema {
37936        pub fn new() -> Self {
37937            std::default::Default::default()
37938        }
37939
37940        /// Sets the value of [table][crate::model::action::IncompatibleDataSchema::table].
37941        ///
37942        /// # Example
37943        /// ```ignore,no_run
37944        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37945        /// let x = IncompatibleDataSchema::new().set_table("example");
37946        /// ```
37947        pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37948            self.table = v.into();
37949            self
37950        }
37951
37952        /// Sets the value of [existing_schema][crate::model::action::IncompatibleDataSchema::existing_schema].
37953        ///
37954        /// # Example
37955        /// ```ignore,no_run
37956        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37957        /// let x = IncompatibleDataSchema::new().set_existing_schema("example");
37958        /// ```
37959        pub fn set_existing_schema<T: std::convert::Into<std::string::String>>(
37960            mut self,
37961            v: T,
37962        ) -> Self {
37963            self.existing_schema = v.into();
37964            self
37965        }
37966
37967        /// Sets the value of [new_schema][crate::model::action::IncompatibleDataSchema::new_schema].
37968        ///
37969        /// # Example
37970        /// ```ignore,no_run
37971        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37972        /// let x = IncompatibleDataSchema::new().set_new_schema("example");
37973        /// ```
37974        pub fn set_new_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37975            self.new_schema = v.into();
37976            self
37977        }
37978
37979        /// Sets the value of [sampled_data_locations][crate::model::action::IncompatibleDataSchema::sampled_data_locations].
37980        ///
37981        /// # Example
37982        /// ```ignore,no_run
37983        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37984        /// let x = IncompatibleDataSchema::new().set_sampled_data_locations(["a", "b", "c"]);
37985        /// ```
37986        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
37987        where
37988            T: std::iter::IntoIterator<Item = V>,
37989            V: std::convert::Into<std::string::String>,
37990        {
37991            use std::iter::Iterator;
37992            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
37993            self
37994        }
37995
37996        /// Sets the value of [schema_change][crate::model::action::IncompatibleDataSchema::schema_change].
37997        ///
37998        /// # Example
37999        /// ```ignore,no_run
38000        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
38001        /// use google_cloud_dataplex_v1::model::action::incompatible_data_schema::SchemaChange;
38002        /// let x0 = IncompatibleDataSchema::new().set_schema_change(SchemaChange::Incompatible);
38003        /// let x1 = IncompatibleDataSchema::new().set_schema_change(SchemaChange::Modified);
38004        /// ```
38005        pub fn set_schema_change<
38006            T: std::convert::Into<crate::model::action::incompatible_data_schema::SchemaChange>,
38007        >(
38008            mut self,
38009            v: T,
38010        ) -> Self {
38011            self.schema_change = v.into();
38012            self
38013        }
38014    }
38015
38016    impl wkt::message::Message for IncompatibleDataSchema {
38017        fn typename() -> &'static str {
38018            "type.googleapis.com/google.cloud.dataplex.v1.Action.IncompatibleDataSchema"
38019        }
38020    }
38021
38022    /// Defines additional types related to [IncompatibleDataSchema].
38023    pub mod incompatible_data_schema {
38024        #[allow(unused_imports)]
38025        use super::*;
38026
38027        /// Whether the action relates to a schema that is incompatible or modified.
38028        ///
38029        /// # Working with unknown values
38030        ///
38031        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38032        /// additional enum variants at any time. Adding new variants is not considered
38033        /// a breaking change. Applications should write their code in anticipation of:
38034        ///
38035        /// - New values appearing in future releases of the client library, **and**
38036        /// - New values received dynamically, without application changes.
38037        ///
38038        /// Please consult the [Working with enums] section in the user guide for some
38039        /// guidelines.
38040        ///
38041        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38042        #[derive(Clone, Debug, PartialEq)]
38043        #[non_exhaustive]
38044        pub enum SchemaChange {
38045            /// Schema change unspecified.
38046            Unspecified,
38047            /// Newly discovered schema is incompatible with existing schema.
38048            Incompatible,
38049            /// Newly discovered schema has changed from existing schema for data in a
38050            /// curated zone.
38051            Modified,
38052            /// If set, the enum was initialized with an unknown value.
38053            ///
38054            /// Applications can examine the value using [SchemaChange::value] or
38055            /// [SchemaChange::name].
38056            UnknownValue(schema_change::UnknownValue),
38057        }
38058
38059        #[doc(hidden)]
38060        pub mod schema_change {
38061            #[allow(unused_imports)]
38062            use super::*;
38063            #[derive(Clone, Debug, PartialEq)]
38064            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38065        }
38066
38067        impl SchemaChange {
38068            /// Gets the enum value.
38069            ///
38070            /// Returns `None` if the enum contains an unknown value deserialized from
38071            /// the string representation of enums.
38072            pub fn value(&self) -> std::option::Option<i32> {
38073                match self {
38074                    Self::Unspecified => std::option::Option::Some(0),
38075                    Self::Incompatible => std::option::Option::Some(1),
38076                    Self::Modified => std::option::Option::Some(2),
38077                    Self::UnknownValue(u) => u.0.value(),
38078                }
38079            }
38080
38081            /// Gets the enum value as a string.
38082            ///
38083            /// Returns `None` if the enum contains an unknown value deserialized from
38084            /// the integer representation of enums.
38085            pub fn name(&self) -> std::option::Option<&str> {
38086                match self {
38087                    Self::Unspecified => std::option::Option::Some("SCHEMA_CHANGE_UNSPECIFIED"),
38088                    Self::Incompatible => std::option::Option::Some("INCOMPATIBLE"),
38089                    Self::Modified => std::option::Option::Some("MODIFIED"),
38090                    Self::UnknownValue(u) => u.0.name(),
38091                }
38092            }
38093        }
38094
38095        impl std::default::Default for SchemaChange {
38096            fn default() -> Self {
38097                use std::convert::From;
38098                Self::from(0)
38099            }
38100        }
38101
38102        impl std::fmt::Display for SchemaChange {
38103            fn fmt(
38104                &self,
38105                f: &mut std::fmt::Formatter<'_>,
38106            ) -> std::result::Result<(), std::fmt::Error> {
38107                wkt::internal::display_enum(f, self.name(), self.value())
38108            }
38109        }
38110
38111        impl std::convert::From<i32> for SchemaChange {
38112            fn from(value: i32) -> Self {
38113                match value {
38114                    0 => Self::Unspecified,
38115                    1 => Self::Incompatible,
38116                    2 => Self::Modified,
38117                    _ => Self::UnknownValue(schema_change::UnknownValue(
38118                        wkt::internal::UnknownEnumValue::Integer(value),
38119                    )),
38120                }
38121            }
38122        }
38123
38124        impl std::convert::From<&str> for SchemaChange {
38125            fn from(value: &str) -> Self {
38126                use std::string::ToString;
38127                match value {
38128                    "SCHEMA_CHANGE_UNSPECIFIED" => Self::Unspecified,
38129                    "INCOMPATIBLE" => Self::Incompatible,
38130                    "MODIFIED" => Self::Modified,
38131                    _ => Self::UnknownValue(schema_change::UnknownValue(
38132                        wkt::internal::UnknownEnumValue::String(value.to_string()),
38133                    )),
38134                }
38135            }
38136        }
38137
38138        impl serde::ser::Serialize for SchemaChange {
38139            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38140            where
38141                S: serde::Serializer,
38142            {
38143                match self {
38144                    Self::Unspecified => serializer.serialize_i32(0),
38145                    Self::Incompatible => serializer.serialize_i32(1),
38146                    Self::Modified => serializer.serialize_i32(2),
38147                    Self::UnknownValue(u) => u.0.serialize(serializer),
38148                }
38149            }
38150        }
38151
38152        impl<'de> serde::de::Deserialize<'de> for SchemaChange {
38153            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38154            where
38155                D: serde::Deserializer<'de>,
38156            {
38157                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SchemaChange>::new(
38158                    ".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange",
38159                ))
38160            }
38161        }
38162    }
38163
38164    /// Action details for invalid or unsupported partitions detected by discovery.
38165    #[derive(Clone, Default, PartialEq)]
38166    #[non_exhaustive]
38167    pub struct InvalidDataPartition {
38168        /// The issue type of InvalidDataPartition.
38169        pub expected_structure: crate::model::action::invalid_data_partition::PartitionStructure,
38170
38171        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38172    }
38173
38174    impl InvalidDataPartition {
38175        pub fn new() -> Self {
38176            std::default::Default::default()
38177        }
38178
38179        /// Sets the value of [expected_structure][crate::model::action::InvalidDataPartition::expected_structure].
38180        ///
38181        /// # Example
38182        /// ```ignore,no_run
38183        /// # use google_cloud_dataplex_v1::model::action::InvalidDataPartition;
38184        /// use google_cloud_dataplex_v1::model::action::invalid_data_partition::PartitionStructure;
38185        /// let x0 = InvalidDataPartition::new().set_expected_structure(PartitionStructure::ConsistentKeys);
38186        /// let x1 = InvalidDataPartition::new().set_expected_structure(PartitionStructure::HiveStyleKeys);
38187        /// ```
38188        pub fn set_expected_structure<
38189            T: std::convert::Into<crate::model::action::invalid_data_partition::PartitionStructure>,
38190        >(
38191            mut self,
38192            v: T,
38193        ) -> Self {
38194            self.expected_structure = v.into();
38195            self
38196        }
38197    }
38198
38199    impl wkt::message::Message for InvalidDataPartition {
38200        fn typename() -> &'static str {
38201            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataPartition"
38202        }
38203    }
38204
38205    /// Defines additional types related to [InvalidDataPartition].
38206    pub mod invalid_data_partition {
38207        #[allow(unused_imports)]
38208        use super::*;
38209
38210        /// The expected partition structure.
38211        ///
38212        /// # Working with unknown values
38213        ///
38214        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38215        /// additional enum variants at any time. Adding new variants is not considered
38216        /// a breaking change. Applications should write their code in anticipation of:
38217        ///
38218        /// - New values appearing in future releases of the client library, **and**
38219        /// - New values received dynamically, without application changes.
38220        ///
38221        /// Please consult the [Working with enums] section in the user guide for some
38222        /// guidelines.
38223        ///
38224        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38225        #[derive(Clone, Debug, PartialEq)]
38226        #[non_exhaustive]
38227        pub enum PartitionStructure {
38228            /// PartitionStructure unspecified.
38229            Unspecified,
38230            /// Consistent hive-style partition definition (both raw and curated zone).
38231            ConsistentKeys,
38232            /// Hive style partition definition (curated zone only).
38233            HiveStyleKeys,
38234            /// If set, the enum was initialized with an unknown value.
38235            ///
38236            /// Applications can examine the value using [PartitionStructure::value] or
38237            /// [PartitionStructure::name].
38238            UnknownValue(partition_structure::UnknownValue),
38239        }
38240
38241        #[doc(hidden)]
38242        pub mod partition_structure {
38243            #[allow(unused_imports)]
38244            use super::*;
38245            #[derive(Clone, Debug, PartialEq)]
38246            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38247        }
38248
38249        impl PartitionStructure {
38250            /// Gets the enum value.
38251            ///
38252            /// Returns `None` if the enum contains an unknown value deserialized from
38253            /// the string representation of enums.
38254            pub fn value(&self) -> std::option::Option<i32> {
38255                match self {
38256                    Self::Unspecified => std::option::Option::Some(0),
38257                    Self::ConsistentKeys => std::option::Option::Some(1),
38258                    Self::HiveStyleKeys => std::option::Option::Some(2),
38259                    Self::UnknownValue(u) => u.0.value(),
38260                }
38261            }
38262
38263            /// Gets the enum value as a string.
38264            ///
38265            /// Returns `None` if the enum contains an unknown value deserialized from
38266            /// the integer representation of enums.
38267            pub fn name(&self) -> std::option::Option<&str> {
38268                match self {
38269                    Self::Unspecified => {
38270                        std::option::Option::Some("PARTITION_STRUCTURE_UNSPECIFIED")
38271                    }
38272                    Self::ConsistentKeys => std::option::Option::Some("CONSISTENT_KEYS"),
38273                    Self::HiveStyleKeys => std::option::Option::Some("HIVE_STYLE_KEYS"),
38274                    Self::UnknownValue(u) => u.0.name(),
38275                }
38276            }
38277        }
38278
38279        impl std::default::Default for PartitionStructure {
38280            fn default() -> Self {
38281                use std::convert::From;
38282                Self::from(0)
38283            }
38284        }
38285
38286        impl std::fmt::Display for PartitionStructure {
38287            fn fmt(
38288                &self,
38289                f: &mut std::fmt::Formatter<'_>,
38290            ) -> std::result::Result<(), std::fmt::Error> {
38291                wkt::internal::display_enum(f, self.name(), self.value())
38292            }
38293        }
38294
38295        impl std::convert::From<i32> for PartitionStructure {
38296            fn from(value: i32) -> Self {
38297                match value {
38298                    0 => Self::Unspecified,
38299                    1 => Self::ConsistentKeys,
38300                    2 => Self::HiveStyleKeys,
38301                    _ => Self::UnknownValue(partition_structure::UnknownValue(
38302                        wkt::internal::UnknownEnumValue::Integer(value),
38303                    )),
38304                }
38305            }
38306        }
38307
38308        impl std::convert::From<&str> for PartitionStructure {
38309            fn from(value: &str) -> Self {
38310                use std::string::ToString;
38311                match value {
38312                    "PARTITION_STRUCTURE_UNSPECIFIED" => Self::Unspecified,
38313                    "CONSISTENT_KEYS" => Self::ConsistentKeys,
38314                    "HIVE_STYLE_KEYS" => Self::HiveStyleKeys,
38315                    _ => Self::UnknownValue(partition_structure::UnknownValue(
38316                        wkt::internal::UnknownEnumValue::String(value.to_string()),
38317                    )),
38318                }
38319            }
38320        }
38321
38322        impl serde::ser::Serialize for PartitionStructure {
38323            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38324            where
38325                S: serde::Serializer,
38326            {
38327                match self {
38328                    Self::Unspecified => serializer.serialize_i32(0),
38329                    Self::ConsistentKeys => serializer.serialize_i32(1),
38330                    Self::HiveStyleKeys => serializer.serialize_i32(2),
38331                    Self::UnknownValue(u) => u.0.serialize(serializer),
38332                }
38333            }
38334        }
38335
38336        impl<'de> serde::de::Deserialize<'de> for PartitionStructure {
38337            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38338            where
38339                D: serde::Deserializer<'de>,
38340            {
38341                deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStructure>::new(
38342                    ".google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure",
38343                ))
38344            }
38345        }
38346    }
38347
38348    /// Action details for absence of data detected by discovery.
38349    #[derive(Clone, Default, PartialEq)]
38350    #[non_exhaustive]
38351    pub struct MissingData {
38352        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38353    }
38354
38355    impl MissingData {
38356        pub fn new() -> Self {
38357            std::default::Default::default()
38358        }
38359    }
38360
38361    impl wkt::message::Message for MissingData {
38362        fn typename() -> &'static str {
38363            "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingData"
38364        }
38365    }
38366
38367    /// Action details for invalid data arrangement.
38368    #[derive(Clone, Default, PartialEq)]
38369    #[non_exhaustive]
38370    pub struct InvalidDataOrganization {
38371        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38372    }
38373
38374    impl InvalidDataOrganization {
38375        pub fn new() -> Self {
38376            std::default::Default::default()
38377        }
38378    }
38379
38380    impl wkt::message::Message for InvalidDataOrganization {
38381        fn typename() -> &'static str {
38382            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataOrganization"
38383        }
38384    }
38385
38386    /// The category of issues.
38387    ///
38388    /// # Working with unknown values
38389    ///
38390    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38391    /// additional enum variants at any time. Adding new variants is not considered
38392    /// a breaking change. Applications should write their code in anticipation of:
38393    ///
38394    /// - New values appearing in future releases of the client library, **and**
38395    /// - New values received dynamically, without application changes.
38396    ///
38397    /// Please consult the [Working with enums] section in the user guide for some
38398    /// guidelines.
38399    ///
38400    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38401    #[derive(Clone, Debug, PartialEq)]
38402    #[non_exhaustive]
38403    pub enum Category {
38404        /// Unspecified category.
38405        Unspecified,
38406        /// Resource management related issues.
38407        ResourceManagement,
38408        /// Security policy related issues.
38409        SecurityPolicy,
38410        /// Data and discovery related issues.
38411        DataDiscovery,
38412        /// If set, the enum was initialized with an unknown value.
38413        ///
38414        /// Applications can examine the value using [Category::value] or
38415        /// [Category::name].
38416        UnknownValue(category::UnknownValue),
38417    }
38418
38419    #[doc(hidden)]
38420    pub mod category {
38421        #[allow(unused_imports)]
38422        use super::*;
38423        #[derive(Clone, Debug, PartialEq)]
38424        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38425    }
38426
38427    impl Category {
38428        /// Gets the enum value.
38429        ///
38430        /// Returns `None` if the enum contains an unknown value deserialized from
38431        /// the string representation of enums.
38432        pub fn value(&self) -> std::option::Option<i32> {
38433            match self {
38434                Self::Unspecified => std::option::Option::Some(0),
38435                Self::ResourceManagement => std::option::Option::Some(1),
38436                Self::SecurityPolicy => std::option::Option::Some(2),
38437                Self::DataDiscovery => std::option::Option::Some(3),
38438                Self::UnknownValue(u) => u.0.value(),
38439            }
38440        }
38441
38442        /// Gets the enum value as a string.
38443        ///
38444        /// Returns `None` if the enum contains an unknown value deserialized from
38445        /// the integer representation of enums.
38446        pub fn name(&self) -> std::option::Option<&str> {
38447            match self {
38448                Self::Unspecified => std::option::Option::Some("CATEGORY_UNSPECIFIED"),
38449                Self::ResourceManagement => std::option::Option::Some("RESOURCE_MANAGEMENT"),
38450                Self::SecurityPolicy => std::option::Option::Some("SECURITY_POLICY"),
38451                Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
38452                Self::UnknownValue(u) => u.0.name(),
38453            }
38454        }
38455    }
38456
38457    impl std::default::Default for Category {
38458        fn default() -> Self {
38459            use std::convert::From;
38460            Self::from(0)
38461        }
38462    }
38463
38464    impl std::fmt::Display for Category {
38465        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
38466            wkt::internal::display_enum(f, self.name(), self.value())
38467        }
38468    }
38469
38470    impl std::convert::From<i32> for Category {
38471        fn from(value: i32) -> Self {
38472            match value {
38473                0 => Self::Unspecified,
38474                1 => Self::ResourceManagement,
38475                2 => Self::SecurityPolicy,
38476                3 => Self::DataDiscovery,
38477                _ => Self::UnknownValue(category::UnknownValue(
38478                    wkt::internal::UnknownEnumValue::Integer(value),
38479                )),
38480            }
38481        }
38482    }
38483
38484    impl std::convert::From<&str> for Category {
38485        fn from(value: &str) -> Self {
38486            use std::string::ToString;
38487            match value {
38488                "CATEGORY_UNSPECIFIED" => Self::Unspecified,
38489                "RESOURCE_MANAGEMENT" => Self::ResourceManagement,
38490                "SECURITY_POLICY" => Self::SecurityPolicy,
38491                "DATA_DISCOVERY" => Self::DataDiscovery,
38492                _ => Self::UnknownValue(category::UnknownValue(
38493                    wkt::internal::UnknownEnumValue::String(value.to_string()),
38494                )),
38495            }
38496        }
38497    }
38498
38499    impl serde::ser::Serialize for Category {
38500        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38501        where
38502            S: serde::Serializer,
38503        {
38504            match self {
38505                Self::Unspecified => serializer.serialize_i32(0),
38506                Self::ResourceManagement => serializer.serialize_i32(1),
38507                Self::SecurityPolicy => serializer.serialize_i32(2),
38508                Self::DataDiscovery => serializer.serialize_i32(3),
38509                Self::UnknownValue(u) => u.0.serialize(serializer),
38510            }
38511        }
38512    }
38513
38514    impl<'de> serde::de::Deserialize<'de> for Category {
38515        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38516        where
38517            D: serde::Deserializer<'de>,
38518        {
38519            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Category>::new(
38520                ".google.cloud.dataplex.v1.Action.Category",
38521            ))
38522        }
38523    }
38524
38525    /// Additional details about the action based on the action category.
38526    #[derive(Clone, Debug, PartialEq)]
38527    #[non_exhaustive]
38528    pub enum Details {
38529        /// Details for issues related to invalid or unsupported data formats.
38530        InvalidDataFormat(std::boxed::Box<crate::model::action::InvalidDataFormat>),
38531        /// Details for issues related to incompatible schemas detected within data.
38532        IncompatibleDataSchema(std::boxed::Box<crate::model::action::IncompatibleDataSchema>),
38533        /// Details for issues related to invalid or unsupported data partition
38534        /// structure.
38535        InvalidDataPartition(std::boxed::Box<crate::model::action::InvalidDataPartition>),
38536        /// Details for issues related to absence of data within managed resources.
38537        MissingData(std::boxed::Box<crate::model::action::MissingData>),
38538        /// Details for issues related to absence of a managed resource.
38539        MissingResource(std::boxed::Box<crate::model::action::MissingResource>),
38540        /// Details for issues related to lack of permissions to access data
38541        /// resources.
38542        UnauthorizedResource(std::boxed::Box<crate::model::action::UnauthorizedResource>),
38543        /// Details for issues related to applying security policy.
38544        FailedSecurityPolicyApply(std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>),
38545        /// Details for issues related to invalid data arrangement.
38546        InvalidDataOrganization(std::boxed::Box<crate::model::action::InvalidDataOrganization>),
38547    }
38548}
38549
38550/// An asset represents a cloud resource that is being managed within a lake as a
38551/// member of a zone.
38552#[derive(Clone, Default, PartialEq)]
38553#[non_exhaustive]
38554pub struct Asset {
38555    /// Output only. The relative resource name of the asset, of the form:
38556    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
38557    pub name: std::string::String,
38558
38559    /// Optional. User friendly display name.
38560    pub display_name: std::string::String,
38561
38562    /// Output only. System generated globally unique ID for the asset. This ID
38563    /// will be different if the asset is deleted and re-created with the same
38564    /// name.
38565    pub uid: std::string::String,
38566
38567    /// Output only. The time when the asset was created.
38568    pub create_time: std::option::Option<wkt::Timestamp>,
38569
38570    /// Output only. The time when the asset was last updated.
38571    pub update_time: std::option::Option<wkt::Timestamp>,
38572
38573    /// Optional. User defined labels for the asset.
38574    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
38575
38576    /// Optional. Description of the asset.
38577    pub description: std::string::String,
38578
38579    /// Output only. Current state of the asset.
38580    pub state: crate::model::State,
38581
38582    /// Required. Specification of the resource that is referenced by this asset.
38583    pub resource_spec: std::option::Option<crate::model::asset::ResourceSpec>,
38584
38585    /// Output only. Status of the resource referenced by this asset.
38586    pub resource_status: std::option::Option<crate::model::asset::ResourceStatus>,
38587
38588    /// Output only. Status of the security policy applied to resource referenced
38589    /// by this asset.
38590    pub security_status: std::option::Option<crate::model::asset::SecurityStatus>,
38591
38592    /// Optional. Specification of the discovery feature applied to data referenced
38593    /// by this asset. When this spec is left unset, the asset will use the spec
38594    /// set on the parent zone.
38595    pub discovery_spec: std::option::Option<crate::model::asset::DiscoverySpec>,
38596
38597    /// Output only. Status of the discovery feature applied to data referenced by
38598    /// this asset.
38599    pub discovery_status: std::option::Option<crate::model::asset::DiscoveryStatus>,
38600
38601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38602}
38603
38604impl Asset {
38605    pub fn new() -> Self {
38606        std::default::Default::default()
38607    }
38608
38609    /// Sets the value of [name][crate::model::Asset::name].
38610    ///
38611    /// # Example
38612    /// ```ignore,no_run
38613    /// # use google_cloud_dataplex_v1::model::Asset;
38614    /// let x = Asset::new().set_name("example");
38615    /// ```
38616    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38617        self.name = v.into();
38618        self
38619    }
38620
38621    /// Sets the value of [display_name][crate::model::Asset::display_name].
38622    ///
38623    /// # Example
38624    /// ```ignore,no_run
38625    /// # use google_cloud_dataplex_v1::model::Asset;
38626    /// let x = Asset::new().set_display_name("example");
38627    /// ```
38628    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38629        self.display_name = v.into();
38630        self
38631    }
38632
38633    /// Sets the value of [uid][crate::model::Asset::uid].
38634    ///
38635    /// # Example
38636    /// ```ignore,no_run
38637    /// # use google_cloud_dataplex_v1::model::Asset;
38638    /// let x = Asset::new().set_uid("example");
38639    /// ```
38640    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38641        self.uid = v.into();
38642        self
38643    }
38644
38645    /// Sets the value of [create_time][crate::model::Asset::create_time].
38646    ///
38647    /// # Example
38648    /// ```ignore,no_run
38649    /// # use google_cloud_dataplex_v1::model::Asset;
38650    /// use wkt::Timestamp;
38651    /// let x = Asset::new().set_create_time(Timestamp::default()/* use setters */);
38652    /// ```
38653    pub fn set_create_time<T>(mut self, v: T) -> Self
38654    where
38655        T: std::convert::Into<wkt::Timestamp>,
38656    {
38657        self.create_time = std::option::Option::Some(v.into());
38658        self
38659    }
38660
38661    /// Sets or clears the value of [create_time][crate::model::Asset::create_time].
38662    ///
38663    /// # Example
38664    /// ```ignore,no_run
38665    /// # use google_cloud_dataplex_v1::model::Asset;
38666    /// use wkt::Timestamp;
38667    /// let x = Asset::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
38668    /// let x = Asset::new().set_or_clear_create_time(None::<Timestamp>);
38669    /// ```
38670    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
38671    where
38672        T: std::convert::Into<wkt::Timestamp>,
38673    {
38674        self.create_time = v.map(|x| x.into());
38675        self
38676    }
38677
38678    /// Sets the value of [update_time][crate::model::Asset::update_time].
38679    ///
38680    /// # Example
38681    /// ```ignore,no_run
38682    /// # use google_cloud_dataplex_v1::model::Asset;
38683    /// use wkt::Timestamp;
38684    /// let x = Asset::new().set_update_time(Timestamp::default()/* use setters */);
38685    /// ```
38686    pub fn set_update_time<T>(mut self, v: T) -> Self
38687    where
38688        T: std::convert::Into<wkt::Timestamp>,
38689    {
38690        self.update_time = std::option::Option::Some(v.into());
38691        self
38692    }
38693
38694    /// Sets or clears the value of [update_time][crate::model::Asset::update_time].
38695    ///
38696    /// # Example
38697    /// ```ignore,no_run
38698    /// # use google_cloud_dataplex_v1::model::Asset;
38699    /// use wkt::Timestamp;
38700    /// let x = Asset::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
38701    /// let x = Asset::new().set_or_clear_update_time(None::<Timestamp>);
38702    /// ```
38703    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
38704    where
38705        T: std::convert::Into<wkt::Timestamp>,
38706    {
38707        self.update_time = v.map(|x| x.into());
38708        self
38709    }
38710
38711    /// Sets the value of [labels][crate::model::Asset::labels].
38712    ///
38713    /// # Example
38714    /// ```ignore,no_run
38715    /// # use google_cloud_dataplex_v1::model::Asset;
38716    /// let x = Asset::new().set_labels([
38717    ///     ("key0", "abc"),
38718    ///     ("key1", "xyz"),
38719    /// ]);
38720    /// ```
38721    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
38722    where
38723        T: std::iter::IntoIterator<Item = (K, V)>,
38724        K: std::convert::Into<std::string::String>,
38725        V: std::convert::Into<std::string::String>,
38726    {
38727        use std::iter::Iterator;
38728        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
38729        self
38730    }
38731
38732    /// Sets the value of [description][crate::model::Asset::description].
38733    ///
38734    /// # Example
38735    /// ```ignore,no_run
38736    /// # use google_cloud_dataplex_v1::model::Asset;
38737    /// let x = Asset::new().set_description("example");
38738    /// ```
38739    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38740        self.description = v.into();
38741        self
38742    }
38743
38744    /// Sets the value of [state][crate::model::Asset::state].
38745    ///
38746    /// # Example
38747    /// ```ignore,no_run
38748    /// # use google_cloud_dataplex_v1::model::Asset;
38749    /// use google_cloud_dataplex_v1::model::State;
38750    /// let x0 = Asset::new().set_state(State::Active);
38751    /// let x1 = Asset::new().set_state(State::Creating);
38752    /// let x2 = Asset::new().set_state(State::Deleting);
38753    /// ```
38754    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
38755        self.state = v.into();
38756        self
38757    }
38758
38759    /// Sets the value of [resource_spec][crate::model::Asset::resource_spec].
38760    ///
38761    /// # Example
38762    /// ```ignore,no_run
38763    /// # use google_cloud_dataplex_v1::model::Asset;
38764    /// use google_cloud_dataplex_v1::model::asset::ResourceSpec;
38765    /// let x = Asset::new().set_resource_spec(ResourceSpec::default()/* use setters */);
38766    /// ```
38767    pub fn set_resource_spec<T>(mut self, v: T) -> Self
38768    where
38769        T: std::convert::Into<crate::model::asset::ResourceSpec>,
38770    {
38771        self.resource_spec = std::option::Option::Some(v.into());
38772        self
38773    }
38774
38775    /// Sets or clears the value of [resource_spec][crate::model::Asset::resource_spec].
38776    ///
38777    /// # Example
38778    /// ```ignore,no_run
38779    /// # use google_cloud_dataplex_v1::model::Asset;
38780    /// use google_cloud_dataplex_v1::model::asset::ResourceSpec;
38781    /// let x = Asset::new().set_or_clear_resource_spec(Some(ResourceSpec::default()/* use setters */));
38782    /// let x = Asset::new().set_or_clear_resource_spec(None::<ResourceSpec>);
38783    /// ```
38784    pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
38785    where
38786        T: std::convert::Into<crate::model::asset::ResourceSpec>,
38787    {
38788        self.resource_spec = v.map(|x| x.into());
38789        self
38790    }
38791
38792    /// Sets the value of [resource_status][crate::model::Asset::resource_status].
38793    ///
38794    /// # Example
38795    /// ```ignore,no_run
38796    /// # use google_cloud_dataplex_v1::model::Asset;
38797    /// use google_cloud_dataplex_v1::model::asset::ResourceStatus;
38798    /// let x = Asset::new().set_resource_status(ResourceStatus::default()/* use setters */);
38799    /// ```
38800    pub fn set_resource_status<T>(mut self, v: T) -> Self
38801    where
38802        T: std::convert::Into<crate::model::asset::ResourceStatus>,
38803    {
38804        self.resource_status = std::option::Option::Some(v.into());
38805        self
38806    }
38807
38808    /// Sets or clears the value of [resource_status][crate::model::Asset::resource_status].
38809    ///
38810    /// # Example
38811    /// ```ignore,no_run
38812    /// # use google_cloud_dataplex_v1::model::Asset;
38813    /// use google_cloud_dataplex_v1::model::asset::ResourceStatus;
38814    /// let x = Asset::new().set_or_clear_resource_status(Some(ResourceStatus::default()/* use setters */));
38815    /// let x = Asset::new().set_or_clear_resource_status(None::<ResourceStatus>);
38816    /// ```
38817    pub fn set_or_clear_resource_status<T>(mut self, v: std::option::Option<T>) -> Self
38818    where
38819        T: std::convert::Into<crate::model::asset::ResourceStatus>,
38820    {
38821        self.resource_status = v.map(|x| x.into());
38822        self
38823    }
38824
38825    /// Sets the value of [security_status][crate::model::Asset::security_status].
38826    ///
38827    /// # Example
38828    /// ```ignore,no_run
38829    /// # use google_cloud_dataplex_v1::model::Asset;
38830    /// use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38831    /// let x = Asset::new().set_security_status(SecurityStatus::default()/* use setters */);
38832    /// ```
38833    pub fn set_security_status<T>(mut self, v: T) -> Self
38834    where
38835        T: std::convert::Into<crate::model::asset::SecurityStatus>,
38836    {
38837        self.security_status = std::option::Option::Some(v.into());
38838        self
38839    }
38840
38841    /// Sets or clears the value of [security_status][crate::model::Asset::security_status].
38842    ///
38843    /// # Example
38844    /// ```ignore,no_run
38845    /// # use google_cloud_dataplex_v1::model::Asset;
38846    /// use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38847    /// let x = Asset::new().set_or_clear_security_status(Some(SecurityStatus::default()/* use setters */));
38848    /// let x = Asset::new().set_or_clear_security_status(None::<SecurityStatus>);
38849    /// ```
38850    pub fn set_or_clear_security_status<T>(mut self, v: std::option::Option<T>) -> Self
38851    where
38852        T: std::convert::Into<crate::model::asset::SecurityStatus>,
38853    {
38854        self.security_status = v.map(|x| x.into());
38855        self
38856    }
38857
38858    /// Sets the value of [discovery_spec][crate::model::Asset::discovery_spec].
38859    ///
38860    /// # Example
38861    /// ```ignore,no_run
38862    /// # use google_cloud_dataplex_v1::model::Asset;
38863    /// use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
38864    /// let x = Asset::new().set_discovery_spec(DiscoverySpec::default()/* use setters */);
38865    /// ```
38866    pub fn set_discovery_spec<T>(mut self, v: T) -> Self
38867    where
38868        T: std::convert::Into<crate::model::asset::DiscoverySpec>,
38869    {
38870        self.discovery_spec = std::option::Option::Some(v.into());
38871        self
38872    }
38873
38874    /// Sets or clears the value of [discovery_spec][crate::model::Asset::discovery_spec].
38875    ///
38876    /// # Example
38877    /// ```ignore,no_run
38878    /// # use google_cloud_dataplex_v1::model::Asset;
38879    /// use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
38880    /// let x = Asset::new().set_or_clear_discovery_spec(Some(DiscoverySpec::default()/* use setters */));
38881    /// let x = Asset::new().set_or_clear_discovery_spec(None::<DiscoverySpec>);
38882    /// ```
38883    pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
38884    where
38885        T: std::convert::Into<crate::model::asset::DiscoverySpec>,
38886    {
38887        self.discovery_spec = v.map(|x| x.into());
38888        self
38889    }
38890
38891    /// Sets the value of [discovery_status][crate::model::Asset::discovery_status].
38892    ///
38893    /// # Example
38894    /// ```ignore,no_run
38895    /// # use google_cloud_dataplex_v1::model::Asset;
38896    /// use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
38897    /// let x = Asset::new().set_discovery_status(DiscoveryStatus::default()/* use setters */);
38898    /// ```
38899    pub fn set_discovery_status<T>(mut self, v: T) -> Self
38900    where
38901        T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
38902    {
38903        self.discovery_status = std::option::Option::Some(v.into());
38904        self
38905    }
38906
38907    /// Sets or clears the value of [discovery_status][crate::model::Asset::discovery_status].
38908    ///
38909    /// # Example
38910    /// ```ignore,no_run
38911    /// # use google_cloud_dataplex_v1::model::Asset;
38912    /// use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
38913    /// let x = Asset::new().set_or_clear_discovery_status(Some(DiscoveryStatus::default()/* use setters */));
38914    /// let x = Asset::new().set_or_clear_discovery_status(None::<DiscoveryStatus>);
38915    /// ```
38916    pub fn set_or_clear_discovery_status<T>(mut self, v: std::option::Option<T>) -> Self
38917    where
38918        T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
38919    {
38920        self.discovery_status = v.map(|x| x.into());
38921        self
38922    }
38923}
38924
38925impl wkt::message::Message for Asset {
38926    fn typename() -> &'static str {
38927        "type.googleapis.com/google.cloud.dataplex.v1.Asset"
38928    }
38929}
38930
38931/// Defines additional types related to [Asset].
38932pub mod asset {
38933    #[allow(unused_imports)]
38934    use super::*;
38935
38936    /// Security policy status of the asset. Data security policy, i.e., readers,
38937    /// writers & owners, should be specified in the lake/zone/asset IAM policy.
38938    #[derive(Clone, Default, PartialEq)]
38939    #[non_exhaustive]
38940    pub struct SecurityStatus {
38941        /// The current state of the security policy applied to the attached
38942        /// resource.
38943        pub state: crate::model::asset::security_status::State,
38944
38945        /// Additional information about the current state.
38946        pub message: std::string::String,
38947
38948        /// Last update time of the status.
38949        pub update_time: std::option::Option<wkt::Timestamp>,
38950
38951        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38952    }
38953
38954    impl SecurityStatus {
38955        pub fn new() -> Self {
38956            std::default::Default::default()
38957        }
38958
38959        /// Sets the value of [state][crate::model::asset::SecurityStatus::state].
38960        ///
38961        /// # Example
38962        /// ```ignore,no_run
38963        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38964        /// use google_cloud_dataplex_v1::model::asset::security_status::State;
38965        /// let x0 = SecurityStatus::new().set_state(State::Ready);
38966        /// let x1 = SecurityStatus::new().set_state(State::Applying);
38967        /// let x2 = SecurityStatus::new().set_state(State::Error);
38968        /// ```
38969        pub fn set_state<T: std::convert::Into<crate::model::asset::security_status::State>>(
38970            mut self,
38971            v: T,
38972        ) -> Self {
38973            self.state = v.into();
38974            self
38975        }
38976
38977        /// Sets the value of [message][crate::model::asset::SecurityStatus::message].
38978        ///
38979        /// # Example
38980        /// ```ignore,no_run
38981        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38982        /// let x = SecurityStatus::new().set_message("example");
38983        /// ```
38984        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38985            self.message = v.into();
38986            self
38987        }
38988
38989        /// Sets the value of [update_time][crate::model::asset::SecurityStatus::update_time].
38990        ///
38991        /// # Example
38992        /// ```ignore,no_run
38993        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38994        /// use wkt::Timestamp;
38995        /// let x = SecurityStatus::new().set_update_time(Timestamp::default()/* use setters */);
38996        /// ```
38997        pub fn set_update_time<T>(mut self, v: T) -> Self
38998        where
38999            T: std::convert::Into<wkt::Timestamp>,
39000        {
39001            self.update_time = std::option::Option::Some(v.into());
39002            self
39003        }
39004
39005        /// Sets or clears the value of [update_time][crate::model::asset::SecurityStatus::update_time].
39006        ///
39007        /// # Example
39008        /// ```ignore,no_run
39009        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
39010        /// use wkt::Timestamp;
39011        /// let x = SecurityStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
39012        /// let x = SecurityStatus::new().set_or_clear_update_time(None::<Timestamp>);
39013        /// ```
39014        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
39015        where
39016            T: std::convert::Into<wkt::Timestamp>,
39017        {
39018            self.update_time = v.map(|x| x.into());
39019            self
39020        }
39021    }
39022
39023    impl wkt::message::Message for SecurityStatus {
39024        fn typename() -> &'static str {
39025            "type.googleapis.com/google.cloud.dataplex.v1.Asset.SecurityStatus"
39026        }
39027    }
39028
39029    /// Defines additional types related to [SecurityStatus].
39030    pub mod security_status {
39031        #[allow(unused_imports)]
39032        use super::*;
39033
39034        /// The state of the security policy.
39035        ///
39036        /// # Working with unknown values
39037        ///
39038        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39039        /// additional enum variants at any time. Adding new variants is not considered
39040        /// a breaking change. Applications should write their code in anticipation of:
39041        ///
39042        /// - New values appearing in future releases of the client library, **and**
39043        /// - New values received dynamically, without application changes.
39044        ///
39045        /// Please consult the [Working with enums] section in the user guide for some
39046        /// guidelines.
39047        ///
39048        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39049        #[derive(Clone, Debug, PartialEq)]
39050        #[non_exhaustive]
39051        pub enum State {
39052            /// State unspecified.
39053            Unspecified,
39054            /// Security policy has been successfully applied to the attached resource.
39055            Ready,
39056            /// Security policy is in the process of being applied to the attached
39057            /// resource.
39058            Applying,
39059            /// Security policy could not be applied to the attached resource due to
39060            /// errors.
39061            Error,
39062            /// If set, the enum was initialized with an unknown value.
39063            ///
39064            /// Applications can examine the value using [State::value] or
39065            /// [State::name].
39066            UnknownValue(state::UnknownValue),
39067        }
39068
39069        #[doc(hidden)]
39070        pub mod state {
39071            #[allow(unused_imports)]
39072            use super::*;
39073            #[derive(Clone, Debug, PartialEq)]
39074            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39075        }
39076
39077        impl State {
39078            /// Gets the enum value.
39079            ///
39080            /// Returns `None` if the enum contains an unknown value deserialized from
39081            /// the string representation of enums.
39082            pub fn value(&self) -> std::option::Option<i32> {
39083                match self {
39084                    Self::Unspecified => std::option::Option::Some(0),
39085                    Self::Ready => std::option::Option::Some(1),
39086                    Self::Applying => std::option::Option::Some(2),
39087                    Self::Error => std::option::Option::Some(3),
39088                    Self::UnknownValue(u) => u.0.value(),
39089                }
39090            }
39091
39092            /// Gets the enum value as a string.
39093            ///
39094            /// Returns `None` if the enum contains an unknown value deserialized from
39095            /// the integer representation of enums.
39096            pub fn name(&self) -> std::option::Option<&str> {
39097                match self {
39098                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
39099                    Self::Ready => std::option::Option::Some("READY"),
39100                    Self::Applying => std::option::Option::Some("APPLYING"),
39101                    Self::Error => std::option::Option::Some("ERROR"),
39102                    Self::UnknownValue(u) => u.0.name(),
39103                }
39104            }
39105        }
39106
39107        impl std::default::Default for State {
39108            fn default() -> Self {
39109                use std::convert::From;
39110                Self::from(0)
39111            }
39112        }
39113
39114        impl std::fmt::Display for State {
39115            fn fmt(
39116                &self,
39117                f: &mut std::fmt::Formatter<'_>,
39118            ) -> std::result::Result<(), std::fmt::Error> {
39119                wkt::internal::display_enum(f, self.name(), self.value())
39120            }
39121        }
39122
39123        impl std::convert::From<i32> for State {
39124            fn from(value: i32) -> Self {
39125                match value {
39126                    0 => Self::Unspecified,
39127                    1 => Self::Ready,
39128                    2 => Self::Applying,
39129                    3 => Self::Error,
39130                    _ => Self::UnknownValue(state::UnknownValue(
39131                        wkt::internal::UnknownEnumValue::Integer(value),
39132                    )),
39133                }
39134            }
39135        }
39136
39137        impl std::convert::From<&str> for State {
39138            fn from(value: &str) -> Self {
39139                use std::string::ToString;
39140                match value {
39141                    "STATE_UNSPECIFIED" => Self::Unspecified,
39142                    "READY" => Self::Ready,
39143                    "APPLYING" => Self::Applying,
39144                    "ERROR" => Self::Error,
39145                    _ => Self::UnknownValue(state::UnknownValue(
39146                        wkt::internal::UnknownEnumValue::String(value.to_string()),
39147                    )),
39148                }
39149            }
39150        }
39151
39152        impl serde::ser::Serialize for State {
39153            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
39154            where
39155                S: serde::Serializer,
39156            {
39157                match self {
39158                    Self::Unspecified => serializer.serialize_i32(0),
39159                    Self::Ready => serializer.serialize_i32(1),
39160                    Self::Applying => serializer.serialize_i32(2),
39161                    Self::Error => serializer.serialize_i32(3),
39162                    Self::UnknownValue(u) => u.0.serialize(serializer),
39163                }
39164            }
39165        }
39166
39167        impl<'de> serde::de::Deserialize<'de> for State {
39168            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
39169            where
39170                D: serde::Deserializer<'de>,
39171            {
39172                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
39173                    ".google.cloud.dataplex.v1.Asset.SecurityStatus.State",
39174                ))
39175            }
39176        }
39177    }
39178
39179    /// Settings to manage the metadata discovery and publishing for an asset.
39180    #[derive(Clone, Default, PartialEq)]
39181    #[non_exhaustive]
39182    pub struct DiscoverySpec {
39183        /// Optional. Whether discovery is enabled.
39184        pub enabled: bool,
39185
39186        /// Optional. The list of patterns to apply for selecting data to include
39187        /// during discovery if only a subset of the data should considered.  For
39188        /// Cloud Storage bucket assets, these are interpreted as glob patterns used
39189        /// to match object names. For BigQuery dataset assets, these are interpreted
39190        /// as patterns to match table names.
39191        pub include_patterns: std::vec::Vec<std::string::String>,
39192
39193        /// Optional. The list of patterns to apply for selecting data to exclude
39194        /// during discovery.  For Cloud Storage bucket assets, these are interpreted
39195        /// as glob patterns used to match object names. For BigQuery dataset assets,
39196        /// these are interpreted as patterns to match table names.
39197        pub exclude_patterns: std::vec::Vec<std::string::String>,
39198
39199        /// Optional. Configuration for CSV data.
39200        pub csv_options: std::option::Option<crate::model::asset::discovery_spec::CsvOptions>,
39201
39202        /// Optional. Configuration for Json data.
39203        pub json_options: std::option::Option<crate::model::asset::discovery_spec::JsonOptions>,
39204
39205        /// Determines when discovery is triggered.
39206        pub trigger: std::option::Option<crate::model::asset::discovery_spec::Trigger>,
39207
39208        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39209    }
39210
39211    impl DiscoverySpec {
39212        pub fn new() -> Self {
39213            std::default::Default::default()
39214        }
39215
39216        /// Sets the value of [enabled][crate::model::asset::DiscoverySpec::enabled].
39217        ///
39218        /// # Example
39219        /// ```ignore,no_run
39220        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39221        /// let x = DiscoverySpec::new().set_enabled(true);
39222        /// ```
39223        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39224            self.enabled = v.into();
39225            self
39226        }
39227
39228        /// Sets the value of [include_patterns][crate::model::asset::DiscoverySpec::include_patterns].
39229        ///
39230        /// # Example
39231        /// ```ignore,no_run
39232        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39233        /// let x = DiscoverySpec::new().set_include_patterns(["a", "b", "c"]);
39234        /// ```
39235        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
39236        where
39237            T: std::iter::IntoIterator<Item = V>,
39238            V: std::convert::Into<std::string::String>,
39239        {
39240            use std::iter::Iterator;
39241            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
39242            self
39243        }
39244
39245        /// Sets the value of [exclude_patterns][crate::model::asset::DiscoverySpec::exclude_patterns].
39246        ///
39247        /// # Example
39248        /// ```ignore,no_run
39249        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39250        /// let x = DiscoverySpec::new().set_exclude_patterns(["a", "b", "c"]);
39251        /// ```
39252        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
39253        where
39254            T: std::iter::IntoIterator<Item = V>,
39255            V: std::convert::Into<std::string::String>,
39256        {
39257            use std::iter::Iterator;
39258            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
39259            self
39260        }
39261
39262        /// Sets the value of [csv_options][crate::model::asset::DiscoverySpec::csv_options].
39263        ///
39264        /// # Example
39265        /// ```ignore,no_run
39266        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39267        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39268        /// let x = DiscoverySpec::new().set_csv_options(CsvOptions::default()/* use setters */);
39269        /// ```
39270        pub fn set_csv_options<T>(mut self, v: T) -> Self
39271        where
39272            T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
39273        {
39274            self.csv_options = std::option::Option::Some(v.into());
39275            self
39276        }
39277
39278        /// Sets or clears the value of [csv_options][crate::model::asset::DiscoverySpec::csv_options].
39279        ///
39280        /// # Example
39281        /// ```ignore,no_run
39282        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39283        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39284        /// let x = DiscoverySpec::new().set_or_clear_csv_options(Some(CsvOptions::default()/* use setters */));
39285        /// let x = DiscoverySpec::new().set_or_clear_csv_options(None::<CsvOptions>);
39286        /// ```
39287        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
39288        where
39289            T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
39290        {
39291            self.csv_options = v.map(|x| x.into());
39292            self
39293        }
39294
39295        /// Sets the value of [json_options][crate::model::asset::DiscoverySpec::json_options].
39296        ///
39297        /// # Example
39298        /// ```ignore,no_run
39299        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39300        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39301        /// let x = DiscoverySpec::new().set_json_options(JsonOptions::default()/* use setters */);
39302        /// ```
39303        pub fn set_json_options<T>(mut self, v: T) -> Self
39304        where
39305            T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
39306        {
39307            self.json_options = std::option::Option::Some(v.into());
39308            self
39309        }
39310
39311        /// Sets or clears the value of [json_options][crate::model::asset::DiscoverySpec::json_options].
39312        ///
39313        /// # Example
39314        /// ```ignore,no_run
39315        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39316        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39317        /// let x = DiscoverySpec::new().set_or_clear_json_options(Some(JsonOptions::default()/* use setters */));
39318        /// let x = DiscoverySpec::new().set_or_clear_json_options(None::<JsonOptions>);
39319        /// ```
39320        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
39321        where
39322            T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
39323        {
39324            self.json_options = v.map(|x| x.into());
39325            self
39326        }
39327
39328        /// Sets the value of [trigger][crate::model::asset::DiscoverySpec::trigger].
39329        ///
39330        /// Note that all the setters affecting `trigger` are mutually
39331        /// exclusive.
39332        ///
39333        /// # Example
39334        /// ```ignore,no_run
39335        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39336        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::Trigger;
39337        /// let x = DiscoverySpec::new().set_trigger(Some(Trigger::Schedule("example".to_string())));
39338        /// ```
39339        pub fn set_trigger<
39340            T: std::convert::Into<std::option::Option<crate::model::asset::discovery_spec::Trigger>>,
39341        >(
39342            mut self,
39343            v: T,
39344        ) -> Self {
39345            self.trigger = v.into();
39346            self
39347        }
39348
39349        /// The value of [trigger][crate::model::asset::DiscoverySpec::trigger]
39350        /// if it holds a `Schedule`, `None` if the field is not set or
39351        /// holds a different branch.
39352        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
39353            #[allow(unreachable_patterns)]
39354            self.trigger.as_ref().and_then(|v| match v {
39355                crate::model::asset::discovery_spec::Trigger::Schedule(v) => {
39356                    std::option::Option::Some(v)
39357                }
39358                _ => std::option::Option::None,
39359            })
39360        }
39361
39362        /// Sets the value of [trigger][crate::model::asset::DiscoverySpec::trigger]
39363        /// to hold a `Schedule`.
39364        ///
39365        /// Note that all the setters affecting `trigger` are
39366        /// mutually exclusive.
39367        ///
39368        /// # Example
39369        /// ```ignore,no_run
39370        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39371        /// let x = DiscoverySpec::new().set_schedule("example");
39372        /// assert!(x.schedule().is_some());
39373        /// ```
39374        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39375            self.trigger = std::option::Option::Some(
39376                crate::model::asset::discovery_spec::Trigger::Schedule(v.into()),
39377            );
39378            self
39379        }
39380    }
39381
39382    impl wkt::message::Message for DiscoverySpec {
39383        fn typename() -> &'static str {
39384            "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec"
39385        }
39386    }
39387
39388    /// Defines additional types related to [DiscoverySpec].
39389    pub mod discovery_spec {
39390        #[allow(unused_imports)]
39391        use super::*;
39392
39393        /// Describe CSV and similar semi-structured data formats.
39394        #[derive(Clone, Default, PartialEq)]
39395        #[non_exhaustive]
39396        pub struct CsvOptions {
39397            /// Optional. The number of rows to interpret as header rows that should be
39398            /// skipped when reading data rows.
39399            pub header_rows: i32,
39400
39401            /// Optional. The delimiter being used to separate values. This defaults to
39402            /// ','.
39403            pub delimiter: std::string::String,
39404
39405            /// Optional. The character encoding of the data. The default is UTF-8.
39406            pub encoding: std::string::String,
39407
39408            /// Optional. Whether to disable the inference of data type for CSV data.
39409            /// If true, all columns will be registered as strings.
39410            pub disable_type_inference: bool,
39411
39412            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39413        }
39414
39415        impl CsvOptions {
39416            pub fn new() -> Self {
39417                std::default::Default::default()
39418            }
39419
39420            /// Sets the value of [header_rows][crate::model::asset::discovery_spec::CsvOptions::header_rows].
39421            ///
39422            /// # Example
39423            /// ```ignore,no_run
39424            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39425            /// let x = CsvOptions::new().set_header_rows(42);
39426            /// ```
39427            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39428                self.header_rows = v.into();
39429                self
39430            }
39431
39432            /// Sets the value of [delimiter][crate::model::asset::discovery_spec::CsvOptions::delimiter].
39433            ///
39434            /// # Example
39435            /// ```ignore,no_run
39436            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39437            /// let x = CsvOptions::new().set_delimiter("example");
39438            /// ```
39439            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
39440                mut self,
39441                v: T,
39442            ) -> Self {
39443                self.delimiter = v.into();
39444                self
39445            }
39446
39447            /// Sets the value of [encoding][crate::model::asset::discovery_spec::CsvOptions::encoding].
39448            ///
39449            /// # Example
39450            /// ```ignore,no_run
39451            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39452            /// let x = CsvOptions::new().set_encoding("example");
39453            /// ```
39454            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
39455                mut self,
39456                v: T,
39457            ) -> Self {
39458                self.encoding = v.into();
39459                self
39460            }
39461
39462            /// Sets the value of [disable_type_inference][crate::model::asset::discovery_spec::CsvOptions::disable_type_inference].
39463            ///
39464            /// # Example
39465            /// ```ignore,no_run
39466            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39467            /// let x = CsvOptions::new().set_disable_type_inference(true);
39468            /// ```
39469            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39470                self.disable_type_inference = v.into();
39471                self
39472            }
39473        }
39474
39475        impl wkt::message::Message for CsvOptions {
39476            fn typename() -> &'static str {
39477                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions"
39478            }
39479        }
39480
39481        /// Describe JSON data format.
39482        #[derive(Clone, Default, PartialEq)]
39483        #[non_exhaustive]
39484        pub struct JsonOptions {
39485            /// Optional. The character encoding of the data. The default is UTF-8.
39486            pub encoding: std::string::String,
39487
39488            /// Optional. Whether to disable the inference of data type for Json data.
39489            /// If true, all columns will be registered as their primitive types
39490            /// (strings, number or boolean).
39491            pub disable_type_inference: bool,
39492
39493            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39494        }
39495
39496        impl JsonOptions {
39497            pub fn new() -> Self {
39498                std::default::Default::default()
39499            }
39500
39501            /// Sets the value of [encoding][crate::model::asset::discovery_spec::JsonOptions::encoding].
39502            ///
39503            /// # Example
39504            /// ```ignore,no_run
39505            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39506            /// let x = JsonOptions::new().set_encoding("example");
39507            /// ```
39508            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
39509                mut self,
39510                v: T,
39511            ) -> Self {
39512                self.encoding = v.into();
39513                self
39514            }
39515
39516            /// Sets the value of [disable_type_inference][crate::model::asset::discovery_spec::JsonOptions::disable_type_inference].
39517            ///
39518            /// # Example
39519            /// ```ignore,no_run
39520            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39521            /// let x = JsonOptions::new().set_disable_type_inference(true);
39522            /// ```
39523            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39524                self.disable_type_inference = v.into();
39525                self
39526            }
39527        }
39528
39529        impl wkt::message::Message for JsonOptions {
39530            fn typename() -> &'static str {
39531                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions"
39532            }
39533        }
39534
39535        /// Determines when discovery is triggered.
39536        #[derive(Clone, Debug, PartialEq)]
39537        #[non_exhaustive]
39538        pub enum Trigger {
39539            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
39540            /// running discovery periodically. Successive discovery runs must be
39541            /// scheduled at least 60 minutes apart. The default value is to run
39542            /// discovery every 60 minutes.
39543            ///
39544            /// To explicitly set a timezone to the cron tab, apply a prefix in the
39545            /// cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}".
39546            /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
39547            /// database. For example, `CRON_TZ=America/New_York 1 * * * *`, or
39548            /// `TZ=America/New_York 1 * * * *`.
39549            Schedule(std::string::String),
39550        }
39551    }
39552
39553    /// Identifies the cloud resource that is referenced by this asset.
39554    #[derive(Clone, Default, PartialEq)]
39555    #[non_exhaustive]
39556    pub struct ResourceSpec {
39557        /// Immutable. Relative name of the cloud resource that contains the data
39558        /// that is being managed within a lake. For example:
39559        /// `projects/{project_number}/buckets/{bucket_id}`
39560        /// `projects/{project_number}/datasets/{dataset_id}`
39561        pub name: std::string::String,
39562
39563        /// Required. Immutable. Type of resource.
39564        pub r#type: crate::model::asset::resource_spec::Type,
39565
39566        /// Optional. Determines how read permissions are handled for each asset and
39567        /// their associated tables. Only available to storage buckets assets.
39568        pub read_access_mode: crate::model::asset::resource_spec::AccessMode,
39569
39570        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39571    }
39572
39573    impl ResourceSpec {
39574        pub fn new() -> Self {
39575            std::default::Default::default()
39576        }
39577
39578        /// Sets the value of [name][crate::model::asset::ResourceSpec::name].
39579        ///
39580        /// # Example
39581        /// ```ignore,no_run
39582        /// # use google_cloud_dataplex_v1::model::asset::ResourceSpec;
39583        /// let x = ResourceSpec::new().set_name("example");
39584        /// ```
39585        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39586            self.name = v.into();
39587            self
39588        }
39589
39590        /// Sets the value of [r#type][crate::model::asset::ResourceSpec::type].
39591        ///
39592        /// # Example
39593        /// ```ignore,no_run
39594        /// # use google_cloud_dataplex_v1::model::asset::ResourceSpec;
39595        /// use google_cloud_dataplex_v1::model::asset::resource_spec::Type;
39596        /// let x0 = ResourceSpec::new().set_type(Type::StorageBucket);
39597        /// let x1 = ResourceSpec::new().set_type(Type::BigqueryDataset);
39598        /// ```
39599        pub fn set_type<T: std::convert::Into<crate::model::asset::resource_spec::Type>>(
39600            mut self,
39601            v: T,
39602        ) -> Self {
39603            self.r#type = v.into();
39604            self
39605        }
39606
39607        /// Sets the value of [read_access_mode][crate::model::asset::ResourceSpec::read_access_mode].
39608        ///
39609        /// # Example
39610        /// ```ignore,no_run
39611        /// # use google_cloud_dataplex_v1::model::asset::ResourceSpec;
39612        /// use google_cloud_dataplex_v1::model::asset::resource_spec::AccessMode;
39613        /// let x0 = ResourceSpec::new().set_read_access_mode(AccessMode::Direct);
39614        /// let x1 = ResourceSpec::new().set_read_access_mode(AccessMode::Managed);
39615        /// ```
39616        pub fn set_read_access_mode<
39617            T: std::convert::Into<crate::model::asset::resource_spec::AccessMode>,
39618        >(
39619            mut self,
39620            v: T,
39621        ) -> Self {
39622            self.read_access_mode = v.into();
39623            self
39624        }
39625    }
39626
39627    impl wkt::message::Message for ResourceSpec {
39628        fn typename() -> &'static str {
39629            "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceSpec"
39630        }
39631    }
39632
39633    /// Defines additional types related to [ResourceSpec].
39634    pub mod resource_spec {
39635        #[allow(unused_imports)]
39636        use super::*;
39637
39638        /// Type of resource.
39639        ///
39640        /// # Working with unknown values
39641        ///
39642        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39643        /// additional enum variants at any time. Adding new variants is not considered
39644        /// a breaking change. Applications should write their code in anticipation of:
39645        ///
39646        /// - New values appearing in future releases of the client library, **and**
39647        /// - New values received dynamically, without application changes.
39648        ///
39649        /// Please consult the [Working with enums] section in the user guide for some
39650        /// guidelines.
39651        ///
39652        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39653        #[derive(Clone, Debug, PartialEq)]
39654        #[non_exhaustive]
39655        pub enum Type {
39656            /// Type not specified.
39657            Unspecified,
39658            /// Cloud Storage bucket.
39659            StorageBucket,
39660            /// BigQuery dataset.
39661            BigqueryDataset,
39662            /// If set, the enum was initialized with an unknown value.
39663            ///
39664            /// Applications can examine the value using [Type::value] or
39665            /// [Type::name].
39666            UnknownValue(r#type::UnknownValue),
39667        }
39668
39669        #[doc(hidden)]
39670        pub mod r#type {
39671            #[allow(unused_imports)]
39672            use super::*;
39673            #[derive(Clone, Debug, PartialEq)]
39674            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39675        }
39676
39677        impl Type {
39678            /// Gets the enum value.
39679            ///
39680            /// Returns `None` if the enum contains an unknown value deserialized from
39681            /// the string representation of enums.
39682            pub fn value(&self) -> std::option::Option<i32> {
39683                match self {
39684                    Self::Unspecified => std::option::Option::Some(0),
39685                    Self::StorageBucket => std::option::Option::Some(1),
39686                    Self::BigqueryDataset => std::option::Option::Some(2),
39687                    Self::UnknownValue(u) => u.0.value(),
39688                }
39689            }
39690
39691            /// Gets the enum value as a string.
39692            ///
39693            /// Returns `None` if the enum contains an unknown value deserialized from
39694            /// the integer representation of enums.
39695            pub fn name(&self) -> std::option::Option<&str> {
39696                match self {
39697                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
39698                    Self::StorageBucket => std::option::Option::Some("STORAGE_BUCKET"),
39699                    Self::BigqueryDataset => std::option::Option::Some("BIGQUERY_DATASET"),
39700                    Self::UnknownValue(u) => u.0.name(),
39701                }
39702            }
39703        }
39704
39705        impl std::default::Default for Type {
39706            fn default() -> Self {
39707                use std::convert::From;
39708                Self::from(0)
39709            }
39710        }
39711
39712        impl std::fmt::Display for Type {
39713            fn fmt(
39714                &self,
39715                f: &mut std::fmt::Formatter<'_>,
39716            ) -> std::result::Result<(), std::fmt::Error> {
39717                wkt::internal::display_enum(f, self.name(), self.value())
39718            }
39719        }
39720
39721        impl std::convert::From<i32> for Type {
39722            fn from(value: i32) -> Self {
39723                match value {
39724                    0 => Self::Unspecified,
39725                    1 => Self::StorageBucket,
39726                    2 => Self::BigqueryDataset,
39727                    _ => Self::UnknownValue(r#type::UnknownValue(
39728                        wkt::internal::UnknownEnumValue::Integer(value),
39729                    )),
39730                }
39731            }
39732        }
39733
39734        impl std::convert::From<&str> for Type {
39735            fn from(value: &str) -> Self {
39736                use std::string::ToString;
39737                match value {
39738                    "TYPE_UNSPECIFIED" => Self::Unspecified,
39739                    "STORAGE_BUCKET" => Self::StorageBucket,
39740                    "BIGQUERY_DATASET" => Self::BigqueryDataset,
39741                    _ => Self::UnknownValue(r#type::UnknownValue(
39742                        wkt::internal::UnknownEnumValue::String(value.to_string()),
39743                    )),
39744                }
39745            }
39746        }
39747
39748        impl serde::ser::Serialize for Type {
39749            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
39750            where
39751                S: serde::Serializer,
39752            {
39753                match self {
39754                    Self::Unspecified => serializer.serialize_i32(0),
39755                    Self::StorageBucket => serializer.serialize_i32(1),
39756                    Self::BigqueryDataset => serializer.serialize_i32(2),
39757                    Self::UnknownValue(u) => u.0.serialize(serializer),
39758                }
39759            }
39760        }
39761
39762        impl<'de> serde::de::Deserialize<'de> for Type {
39763            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
39764            where
39765                D: serde::Deserializer<'de>,
39766            {
39767                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
39768                    ".google.cloud.dataplex.v1.Asset.ResourceSpec.Type",
39769                ))
39770            }
39771        }
39772
39773        /// Access Mode determines how data stored within the resource is read. This
39774        /// is only applicable to storage bucket assets.
39775        ///
39776        /// # Working with unknown values
39777        ///
39778        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39779        /// additional enum variants at any time. Adding new variants is not considered
39780        /// a breaking change. Applications should write their code in anticipation of:
39781        ///
39782        /// - New values appearing in future releases of the client library, **and**
39783        /// - New values received dynamically, without application changes.
39784        ///
39785        /// Please consult the [Working with enums] section in the user guide for some
39786        /// guidelines.
39787        ///
39788        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39789        #[derive(Clone, Debug, PartialEq)]
39790        #[non_exhaustive]
39791        pub enum AccessMode {
39792            /// Access mode unspecified.
39793            Unspecified,
39794            /// Default. Data is accessed directly using storage APIs.
39795            Direct,
39796            /// Data is accessed through a managed interface using BigQuery APIs.
39797            Managed,
39798            /// If set, the enum was initialized with an unknown value.
39799            ///
39800            /// Applications can examine the value using [AccessMode::value] or
39801            /// [AccessMode::name].
39802            UnknownValue(access_mode::UnknownValue),
39803        }
39804
39805        #[doc(hidden)]
39806        pub mod access_mode {
39807            #[allow(unused_imports)]
39808            use super::*;
39809            #[derive(Clone, Debug, PartialEq)]
39810            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39811        }
39812
39813        impl AccessMode {
39814            /// Gets the enum value.
39815            ///
39816            /// Returns `None` if the enum contains an unknown value deserialized from
39817            /// the string representation of enums.
39818            pub fn value(&self) -> std::option::Option<i32> {
39819                match self {
39820                    Self::Unspecified => std::option::Option::Some(0),
39821                    Self::Direct => std::option::Option::Some(1),
39822                    Self::Managed => std::option::Option::Some(2),
39823                    Self::UnknownValue(u) => u.0.value(),
39824                }
39825            }
39826
39827            /// Gets the enum value as a string.
39828            ///
39829            /// Returns `None` if the enum contains an unknown value deserialized from
39830            /// the integer representation of enums.
39831            pub fn name(&self) -> std::option::Option<&str> {
39832                match self {
39833                    Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
39834                    Self::Direct => std::option::Option::Some("DIRECT"),
39835                    Self::Managed => std::option::Option::Some("MANAGED"),
39836                    Self::UnknownValue(u) => u.0.name(),
39837                }
39838            }
39839        }
39840
39841        impl std::default::Default for AccessMode {
39842            fn default() -> Self {
39843                use std::convert::From;
39844                Self::from(0)
39845            }
39846        }
39847
39848        impl std::fmt::Display for AccessMode {
39849            fn fmt(
39850                &self,
39851                f: &mut std::fmt::Formatter<'_>,
39852            ) -> std::result::Result<(), std::fmt::Error> {
39853                wkt::internal::display_enum(f, self.name(), self.value())
39854            }
39855        }
39856
39857        impl std::convert::From<i32> for AccessMode {
39858            fn from(value: i32) -> Self {
39859                match value {
39860                    0 => Self::Unspecified,
39861                    1 => Self::Direct,
39862                    2 => Self::Managed,
39863                    _ => Self::UnknownValue(access_mode::UnknownValue(
39864                        wkt::internal::UnknownEnumValue::Integer(value),
39865                    )),
39866                }
39867            }
39868        }
39869
39870        impl std::convert::From<&str> for AccessMode {
39871            fn from(value: &str) -> Self {
39872                use std::string::ToString;
39873                match value {
39874                    "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
39875                    "DIRECT" => Self::Direct,
39876                    "MANAGED" => Self::Managed,
39877                    _ => Self::UnknownValue(access_mode::UnknownValue(
39878                        wkt::internal::UnknownEnumValue::String(value.to_string()),
39879                    )),
39880                }
39881            }
39882        }
39883
39884        impl serde::ser::Serialize for AccessMode {
39885            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
39886            where
39887                S: serde::Serializer,
39888            {
39889                match self {
39890                    Self::Unspecified => serializer.serialize_i32(0),
39891                    Self::Direct => serializer.serialize_i32(1),
39892                    Self::Managed => serializer.serialize_i32(2),
39893                    Self::UnknownValue(u) => u.0.serialize(serializer),
39894                }
39895            }
39896        }
39897
39898        impl<'de> serde::de::Deserialize<'de> for AccessMode {
39899            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
39900            where
39901                D: serde::Deserializer<'de>,
39902            {
39903                deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
39904                    ".google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode",
39905                ))
39906            }
39907        }
39908    }
39909
39910    /// Status of the resource referenced by an asset.
39911    #[derive(Clone, Default, PartialEq)]
39912    #[non_exhaustive]
39913    pub struct ResourceStatus {
39914        /// The current state of the managed resource.
39915        pub state: crate::model::asset::resource_status::State,
39916
39917        /// Additional information about the current state.
39918        pub message: std::string::String,
39919
39920        /// Last update time of the status.
39921        pub update_time: std::option::Option<wkt::Timestamp>,
39922
39923        /// Output only. Service account associated with the BigQuery Connection.
39924        pub managed_access_identity: std::string::String,
39925
39926        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39927    }
39928
39929    impl ResourceStatus {
39930        pub fn new() -> Self {
39931            std::default::Default::default()
39932        }
39933
39934        /// Sets the value of [state][crate::model::asset::ResourceStatus::state].
39935        ///
39936        /// # Example
39937        /// ```ignore,no_run
39938        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39939        /// use google_cloud_dataplex_v1::model::asset::resource_status::State;
39940        /// let x0 = ResourceStatus::new().set_state(State::Ready);
39941        /// let x1 = ResourceStatus::new().set_state(State::Error);
39942        /// ```
39943        pub fn set_state<T: std::convert::Into<crate::model::asset::resource_status::State>>(
39944            mut self,
39945            v: T,
39946        ) -> Self {
39947            self.state = v.into();
39948            self
39949        }
39950
39951        /// Sets the value of [message][crate::model::asset::ResourceStatus::message].
39952        ///
39953        /// # Example
39954        /// ```ignore,no_run
39955        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39956        /// let x = ResourceStatus::new().set_message("example");
39957        /// ```
39958        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39959            self.message = v.into();
39960            self
39961        }
39962
39963        /// Sets the value of [update_time][crate::model::asset::ResourceStatus::update_time].
39964        ///
39965        /// # Example
39966        /// ```ignore,no_run
39967        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39968        /// use wkt::Timestamp;
39969        /// let x = ResourceStatus::new().set_update_time(Timestamp::default()/* use setters */);
39970        /// ```
39971        pub fn set_update_time<T>(mut self, v: T) -> Self
39972        where
39973            T: std::convert::Into<wkt::Timestamp>,
39974        {
39975            self.update_time = std::option::Option::Some(v.into());
39976            self
39977        }
39978
39979        /// Sets or clears the value of [update_time][crate::model::asset::ResourceStatus::update_time].
39980        ///
39981        /// # Example
39982        /// ```ignore,no_run
39983        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39984        /// use wkt::Timestamp;
39985        /// let x = ResourceStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
39986        /// let x = ResourceStatus::new().set_or_clear_update_time(None::<Timestamp>);
39987        /// ```
39988        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
39989        where
39990            T: std::convert::Into<wkt::Timestamp>,
39991        {
39992            self.update_time = v.map(|x| x.into());
39993            self
39994        }
39995
39996        /// Sets the value of [managed_access_identity][crate::model::asset::ResourceStatus::managed_access_identity].
39997        ///
39998        /// # Example
39999        /// ```ignore,no_run
40000        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
40001        /// let x = ResourceStatus::new().set_managed_access_identity("example");
40002        /// ```
40003        pub fn set_managed_access_identity<T: std::convert::Into<std::string::String>>(
40004            mut self,
40005            v: T,
40006        ) -> Self {
40007            self.managed_access_identity = v.into();
40008            self
40009        }
40010    }
40011
40012    impl wkt::message::Message for ResourceStatus {
40013        fn typename() -> &'static str {
40014            "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceStatus"
40015        }
40016    }
40017
40018    /// Defines additional types related to [ResourceStatus].
40019    pub mod resource_status {
40020        #[allow(unused_imports)]
40021        use super::*;
40022
40023        /// The state of a resource.
40024        ///
40025        /// # Working with unknown values
40026        ///
40027        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
40028        /// additional enum variants at any time. Adding new variants is not considered
40029        /// a breaking change. Applications should write their code in anticipation of:
40030        ///
40031        /// - New values appearing in future releases of the client library, **and**
40032        /// - New values received dynamically, without application changes.
40033        ///
40034        /// Please consult the [Working with enums] section in the user guide for some
40035        /// guidelines.
40036        ///
40037        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
40038        #[derive(Clone, Debug, PartialEq)]
40039        #[non_exhaustive]
40040        pub enum State {
40041            /// State unspecified.
40042            Unspecified,
40043            /// Resource does not have any errors.
40044            Ready,
40045            /// Resource has errors.
40046            Error,
40047            /// If set, the enum was initialized with an unknown value.
40048            ///
40049            /// Applications can examine the value using [State::value] or
40050            /// [State::name].
40051            UnknownValue(state::UnknownValue),
40052        }
40053
40054        #[doc(hidden)]
40055        pub mod state {
40056            #[allow(unused_imports)]
40057            use super::*;
40058            #[derive(Clone, Debug, PartialEq)]
40059            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
40060        }
40061
40062        impl State {
40063            /// Gets the enum value.
40064            ///
40065            /// Returns `None` if the enum contains an unknown value deserialized from
40066            /// the string representation of enums.
40067            pub fn value(&self) -> std::option::Option<i32> {
40068                match self {
40069                    Self::Unspecified => std::option::Option::Some(0),
40070                    Self::Ready => std::option::Option::Some(1),
40071                    Self::Error => std::option::Option::Some(2),
40072                    Self::UnknownValue(u) => u.0.value(),
40073                }
40074            }
40075
40076            /// Gets the enum value as a string.
40077            ///
40078            /// Returns `None` if the enum contains an unknown value deserialized from
40079            /// the integer representation of enums.
40080            pub fn name(&self) -> std::option::Option<&str> {
40081                match self {
40082                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
40083                    Self::Ready => std::option::Option::Some("READY"),
40084                    Self::Error => std::option::Option::Some("ERROR"),
40085                    Self::UnknownValue(u) => u.0.name(),
40086                }
40087            }
40088        }
40089
40090        impl std::default::Default for State {
40091            fn default() -> Self {
40092                use std::convert::From;
40093                Self::from(0)
40094            }
40095        }
40096
40097        impl std::fmt::Display for State {
40098            fn fmt(
40099                &self,
40100                f: &mut std::fmt::Formatter<'_>,
40101            ) -> std::result::Result<(), std::fmt::Error> {
40102                wkt::internal::display_enum(f, self.name(), self.value())
40103            }
40104        }
40105
40106        impl std::convert::From<i32> for State {
40107            fn from(value: i32) -> Self {
40108                match value {
40109                    0 => Self::Unspecified,
40110                    1 => Self::Ready,
40111                    2 => Self::Error,
40112                    _ => Self::UnknownValue(state::UnknownValue(
40113                        wkt::internal::UnknownEnumValue::Integer(value),
40114                    )),
40115                }
40116            }
40117        }
40118
40119        impl std::convert::From<&str> for State {
40120            fn from(value: &str) -> Self {
40121                use std::string::ToString;
40122                match value {
40123                    "STATE_UNSPECIFIED" => Self::Unspecified,
40124                    "READY" => Self::Ready,
40125                    "ERROR" => Self::Error,
40126                    _ => Self::UnknownValue(state::UnknownValue(
40127                        wkt::internal::UnknownEnumValue::String(value.to_string()),
40128                    )),
40129                }
40130            }
40131        }
40132
40133        impl serde::ser::Serialize for State {
40134            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
40135            where
40136                S: serde::Serializer,
40137            {
40138                match self {
40139                    Self::Unspecified => serializer.serialize_i32(0),
40140                    Self::Ready => serializer.serialize_i32(1),
40141                    Self::Error => serializer.serialize_i32(2),
40142                    Self::UnknownValue(u) => u.0.serialize(serializer),
40143                }
40144            }
40145        }
40146
40147        impl<'de> serde::de::Deserialize<'de> for State {
40148            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
40149            where
40150                D: serde::Deserializer<'de>,
40151            {
40152                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
40153                    ".google.cloud.dataplex.v1.Asset.ResourceStatus.State",
40154                ))
40155            }
40156        }
40157    }
40158
40159    /// Status of discovery for an asset.
40160    #[derive(Clone, Default, PartialEq)]
40161    #[non_exhaustive]
40162    pub struct DiscoveryStatus {
40163        /// The current status of the discovery feature.
40164        pub state: crate::model::asset::discovery_status::State,
40165
40166        /// Additional information about the current state.
40167        pub message: std::string::String,
40168
40169        /// Last update time of the status.
40170        pub update_time: std::option::Option<wkt::Timestamp>,
40171
40172        /// The start time of the last discovery run.
40173        pub last_run_time: std::option::Option<wkt::Timestamp>,
40174
40175        /// Data Stats of the asset reported by discovery.
40176        pub stats: std::option::Option<crate::model::asset::discovery_status::Stats>,
40177
40178        /// The duration of the last discovery run.
40179        pub last_run_duration: std::option::Option<wkt::Duration>,
40180
40181        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40182    }
40183
40184    impl DiscoveryStatus {
40185        pub fn new() -> Self {
40186            std::default::Default::default()
40187        }
40188
40189        /// Sets the value of [state][crate::model::asset::DiscoveryStatus::state].
40190        ///
40191        /// # Example
40192        /// ```ignore,no_run
40193        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40194        /// use google_cloud_dataplex_v1::model::asset::discovery_status::State;
40195        /// let x0 = DiscoveryStatus::new().set_state(State::Scheduled);
40196        /// let x1 = DiscoveryStatus::new().set_state(State::InProgress);
40197        /// let x2 = DiscoveryStatus::new().set_state(State::Paused);
40198        /// ```
40199        pub fn set_state<T: std::convert::Into<crate::model::asset::discovery_status::State>>(
40200            mut self,
40201            v: T,
40202        ) -> Self {
40203            self.state = v.into();
40204            self
40205        }
40206
40207        /// Sets the value of [message][crate::model::asset::DiscoveryStatus::message].
40208        ///
40209        /// # Example
40210        /// ```ignore,no_run
40211        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40212        /// let x = DiscoveryStatus::new().set_message("example");
40213        /// ```
40214        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40215            self.message = v.into();
40216            self
40217        }
40218
40219        /// Sets the value of [update_time][crate::model::asset::DiscoveryStatus::update_time].
40220        ///
40221        /// # Example
40222        /// ```ignore,no_run
40223        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40224        /// use wkt::Timestamp;
40225        /// let x = DiscoveryStatus::new().set_update_time(Timestamp::default()/* use setters */);
40226        /// ```
40227        pub fn set_update_time<T>(mut self, v: T) -> Self
40228        where
40229            T: std::convert::Into<wkt::Timestamp>,
40230        {
40231            self.update_time = std::option::Option::Some(v.into());
40232            self
40233        }
40234
40235        /// Sets or clears the value of [update_time][crate::model::asset::DiscoveryStatus::update_time].
40236        ///
40237        /// # Example
40238        /// ```ignore,no_run
40239        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40240        /// use wkt::Timestamp;
40241        /// let x = DiscoveryStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
40242        /// let x = DiscoveryStatus::new().set_or_clear_update_time(None::<Timestamp>);
40243        /// ```
40244        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
40245        where
40246            T: std::convert::Into<wkt::Timestamp>,
40247        {
40248            self.update_time = v.map(|x| x.into());
40249            self
40250        }
40251
40252        /// Sets the value of [last_run_time][crate::model::asset::DiscoveryStatus::last_run_time].
40253        ///
40254        /// # Example
40255        /// ```ignore,no_run
40256        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40257        /// use wkt::Timestamp;
40258        /// let x = DiscoveryStatus::new().set_last_run_time(Timestamp::default()/* use setters */);
40259        /// ```
40260        pub fn set_last_run_time<T>(mut self, v: T) -> Self
40261        where
40262            T: std::convert::Into<wkt::Timestamp>,
40263        {
40264            self.last_run_time = std::option::Option::Some(v.into());
40265            self
40266        }
40267
40268        /// Sets or clears the value of [last_run_time][crate::model::asset::DiscoveryStatus::last_run_time].
40269        ///
40270        /// # Example
40271        /// ```ignore,no_run
40272        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40273        /// use wkt::Timestamp;
40274        /// let x = DiscoveryStatus::new().set_or_clear_last_run_time(Some(Timestamp::default()/* use setters */));
40275        /// let x = DiscoveryStatus::new().set_or_clear_last_run_time(None::<Timestamp>);
40276        /// ```
40277        pub fn set_or_clear_last_run_time<T>(mut self, v: std::option::Option<T>) -> Self
40278        where
40279            T: std::convert::Into<wkt::Timestamp>,
40280        {
40281            self.last_run_time = v.map(|x| x.into());
40282            self
40283        }
40284
40285        /// Sets the value of [stats][crate::model::asset::DiscoveryStatus::stats].
40286        ///
40287        /// # Example
40288        /// ```ignore,no_run
40289        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40290        /// use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40291        /// let x = DiscoveryStatus::new().set_stats(Stats::default()/* use setters */);
40292        /// ```
40293        pub fn set_stats<T>(mut self, v: T) -> Self
40294        where
40295            T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
40296        {
40297            self.stats = std::option::Option::Some(v.into());
40298            self
40299        }
40300
40301        /// Sets or clears the value of [stats][crate::model::asset::DiscoveryStatus::stats].
40302        ///
40303        /// # Example
40304        /// ```ignore,no_run
40305        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40306        /// use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40307        /// let x = DiscoveryStatus::new().set_or_clear_stats(Some(Stats::default()/* use setters */));
40308        /// let x = DiscoveryStatus::new().set_or_clear_stats(None::<Stats>);
40309        /// ```
40310        pub fn set_or_clear_stats<T>(mut self, v: std::option::Option<T>) -> Self
40311        where
40312            T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
40313        {
40314            self.stats = v.map(|x| x.into());
40315            self
40316        }
40317
40318        /// Sets the value of [last_run_duration][crate::model::asset::DiscoveryStatus::last_run_duration].
40319        ///
40320        /// # Example
40321        /// ```ignore,no_run
40322        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40323        /// use wkt::Duration;
40324        /// let x = DiscoveryStatus::new().set_last_run_duration(Duration::default()/* use setters */);
40325        /// ```
40326        pub fn set_last_run_duration<T>(mut self, v: T) -> Self
40327        where
40328            T: std::convert::Into<wkt::Duration>,
40329        {
40330            self.last_run_duration = std::option::Option::Some(v.into());
40331            self
40332        }
40333
40334        /// Sets or clears the value of [last_run_duration][crate::model::asset::DiscoveryStatus::last_run_duration].
40335        ///
40336        /// # Example
40337        /// ```ignore,no_run
40338        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40339        /// use wkt::Duration;
40340        /// let x = DiscoveryStatus::new().set_or_clear_last_run_duration(Some(Duration::default()/* use setters */));
40341        /// let x = DiscoveryStatus::new().set_or_clear_last_run_duration(None::<Duration>);
40342        /// ```
40343        pub fn set_or_clear_last_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
40344        where
40345            T: std::convert::Into<wkt::Duration>,
40346        {
40347            self.last_run_duration = v.map(|x| x.into());
40348            self
40349        }
40350    }
40351
40352    impl wkt::message::Message for DiscoveryStatus {
40353        fn typename() -> &'static str {
40354            "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus"
40355        }
40356    }
40357
40358    /// Defines additional types related to [DiscoveryStatus].
40359    pub mod discovery_status {
40360        #[allow(unused_imports)]
40361        use super::*;
40362
40363        /// The aggregated data statistics for the asset reported by discovery.
40364        #[derive(Clone, Default, PartialEq)]
40365        #[non_exhaustive]
40366        pub struct Stats {
40367            /// The count of data items within the referenced resource.
40368            pub data_items: i64,
40369
40370            /// The number of stored data bytes within the referenced resource.
40371            pub data_size: i64,
40372
40373            /// The count of table entities within the referenced resource.
40374            pub tables: i64,
40375
40376            /// The count of fileset entities within the referenced resource.
40377            pub filesets: i64,
40378
40379            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40380        }
40381
40382        impl Stats {
40383            pub fn new() -> Self {
40384                std::default::Default::default()
40385            }
40386
40387            /// Sets the value of [data_items][crate::model::asset::discovery_status::Stats::data_items].
40388            ///
40389            /// # Example
40390            /// ```ignore,no_run
40391            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40392            /// let x = Stats::new().set_data_items(42);
40393            /// ```
40394            pub fn set_data_items<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40395                self.data_items = v.into();
40396                self
40397            }
40398
40399            /// Sets the value of [data_size][crate::model::asset::discovery_status::Stats::data_size].
40400            ///
40401            /// # Example
40402            /// ```ignore,no_run
40403            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40404            /// let x = Stats::new().set_data_size(42);
40405            /// ```
40406            pub fn set_data_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40407                self.data_size = v.into();
40408                self
40409            }
40410
40411            /// Sets the value of [tables][crate::model::asset::discovery_status::Stats::tables].
40412            ///
40413            /// # Example
40414            /// ```ignore,no_run
40415            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40416            /// let x = Stats::new().set_tables(42);
40417            /// ```
40418            pub fn set_tables<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40419                self.tables = v.into();
40420                self
40421            }
40422
40423            /// Sets the value of [filesets][crate::model::asset::discovery_status::Stats::filesets].
40424            ///
40425            /// # Example
40426            /// ```ignore,no_run
40427            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40428            /// let x = Stats::new().set_filesets(42);
40429            /// ```
40430            pub fn set_filesets<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40431                self.filesets = v.into();
40432                self
40433            }
40434        }
40435
40436        impl wkt::message::Message for Stats {
40437            fn typename() -> &'static str {
40438                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats"
40439            }
40440        }
40441
40442        /// Current state of discovery.
40443        ///
40444        /// # Working with unknown values
40445        ///
40446        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
40447        /// additional enum variants at any time. Adding new variants is not considered
40448        /// a breaking change. Applications should write their code in anticipation of:
40449        ///
40450        /// - New values appearing in future releases of the client library, **and**
40451        /// - New values received dynamically, without application changes.
40452        ///
40453        /// Please consult the [Working with enums] section in the user guide for some
40454        /// guidelines.
40455        ///
40456        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
40457        #[derive(Clone, Debug, PartialEq)]
40458        #[non_exhaustive]
40459        pub enum State {
40460            /// State is unspecified.
40461            Unspecified,
40462            /// Discovery for the asset is scheduled.
40463            Scheduled,
40464            /// Discovery for the asset is running.
40465            InProgress,
40466            /// Discovery for the asset is currently paused (e.g. due to a lack
40467            /// of available resources). It will be automatically resumed.
40468            Paused,
40469            /// Discovery for the asset is disabled.
40470            Disabled,
40471            /// If set, the enum was initialized with an unknown value.
40472            ///
40473            /// Applications can examine the value using [State::value] or
40474            /// [State::name].
40475            UnknownValue(state::UnknownValue),
40476        }
40477
40478        #[doc(hidden)]
40479        pub mod state {
40480            #[allow(unused_imports)]
40481            use super::*;
40482            #[derive(Clone, Debug, PartialEq)]
40483            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
40484        }
40485
40486        impl State {
40487            /// Gets the enum value.
40488            ///
40489            /// Returns `None` if the enum contains an unknown value deserialized from
40490            /// the string representation of enums.
40491            pub fn value(&self) -> std::option::Option<i32> {
40492                match self {
40493                    Self::Unspecified => std::option::Option::Some(0),
40494                    Self::Scheduled => std::option::Option::Some(1),
40495                    Self::InProgress => std::option::Option::Some(2),
40496                    Self::Paused => std::option::Option::Some(3),
40497                    Self::Disabled => std::option::Option::Some(5),
40498                    Self::UnknownValue(u) => u.0.value(),
40499                }
40500            }
40501
40502            /// Gets the enum value as a string.
40503            ///
40504            /// Returns `None` if the enum contains an unknown value deserialized from
40505            /// the integer representation of enums.
40506            pub fn name(&self) -> std::option::Option<&str> {
40507                match self {
40508                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
40509                    Self::Scheduled => std::option::Option::Some("SCHEDULED"),
40510                    Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
40511                    Self::Paused => std::option::Option::Some("PAUSED"),
40512                    Self::Disabled => std::option::Option::Some("DISABLED"),
40513                    Self::UnknownValue(u) => u.0.name(),
40514                }
40515            }
40516        }
40517
40518        impl std::default::Default for State {
40519            fn default() -> Self {
40520                use std::convert::From;
40521                Self::from(0)
40522            }
40523        }
40524
40525        impl std::fmt::Display for State {
40526            fn fmt(
40527                &self,
40528                f: &mut std::fmt::Formatter<'_>,
40529            ) -> std::result::Result<(), std::fmt::Error> {
40530                wkt::internal::display_enum(f, self.name(), self.value())
40531            }
40532        }
40533
40534        impl std::convert::From<i32> for State {
40535            fn from(value: i32) -> Self {
40536                match value {
40537                    0 => Self::Unspecified,
40538                    1 => Self::Scheduled,
40539                    2 => Self::InProgress,
40540                    3 => Self::Paused,
40541                    5 => Self::Disabled,
40542                    _ => Self::UnknownValue(state::UnknownValue(
40543                        wkt::internal::UnknownEnumValue::Integer(value),
40544                    )),
40545                }
40546            }
40547        }
40548
40549        impl std::convert::From<&str> for State {
40550            fn from(value: &str) -> Self {
40551                use std::string::ToString;
40552                match value {
40553                    "STATE_UNSPECIFIED" => Self::Unspecified,
40554                    "SCHEDULED" => Self::Scheduled,
40555                    "IN_PROGRESS" => Self::InProgress,
40556                    "PAUSED" => Self::Paused,
40557                    "DISABLED" => Self::Disabled,
40558                    _ => Self::UnknownValue(state::UnknownValue(
40559                        wkt::internal::UnknownEnumValue::String(value.to_string()),
40560                    )),
40561                }
40562            }
40563        }
40564
40565        impl serde::ser::Serialize for State {
40566            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
40567            where
40568                S: serde::Serializer,
40569            {
40570                match self {
40571                    Self::Unspecified => serializer.serialize_i32(0),
40572                    Self::Scheduled => serializer.serialize_i32(1),
40573                    Self::InProgress => serializer.serialize_i32(2),
40574                    Self::Paused => serializer.serialize_i32(3),
40575                    Self::Disabled => serializer.serialize_i32(5),
40576                    Self::UnknownValue(u) => u.0.serialize(serializer),
40577                }
40578            }
40579        }
40580
40581        impl<'de> serde::de::Deserialize<'de> for State {
40582            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
40583            where
40584                D: serde::Deserializer<'de>,
40585            {
40586                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
40587                    ".google.cloud.dataplex.v1.Asset.DiscoveryStatus.State",
40588                ))
40589            }
40590        }
40591    }
40592}
40593
40594/// ResourceAccessSpec holds the access control configuration to be enforced
40595/// on the resources, for example, Cloud Storage bucket, BigQuery dataset,
40596/// BigQuery table.
40597#[derive(Clone, Default, PartialEq)]
40598#[non_exhaustive]
40599pub struct ResourceAccessSpec {
40600    /// Optional. The format of strings follows the pattern followed by IAM in the
40601    /// bindings. user:{email}, serviceAccount:{email} group:{email}.
40602    /// The set of principals to be granted reader role on the resource.
40603    pub readers: std::vec::Vec<std::string::String>,
40604
40605    /// Optional. The set of principals to be granted writer role on the resource.
40606    pub writers: std::vec::Vec<std::string::String>,
40607
40608    /// Optional. The set of principals to be granted owner role on the resource.
40609    pub owners: std::vec::Vec<std::string::String>,
40610
40611    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40612}
40613
40614impl ResourceAccessSpec {
40615    pub fn new() -> Self {
40616        std::default::Default::default()
40617    }
40618
40619    /// Sets the value of [readers][crate::model::ResourceAccessSpec::readers].
40620    ///
40621    /// # Example
40622    /// ```ignore,no_run
40623    /// # use google_cloud_dataplex_v1::model::ResourceAccessSpec;
40624    /// let x = ResourceAccessSpec::new().set_readers(["a", "b", "c"]);
40625    /// ```
40626    pub fn set_readers<T, V>(mut self, v: T) -> Self
40627    where
40628        T: std::iter::IntoIterator<Item = V>,
40629        V: std::convert::Into<std::string::String>,
40630    {
40631        use std::iter::Iterator;
40632        self.readers = v.into_iter().map(|i| i.into()).collect();
40633        self
40634    }
40635
40636    /// Sets the value of [writers][crate::model::ResourceAccessSpec::writers].
40637    ///
40638    /// # Example
40639    /// ```ignore,no_run
40640    /// # use google_cloud_dataplex_v1::model::ResourceAccessSpec;
40641    /// let x = ResourceAccessSpec::new().set_writers(["a", "b", "c"]);
40642    /// ```
40643    pub fn set_writers<T, V>(mut self, v: T) -> Self
40644    where
40645        T: std::iter::IntoIterator<Item = V>,
40646        V: std::convert::Into<std::string::String>,
40647    {
40648        use std::iter::Iterator;
40649        self.writers = v.into_iter().map(|i| i.into()).collect();
40650        self
40651    }
40652
40653    /// Sets the value of [owners][crate::model::ResourceAccessSpec::owners].
40654    ///
40655    /// # Example
40656    /// ```ignore,no_run
40657    /// # use google_cloud_dataplex_v1::model::ResourceAccessSpec;
40658    /// let x = ResourceAccessSpec::new().set_owners(["a", "b", "c"]);
40659    /// ```
40660    pub fn set_owners<T, V>(mut self, v: T) -> Self
40661    where
40662        T: std::iter::IntoIterator<Item = V>,
40663        V: std::convert::Into<std::string::String>,
40664    {
40665        use std::iter::Iterator;
40666        self.owners = v.into_iter().map(|i| i.into()).collect();
40667        self
40668    }
40669}
40670
40671impl wkt::message::Message for ResourceAccessSpec {
40672    fn typename() -> &'static str {
40673        "type.googleapis.com/google.cloud.dataplex.v1.ResourceAccessSpec"
40674    }
40675}
40676
40677/// DataAccessSpec holds the access control configuration to be enforced on data
40678/// stored within resources (eg: rows, columns in BigQuery Tables). When
40679/// associated with data, the data is only accessible to
40680/// principals explicitly granted access through the DataAccessSpec. Principals
40681/// with access to the containing resource are not implicitly granted access.
40682#[derive(Clone, Default, PartialEq)]
40683#[non_exhaustive]
40684pub struct DataAccessSpec {
40685    /// Optional. The format of strings follows the pattern followed by IAM in the
40686    /// bindings. user:{email}, serviceAccount:{email} group:{email}.
40687    /// The set of principals to be granted reader role on data
40688    /// stored within resources.
40689    pub readers: std::vec::Vec<std::string::String>,
40690
40691    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40692}
40693
40694impl DataAccessSpec {
40695    pub fn new() -> Self {
40696        std::default::Default::default()
40697    }
40698
40699    /// Sets the value of [readers][crate::model::DataAccessSpec::readers].
40700    ///
40701    /// # Example
40702    /// ```ignore,no_run
40703    /// # use google_cloud_dataplex_v1::model::DataAccessSpec;
40704    /// let x = DataAccessSpec::new().set_readers(["a", "b", "c"]);
40705    /// ```
40706    pub fn set_readers<T, V>(mut self, v: T) -> Self
40707    where
40708        T: std::iter::IntoIterator<Item = V>,
40709        V: std::convert::Into<std::string::String>,
40710    {
40711        use std::iter::Iterator;
40712        self.readers = v.into_iter().map(|i| i.into()).collect();
40713        self
40714    }
40715}
40716
40717impl wkt::message::Message for DataAccessSpec {
40718    fn typename() -> &'static str {
40719        "type.googleapis.com/google.cloud.dataplex.v1.DataAccessSpec"
40720    }
40721}
40722
40723/// Create lake request.
40724#[derive(Clone, Default, PartialEq)]
40725#[non_exhaustive]
40726pub struct CreateLakeRequest {
40727    /// Required. The resource name of the lake location, of the form:
40728    /// projects/{project_number}/locations/{location_id}
40729    /// where `location_id` refers to a Google Cloud region.
40730    pub parent: std::string::String,
40731
40732    /// Required. Lake identifier.
40733    /// This ID will be used to generate names such as database and dataset names
40734    /// when publishing metadata to Hive Metastore and BigQuery.
40735    ///
40736    /// * Must contain only lowercase letters, numbers and hyphens.
40737    /// * Must start with a letter.
40738    /// * Must end with a number or a letter.
40739    /// * Must be between 1-63 characters.
40740    /// * Must be unique within the customer project / location.
40741    pub lake_id: std::string::String,
40742
40743    /// Required. Lake resource
40744    pub lake: std::option::Option<crate::model::Lake>,
40745
40746    /// Optional. Only validate the request, but do not perform mutations.
40747    /// The default is false.
40748    pub validate_only: bool,
40749
40750    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40751}
40752
40753impl CreateLakeRequest {
40754    pub fn new() -> Self {
40755        std::default::Default::default()
40756    }
40757
40758    /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
40759    ///
40760    /// # Example
40761    /// ```ignore,no_run
40762    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40763    /// let x = CreateLakeRequest::new().set_parent("example");
40764    /// ```
40765    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40766        self.parent = v.into();
40767        self
40768    }
40769
40770    /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
40771    ///
40772    /// # Example
40773    /// ```ignore,no_run
40774    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40775    /// let x = CreateLakeRequest::new().set_lake_id("example");
40776    /// ```
40777    pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40778        self.lake_id = v.into();
40779        self
40780    }
40781
40782    /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
40783    ///
40784    /// # Example
40785    /// ```ignore,no_run
40786    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40787    /// use google_cloud_dataplex_v1::model::Lake;
40788    /// let x = CreateLakeRequest::new().set_lake(Lake::default()/* use setters */);
40789    /// ```
40790    pub fn set_lake<T>(mut self, v: T) -> Self
40791    where
40792        T: std::convert::Into<crate::model::Lake>,
40793    {
40794        self.lake = std::option::Option::Some(v.into());
40795        self
40796    }
40797
40798    /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
40799    ///
40800    /// # Example
40801    /// ```ignore,no_run
40802    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40803    /// use google_cloud_dataplex_v1::model::Lake;
40804    /// let x = CreateLakeRequest::new().set_or_clear_lake(Some(Lake::default()/* use setters */));
40805    /// let x = CreateLakeRequest::new().set_or_clear_lake(None::<Lake>);
40806    /// ```
40807    pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
40808    where
40809        T: std::convert::Into<crate::model::Lake>,
40810    {
40811        self.lake = v.map(|x| x.into());
40812        self
40813    }
40814
40815    /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
40816    ///
40817    /// # Example
40818    /// ```ignore,no_run
40819    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40820    /// let x = CreateLakeRequest::new().set_validate_only(true);
40821    /// ```
40822    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
40823        self.validate_only = v.into();
40824        self
40825    }
40826}
40827
40828impl wkt::message::Message for CreateLakeRequest {
40829    fn typename() -> &'static str {
40830        "type.googleapis.com/google.cloud.dataplex.v1.CreateLakeRequest"
40831    }
40832}
40833
40834/// Update lake request.
40835#[derive(Clone, Default, PartialEq)]
40836#[non_exhaustive]
40837pub struct UpdateLakeRequest {
40838    /// Required. Mask of fields to update.
40839    pub update_mask: std::option::Option<wkt::FieldMask>,
40840
40841    /// Required. Update description.
40842    /// Only fields specified in `update_mask` are updated.
40843    pub lake: std::option::Option<crate::model::Lake>,
40844
40845    /// Optional. Only validate the request, but do not perform mutations.
40846    /// The default is false.
40847    pub validate_only: bool,
40848
40849    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40850}
40851
40852impl UpdateLakeRequest {
40853    pub fn new() -> Self {
40854        std::default::Default::default()
40855    }
40856
40857    /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
40858    ///
40859    /// # Example
40860    /// ```ignore,no_run
40861    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40862    /// use wkt::FieldMask;
40863    /// let x = UpdateLakeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
40864    /// ```
40865    pub fn set_update_mask<T>(mut self, v: T) -> Self
40866    where
40867        T: std::convert::Into<wkt::FieldMask>,
40868    {
40869        self.update_mask = std::option::Option::Some(v.into());
40870        self
40871    }
40872
40873    /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
40874    ///
40875    /// # Example
40876    /// ```ignore,no_run
40877    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40878    /// use wkt::FieldMask;
40879    /// let x = UpdateLakeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
40880    /// let x = UpdateLakeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
40881    /// ```
40882    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
40883    where
40884        T: std::convert::Into<wkt::FieldMask>,
40885    {
40886        self.update_mask = v.map(|x| x.into());
40887        self
40888    }
40889
40890    /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
40891    ///
40892    /// # Example
40893    /// ```ignore,no_run
40894    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40895    /// use google_cloud_dataplex_v1::model::Lake;
40896    /// let x = UpdateLakeRequest::new().set_lake(Lake::default()/* use setters */);
40897    /// ```
40898    pub fn set_lake<T>(mut self, v: T) -> Self
40899    where
40900        T: std::convert::Into<crate::model::Lake>,
40901    {
40902        self.lake = std::option::Option::Some(v.into());
40903        self
40904    }
40905
40906    /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
40907    ///
40908    /// # Example
40909    /// ```ignore,no_run
40910    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40911    /// use google_cloud_dataplex_v1::model::Lake;
40912    /// let x = UpdateLakeRequest::new().set_or_clear_lake(Some(Lake::default()/* use setters */));
40913    /// let x = UpdateLakeRequest::new().set_or_clear_lake(None::<Lake>);
40914    /// ```
40915    pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
40916    where
40917        T: std::convert::Into<crate::model::Lake>,
40918    {
40919        self.lake = v.map(|x| x.into());
40920        self
40921    }
40922
40923    /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
40924    ///
40925    /// # Example
40926    /// ```ignore,no_run
40927    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40928    /// let x = UpdateLakeRequest::new().set_validate_only(true);
40929    /// ```
40930    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
40931        self.validate_only = v.into();
40932        self
40933    }
40934}
40935
40936impl wkt::message::Message for UpdateLakeRequest {
40937    fn typename() -> &'static str {
40938        "type.googleapis.com/google.cloud.dataplex.v1.UpdateLakeRequest"
40939    }
40940}
40941
40942/// Delete lake request.
40943#[derive(Clone, Default, PartialEq)]
40944#[non_exhaustive]
40945pub struct DeleteLakeRequest {
40946    /// Required. The resource name of the lake:
40947    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
40948    pub name: std::string::String,
40949
40950    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40951}
40952
40953impl DeleteLakeRequest {
40954    pub fn new() -> Self {
40955        std::default::Default::default()
40956    }
40957
40958    /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
40959    ///
40960    /// # Example
40961    /// ```ignore,no_run
40962    /// # use google_cloud_dataplex_v1::model::DeleteLakeRequest;
40963    /// let x = DeleteLakeRequest::new().set_name("example");
40964    /// ```
40965    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40966        self.name = v.into();
40967        self
40968    }
40969}
40970
40971impl wkt::message::Message for DeleteLakeRequest {
40972    fn typename() -> &'static str {
40973        "type.googleapis.com/google.cloud.dataplex.v1.DeleteLakeRequest"
40974    }
40975}
40976
40977/// List lakes request.
40978#[derive(Clone, Default, PartialEq)]
40979#[non_exhaustive]
40980pub struct ListLakesRequest {
40981    /// Required. The resource name of the lake location, of the form:
40982    /// `projects/{project_number}/locations/{location_id}`
40983    /// where `location_id` refers to a Google Cloud region.
40984    pub parent: std::string::String,
40985
40986    /// Optional. Maximum number of Lakes to return. The service may return fewer
40987    /// than this value. If unspecified, at most 10 lakes will be returned. The
40988    /// maximum value is 1000; values above 1000 will be coerced to 1000.
40989    pub page_size: i32,
40990
40991    /// Optional. Page token received from a previous `ListLakes` call. Provide
40992    /// this to retrieve the subsequent page. When paginating, all other parameters
40993    /// provided to `ListLakes` must match the call that provided the page token.
40994    pub page_token: std::string::String,
40995
40996    /// Optional. Filter request.
40997    pub filter: std::string::String,
40998
40999    /// Optional. Order by fields for the result.
41000    pub order_by: std::string::String,
41001
41002    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41003}
41004
41005impl ListLakesRequest {
41006    pub fn new() -> Self {
41007        std::default::Default::default()
41008    }
41009
41010    /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
41011    ///
41012    /// # Example
41013    /// ```ignore,no_run
41014    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41015    /// let x = ListLakesRequest::new().set_parent("example");
41016    /// ```
41017    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41018        self.parent = v.into();
41019        self
41020    }
41021
41022    /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
41023    ///
41024    /// # Example
41025    /// ```ignore,no_run
41026    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41027    /// let x = ListLakesRequest::new().set_page_size(42);
41028    /// ```
41029    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41030        self.page_size = v.into();
41031        self
41032    }
41033
41034    /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
41035    ///
41036    /// # Example
41037    /// ```ignore,no_run
41038    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41039    /// let x = ListLakesRequest::new().set_page_token("example");
41040    /// ```
41041    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41042        self.page_token = v.into();
41043        self
41044    }
41045
41046    /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
41047    ///
41048    /// # Example
41049    /// ```ignore,no_run
41050    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41051    /// let x = ListLakesRequest::new().set_filter("example");
41052    /// ```
41053    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41054        self.filter = v.into();
41055        self
41056    }
41057
41058    /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
41059    ///
41060    /// # Example
41061    /// ```ignore,no_run
41062    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41063    /// let x = ListLakesRequest::new().set_order_by("example");
41064    /// ```
41065    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41066        self.order_by = v.into();
41067        self
41068    }
41069}
41070
41071impl wkt::message::Message for ListLakesRequest {
41072    fn typename() -> &'static str {
41073        "type.googleapis.com/google.cloud.dataplex.v1.ListLakesRequest"
41074    }
41075}
41076
41077/// List lakes response.
41078#[derive(Clone, Default, PartialEq)]
41079#[non_exhaustive]
41080pub struct ListLakesResponse {
41081    /// Lakes under the given parent location.
41082    pub lakes: std::vec::Vec<crate::model::Lake>,
41083
41084    /// Token to retrieve the next page of results, or empty if there are no more
41085    /// results in the list.
41086    pub next_page_token: std::string::String,
41087
41088    /// Locations that could not be reached.
41089    pub unreachable_locations: std::vec::Vec<std::string::String>,
41090
41091    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41092}
41093
41094impl ListLakesResponse {
41095    pub fn new() -> Self {
41096        std::default::Default::default()
41097    }
41098
41099    /// Sets the value of [lakes][crate::model::ListLakesResponse::lakes].
41100    ///
41101    /// # Example
41102    /// ```ignore,no_run
41103    /// # use google_cloud_dataplex_v1::model::ListLakesResponse;
41104    /// use google_cloud_dataplex_v1::model::Lake;
41105    /// let x = ListLakesResponse::new()
41106    ///     .set_lakes([
41107    ///         Lake::default()/* use setters */,
41108    ///         Lake::default()/* use (different) setters */,
41109    ///     ]);
41110    /// ```
41111    pub fn set_lakes<T, V>(mut self, v: T) -> Self
41112    where
41113        T: std::iter::IntoIterator<Item = V>,
41114        V: std::convert::Into<crate::model::Lake>,
41115    {
41116        use std::iter::Iterator;
41117        self.lakes = v.into_iter().map(|i| i.into()).collect();
41118        self
41119    }
41120
41121    /// Sets the value of [next_page_token][crate::model::ListLakesResponse::next_page_token].
41122    ///
41123    /// # Example
41124    /// ```ignore,no_run
41125    /// # use google_cloud_dataplex_v1::model::ListLakesResponse;
41126    /// let x = ListLakesResponse::new().set_next_page_token("example");
41127    /// ```
41128    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41129        self.next_page_token = v.into();
41130        self
41131    }
41132
41133    /// Sets the value of [unreachable_locations][crate::model::ListLakesResponse::unreachable_locations].
41134    ///
41135    /// # Example
41136    /// ```ignore,no_run
41137    /// # use google_cloud_dataplex_v1::model::ListLakesResponse;
41138    /// let x = ListLakesResponse::new().set_unreachable_locations(["a", "b", "c"]);
41139    /// ```
41140    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
41141    where
41142        T: std::iter::IntoIterator<Item = V>,
41143        V: std::convert::Into<std::string::String>,
41144    {
41145        use std::iter::Iterator;
41146        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
41147        self
41148    }
41149}
41150
41151impl wkt::message::Message for ListLakesResponse {
41152    fn typename() -> &'static str {
41153        "type.googleapis.com/google.cloud.dataplex.v1.ListLakesResponse"
41154    }
41155}
41156
41157#[doc(hidden)]
41158impl gax::paginator::internal::PageableResponse for ListLakesResponse {
41159    type PageItem = crate::model::Lake;
41160
41161    fn items(self) -> std::vec::Vec<Self::PageItem> {
41162        self.lakes
41163    }
41164
41165    fn next_page_token(&self) -> std::string::String {
41166        use std::clone::Clone;
41167        self.next_page_token.clone()
41168    }
41169}
41170
41171/// List lake actions request.
41172#[derive(Clone, Default, PartialEq)]
41173#[non_exhaustive]
41174pub struct ListLakeActionsRequest {
41175    /// Required. The resource name of the parent lake:
41176    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41177    pub parent: std::string::String,
41178
41179    /// Optional. Maximum number of actions to return. The service may return fewer
41180    /// than this value. If unspecified, at most 10 actions will be returned. The
41181    /// maximum value is 1000; values above 1000 will be coerced to 1000.
41182    pub page_size: i32,
41183
41184    /// Optional. Page token received from a previous `ListLakeActions` call.
41185    /// Provide this to retrieve the subsequent page. When paginating, all other
41186    /// parameters provided to `ListLakeActions` must match the call that provided
41187    /// the page token.
41188    pub page_token: std::string::String,
41189
41190    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41191}
41192
41193impl ListLakeActionsRequest {
41194    pub fn new() -> Self {
41195        std::default::Default::default()
41196    }
41197
41198    /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
41199    ///
41200    /// # Example
41201    /// ```ignore,no_run
41202    /// # use google_cloud_dataplex_v1::model::ListLakeActionsRequest;
41203    /// let x = ListLakeActionsRequest::new().set_parent("example");
41204    /// ```
41205    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41206        self.parent = v.into();
41207        self
41208    }
41209
41210    /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
41211    ///
41212    /// # Example
41213    /// ```ignore,no_run
41214    /// # use google_cloud_dataplex_v1::model::ListLakeActionsRequest;
41215    /// let x = ListLakeActionsRequest::new().set_page_size(42);
41216    /// ```
41217    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41218        self.page_size = v.into();
41219        self
41220    }
41221
41222    /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
41223    ///
41224    /// # Example
41225    /// ```ignore,no_run
41226    /// # use google_cloud_dataplex_v1::model::ListLakeActionsRequest;
41227    /// let x = ListLakeActionsRequest::new().set_page_token("example");
41228    /// ```
41229    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41230        self.page_token = v.into();
41231        self
41232    }
41233}
41234
41235impl wkt::message::Message for ListLakeActionsRequest {
41236    fn typename() -> &'static str {
41237        "type.googleapis.com/google.cloud.dataplex.v1.ListLakeActionsRequest"
41238    }
41239}
41240
41241/// List actions response.
41242#[derive(Clone, Default, PartialEq)]
41243#[non_exhaustive]
41244pub struct ListActionsResponse {
41245    /// Actions under the given parent lake/zone/asset.
41246    pub actions: std::vec::Vec<crate::model::Action>,
41247
41248    /// Token to retrieve the next page of results, or empty if there are no more
41249    /// results in the list.
41250    pub next_page_token: std::string::String,
41251
41252    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41253}
41254
41255impl ListActionsResponse {
41256    pub fn new() -> Self {
41257        std::default::Default::default()
41258    }
41259
41260    /// Sets the value of [actions][crate::model::ListActionsResponse::actions].
41261    ///
41262    /// # Example
41263    /// ```ignore,no_run
41264    /// # use google_cloud_dataplex_v1::model::ListActionsResponse;
41265    /// use google_cloud_dataplex_v1::model::Action;
41266    /// let x = ListActionsResponse::new()
41267    ///     .set_actions([
41268    ///         Action::default()/* use setters */,
41269    ///         Action::default()/* use (different) setters */,
41270    ///     ]);
41271    /// ```
41272    pub fn set_actions<T, V>(mut self, v: T) -> Self
41273    where
41274        T: std::iter::IntoIterator<Item = V>,
41275        V: std::convert::Into<crate::model::Action>,
41276    {
41277        use std::iter::Iterator;
41278        self.actions = v.into_iter().map(|i| i.into()).collect();
41279        self
41280    }
41281
41282    /// Sets the value of [next_page_token][crate::model::ListActionsResponse::next_page_token].
41283    ///
41284    /// # Example
41285    /// ```ignore,no_run
41286    /// # use google_cloud_dataplex_v1::model::ListActionsResponse;
41287    /// let x = ListActionsResponse::new().set_next_page_token("example");
41288    /// ```
41289    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41290        self.next_page_token = v.into();
41291        self
41292    }
41293}
41294
41295impl wkt::message::Message for ListActionsResponse {
41296    fn typename() -> &'static str {
41297        "type.googleapis.com/google.cloud.dataplex.v1.ListActionsResponse"
41298    }
41299}
41300
41301#[doc(hidden)]
41302impl gax::paginator::internal::PageableResponse for ListActionsResponse {
41303    type PageItem = crate::model::Action;
41304
41305    fn items(self) -> std::vec::Vec<Self::PageItem> {
41306        self.actions
41307    }
41308
41309    fn next_page_token(&self) -> std::string::String {
41310        use std::clone::Clone;
41311        self.next_page_token.clone()
41312    }
41313}
41314
41315/// Get lake request.
41316#[derive(Clone, Default, PartialEq)]
41317#[non_exhaustive]
41318pub struct GetLakeRequest {
41319    /// Required. The resource name of the lake:
41320    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41321    pub name: std::string::String,
41322
41323    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41324}
41325
41326impl GetLakeRequest {
41327    pub fn new() -> Self {
41328        std::default::Default::default()
41329    }
41330
41331    /// Sets the value of [name][crate::model::GetLakeRequest::name].
41332    ///
41333    /// # Example
41334    /// ```ignore,no_run
41335    /// # use google_cloud_dataplex_v1::model::GetLakeRequest;
41336    /// let x = GetLakeRequest::new().set_name("example");
41337    /// ```
41338    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41339        self.name = v.into();
41340        self
41341    }
41342}
41343
41344impl wkt::message::Message for GetLakeRequest {
41345    fn typename() -> &'static str {
41346        "type.googleapis.com/google.cloud.dataplex.v1.GetLakeRequest"
41347    }
41348}
41349
41350/// Create zone request.
41351#[derive(Clone, Default, PartialEq)]
41352#[non_exhaustive]
41353pub struct CreateZoneRequest {
41354    /// Required. The resource name of the parent lake:
41355    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41356    pub parent: std::string::String,
41357
41358    /// Required. Zone identifier.
41359    /// This ID will be used to generate names such as database and dataset names
41360    /// when publishing metadata to Hive Metastore and BigQuery.
41361    ///
41362    /// * Must contain only lowercase letters, numbers and hyphens.
41363    /// * Must start with a letter.
41364    /// * Must end with a number or a letter.
41365    /// * Must be between 1-63 characters.
41366    /// * Must be unique across all lakes from all locations in a project.
41367    /// * Must not be one of the reserved IDs (i.e. "default", "global-temp")
41368    pub zone_id: std::string::String,
41369
41370    /// Required. Zone resource.
41371    pub zone: std::option::Option<crate::model::Zone>,
41372
41373    /// Optional. Only validate the request, but do not perform mutations.
41374    /// The default is false.
41375    pub validate_only: bool,
41376
41377    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41378}
41379
41380impl CreateZoneRequest {
41381    pub fn new() -> Self {
41382        std::default::Default::default()
41383    }
41384
41385    /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
41386    ///
41387    /// # Example
41388    /// ```ignore,no_run
41389    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41390    /// let x = CreateZoneRequest::new().set_parent("example");
41391    /// ```
41392    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41393        self.parent = v.into();
41394        self
41395    }
41396
41397    /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
41398    ///
41399    /// # Example
41400    /// ```ignore,no_run
41401    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41402    /// let x = CreateZoneRequest::new().set_zone_id("example");
41403    /// ```
41404    pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41405        self.zone_id = v.into();
41406        self
41407    }
41408
41409    /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
41410    ///
41411    /// # Example
41412    /// ```ignore,no_run
41413    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41414    /// use google_cloud_dataplex_v1::model::Zone;
41415    /// let x = CreateZoneRequest::new().set_zone(Zone::default()/* use setters */);
41416    /// ```
41417    pub fn set_zone<T>(mut self, v: T) -> Self
41418    where
41419        T: std::convert::Into<crate::model::Zone>,
41420    {
41421        self.zone = std::option::Option::Some(v.into());
41422        self
41423    }
41424
41425    /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
41426    ///
41427    /// # Example
41428    /// ```ignore,no_run
41429    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41430    /// use google_cloud_dataplex_v1::model::Zone;
41431    /// let x = CreateZoneRequest::new().set_or_clear_zone(Some(Zone::default()/* use setters */));
41432    /// let x = CreateZoneRequest::new().set_or_clear_zone(None::<Zone>);
41433    /// ```
41434    pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
41435    where
41436        T: std::convert::Into<crate::model::Zone>,
41437    {
41438        self.zone = v.map(|x| x.into());
41439        self
41440    }
41441
41442    /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
41443    ///
41444    /// # Example
41445    /// ```ignore,no_run
41446    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41447    /// let x = CreateZoneRequest::new().set_validate_only(true);
41448    /// ```
41449    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41450        self.validate_only = v.into();
41451        self
41452    }
41453}
41454
41455impl wkt::message::Message for CreateZoneRequest {
41456    fn typename() -> &'static str {
41457        "type.googleapis.com/google.cloud.dataplex.v1.CreateZoneRequest"
41458    }
41459}
41460
41461/// Update zone request.
41462#[derive(Clone, Default, PartialEq)]
41463#[non_exhaustive]
41464pub struct UpdateZoneRequest {
41465    /// Required. Mask of fields to update.
41466    pub update_mask: std::option::Option<wkt::FieldMask>,
41467
41468    /// Required. Update description.
41469    /// Only fields specified in `update_mask` are updated.
41470    pub zone: std::option::Option<crate::model::Zone>,
41471
41472    /// Optional. Only validate the request, but do not perform mutations.
41473    /// The default is false.
41474    pub validate_only: bool,
41475
41476    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41477}
41478
41479impl UpdateZoneRequest {
41480    pub fn new() -> Self {
41481        std::default::Default::default()
41482    }
41483
41484    /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
41485    ///
41486    /// # Example
41487    /// ```ignore,no_run
41488    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41489    /// use wkt::FieldMask;
41490    /// let x = UpdateZoneRequest::new().set_update_mask(FieldMask::default()/* use setters */);
41491    /// ```
41492    pub fn set_update_mask<T>(mut self, v: T) -> Self
41493    where
41494        T: std::convert::Into<wkt::FieldMask>,
41495    {
41496        self.update_mask = std::option::Option::Some(v.into());
41497        self
41498    }
41499
41500    /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
41501    ///
41502    /// # Example
41503    /// ```ignore,no_run
41504    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41505    /// use wkt::FieldMask;
41506    /// let x = UpdateZoneRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
41507    /// let x = UpdateZoneRequest::new().set_or_clear_update_mask(None::<FieldMask>);
41508    /// ```
41509    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
41510    where
41511        T: std::convert::Into<wkt::FieldMask>,
41512    {
41513        self.update_mask = v.map(|x| x.into());
41514        self
41515    }
41516
41517    /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
41518    ///
41519    /// # Example
41520    /// ```ignore,no_run
41521    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41522    /// use google_cloud_dataplex_v1::model::Zone;
41523    /// let x = UpdateZoneRequest::new().set_zone(Zone::default()/* use setters */);
41524    /// ```
41525    pub fn set_zone<T>(mut self, v: T) -> Self
41526    where
41527        T: std::convert::Into<crate::model::Zone>,
41528    {
41529        self.zone = std::option::Option::Some(v.into());
41530        self
41531    }
41532
41533    /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
41534    ///
41535    /// # Example
41536    /// ```ignore,no_run
41537    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41538    /// use google_cloud_dataplex_v1::model::Zone;
41539    /// let x = UpdateZoneRequest::new().set_or_clear_zone(Some(Zone::default()/* use setters */));
41540    /// let x = UpdateZoneRequest::new().set_or_clear_zone(None::<Zone>);
41541    /// ```
41542    pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
41543    where
41544        T: std::convert::Into<crate::model::Zone>,
41545    {
41546        self.zone = v.map(|x| x.into());
41547        self
41548    }
41549
41550    /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
41551    ///
41552    /// # Example
41553    /// ```ignore,no_run
41554    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41555    /// let x = UpdateZoneRequest::new().set_validate_only(true);
41556    /// ```
41557    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41558        self.validate_only = v.into();
41559        self
41560    }
41561}
41562
41563impl wkt::message::Message for UpdateZoneRequest {
41564    fn typename() -> &'static str {
41565        "type.googleapis.com/google.cloud.dataplex.v1.UpdateZoneRequest"
41566    }
41567}
41568
41569/// Delete zone request.
41570#[derive(Clone, Default, PartialEq)]
41571#[non_exhaustive]
41572pub struct DeleteZoneRequest {
41573    /// Required. The resource name of the zone:
41574    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41575    pub name: std::string::String,
41576
41577    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41578}
41579
41580impl DeleteZoneRequest {
41581    pub fn new() -> Self {
41582        std::default::Default::default()
41583    }
41584
41585    /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
41586    ///
41587    /// # Example
41588    /// ```ignore,no_run
41589    /// # use google_cloud_dataplex_v1::model::DeleteZoneRequest;
41590    /// let x = DeleteZoneRequest::new().set_name("example");
41591    /// ```
41592    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41593        self.name = v.into();
41594        self
41595    }
41596}
41597
41598impl wkt::message::Message for DeleteZoneRequest {
41599    fn typename() -> &'static str {
41600        "type.googleapis.com/google.cloud.dataplex.v1.DeleteZoneRequest"
41601    }
41602}
41603
41604/// List zones request.
41605#[derive(Clone, Default, PartialEq)]
41606#[non_exhaustive]
41607pub struct ListZonesRequest {
41608    /// Required. The resource name of the parent lake:
41609    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41610    pub parent: std::string::String,
41611
41612    /// Optional. Maximum number of zones to return. The service may return fewer
41613    /// than this value. If unspecified, at most 10 zones will be returned. The
41614    /// maximum value is 1000; values above 1000 will be coerced to 1000.
41615    pub page_size: i32,
41616
41617    /// Optional. Page token received from a previous `ListZones` call. Provide
41618    /// this to retrieve the subsequent page. When paginating, all other parameters
41619    /// provided to `ListZones` must match the call that provided the page token.
41620    pub page_token: std::string::String,
41621
41622    /// Optional. Filter request.
41623    pub filter: std::string::String,
41624
41625    /// Optional. Order by fields for the result.
41626    pub order_by: std::string::String,
41627
41628    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41629}
41630
41631impl ListZonesRequest {
41632    pub fn new() -> Self {
41633        std::default::Default::default()
41634    }
41635
41636    /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
41637    ///
41638    /// # Example
41639    /// ```ignore,no_run
41640    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41641    /// let x = ListZonesRequest::new().set_parent("example");
41642    /// ```
41643    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41644        self.parent = v.into();
41645        self
41646    }
41647
41648    /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
41649    ///
41650    /// # Example
41651    /// ```ignore,no_run
41652    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41653    /// let x = ListZonesRequest::new().set_page_size(42);
41654    /// ```
41655    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41656        self.page_size = v.into();
41657        self
41658    }
41659
41660    /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
41661    ///
41662    /// # Example
41663    /// ```ignore,no_run
41664    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41665    /// let x = ListZonesRequest::new().set_page_token("example");
41666    /// ```
41667    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41668        self.page_token = v.into();
41669        self
41670    }
41671
41672    /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
41673    ///
41674    /// # Example
41675    /// ```ignore,no_run
41676    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41677    /// let x = ListZonesRequest::new().set_filter("example");
41678    /// ```
41679    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41680        self.filter = v.into();
41681        self
41682    }
41683
41684    /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
41685    ///
41686    /// # Example
41687    /// ```ignore,no_run
41688    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41689    /// let x = ListZonesRequest::new().set_order_by("example");
41690    /// ```
41691    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41692        self.order_by = v.into();
41693        self
41694    }
41695}
41696
41697impl wkt::message::Message for ListZonesRequest {
41698    fn typename() -> &'static str {
41699        "type.googleapis.com/google.cloud.dataplex.v1.ListZonesRequest"
41700    }
41701}
41702
41703/// List zones response.
41704#[derive(Clone, Default, PartialEq)]
41705#[non_exhaustive]
41706pub struct ListZonesResponse {
41707    /// Zones under the given parent lake.
41708    pub zones: std::vec::Vec<crate::model::Zone>,
41709
41710    /// Token to retrieve the next page of results, or empty if there are no more
41711    /// results in the list.
41712    pub next_page_token: std::string::String,
41713
41714    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41715}
41716
41717impl ListZonesResponse {
41718    pub fn new() -> Self {
41719        std::default::Default::default()
41720    }
41721
41722    /// Sets the value of [zones][crate::model::ListZonesResponse::zones].
41723    ///
41724    /// # Example
41725    /// ```ignore,no_run
41726    /// # use google_cloud_dataplex_v1::model::ListZonesResponse;
41727    /// use google_cloud_dataplex_v1::model::Zone;
41728    /// let x = ListZonesResponse::new()
41729    ///     .set_zones([
41730    ///         Zone::default()/* use setters */,
41731    ///         Zone::default()/* use (different) setters */,
41732    ///     ]);
41733    /// ```
41734    pub fn set_zones<T, V>(mut self, v: T) -> Self
41735    where
41736        T: std::iter::IntoIterator<Item = V>,
41737        V: std::convert::Into<crate::model::Zone>,
41738    {
41739        use std::iter::Iterator;
41740        self.zones = v.into_iter().map(|i| i.into()).collect();
41741        self
41742    }
41743
41744    /// Sets the value of [next_page_token][crate::model::ListZonesResponse::next_page_token].
41745    ///
41746    /// # Example
41747    /// ```ignore,no_run
41748    /// # use google_cloud_dataplex_v1::model::ListZonesResponse;
41749    /// let x = ListZonesResponse::new().set_next_page_token("example");
41750    /// ```
41751    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41752        self.next_page_token = v.into();
41753        self
41754    }
41755}
41756
41757impl wkt::message::Message for ListZonesResponse {
41758    fn typename() -> &'static str {
41759        "type.googleapis.com/google.cloud.dataplex.v1.ListZonesResponse"
41760    }
41761}
41762
41763#[doc(hidden)]
41764impl gax::paginator::internal::PageableResponse for ListZonesResponse {
41765    type PageItem = crate::model::Zone;
41766
41767    fn items(self) -> std::vec::Vec<Self::PageItem> {
41768        self.zones
41769    }
41770
41771    fn next_page_token(&self) -> std::string::String {
41772        use std::clone::Clone;
41773        self.next_page_token.clone()
41774    }
41775}
41776
41777/// List zone actions request.
41778#[derive(Clone, Default, PartialEq)]
41779#[non_exhaustive]
41780pub struct ListZoneActionsRequest {
41781    /// Required. The resource name of the parent zone:
41782    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41783    pub parent: std::string::String,
41784
41785    /// Optional. Maximum number of actions to return. The service may return fewer
41786    /// than this value. If unspecified, at most 10 actions will be returned. The
41787    /// maximum value is 1000; values above 1000 will be coerced to 1000.
41788    pub page_size: i32,
41789
41790    /// Optional. Page token received from a previous `ListZoneActions` call.
41791    /// Provide this to retrieve the subsequent page. When paginating, all other
41792    /// parameters provided to `ListZoneActions` must match the call that provided
41793    /// the page token.
41794    pub page_token: std::string::String,
41795
41796    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41797}
41798
41799impl ListZoneActionsRequest {
41800    pub fn new() -> Self {
41801        std::default::Default::default()
41802    }
41803
41804    /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
41805    ///
41806    /// # Example
41807    /// ```ignore,no_run
41808    /// # use google_cloud_dataplex_v1::model::ListZoneActionsRequest;
41809    /// let x = ListZoneActionsRequest::new().set_parent("example");
41810    /// ```
41811    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41812        self.parent = v.into();
41813        self
41814    }
41815
41816    /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
41817    ///
41818    /// # Example
41819    /// ```ignore,no_run
41820    /// # use google_cloud_dataplex_v1::model::ListZoneActionsRequest;
41821    /// let x = ListZoneActionsRequest::new().set_page_size(42);
41822    /// ```
41823    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41824        self.page_size = v.into();
41825        self
41826    }
41827
41828    /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
41829    ///
41830    /// # Example
41831    /// ```ignore,no_run
41832    /// # use google_cloud_dataplex_v1::model::ListZoneActionsRequest;
41833    /// let x = ListZoneActionsRequest::new().set_page_token("example");
41834    /// ```
41835    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41836        self.page_token = v.into();
41837        self
41838    }
41839}
41840
41841impl wkt::message::Message for ListZoneActionsRequest {
41842    fn typename() -> &'static str {
41843        "type.googleapis.com/google.cloud.dataplex.v1.ListZoneActionsRequest"
41844    }
41845}
41846
41847/// Get zone request.
41848#[derive(Clone, Default, PartialEq)]
41849#[non_exhaustive]
41850pub struct GetZoneRequest {
41851    /// Required. The resource name of the zone:
41852    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41853    pub name: std::string::String,
41854
41855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41856}
41857
41858impl GetZoneRequest {
41859    pub fn new() -> Self {
41860        std::default::Default::default()
41861    }
41862
41863    /// Sets the value of [name][crate::model::GetZoneRequest::name].
41864    ///
41865    /// # Example
41866    /// ```ignore,no_run
41867    /// # use google_cloud_dataplex_v1::model::GetZoneRequest;
41868    /// let x = GetZoneRequest::new().set_name("example");
41869    /// ```
41870    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41871        self.name = v.into();
41872        self
41873    }
41874}
41875
41876impl wkt::message::Message for GetZoneRequest {
41877    fn typename() -> &'static str {
41878        "type.googleapis.com/google.cloud.dataplex.v1.GetZoneRequest"
41879    }
41880}
41881
41882/// Create asset request.
41883#[derive(Clone, Default, PartialEq)]
41884#[non_exhaustive]
41885pub struct CreateAssetRequest {
41886    /// Required. The resource name of the parent zone:
41887    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41888    pub parent: std::string::String,
41889
41890    /// Required. Asset identifier.
41891    /// This ID will be used to generate names such as table names when publishing
41892    /// metadata to Hive Metastore and BigQuery.
41893    ///
41894    /// * Must contain only lowercase letters, numbers and hyphens.
41895    /// * Must start with a letter.
41896    /// * Must end with a number or a letter.
41897    /// * Must be between 1-63 characters.
41898    /// * Must be unique within the zone.
41899    pub asset_id: std::string::String,
41900
41901    /// Required. Asset resource.
41902    pub asset: std::option::Option<crate::model::Asset>,
41903
41904    /// Optional. Only validate the request, but do not perform mutations.
41905    /// The default is false.
41906    pub validate_only: bool,
41907
41908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41909}
41910
41911impl CreateAssetRequest {
41912    pub fn new() -> Self {
41913        std::default::Default::default()
41914    }
41915
41916    /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
41917    ///
41918    /// # Example
41919    /// ```ignore,no_run
41920    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41921    /// let x = CreateAssetRequest::new().set_parent("example");
41922    /// ```
41923    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41924        self.parent = v.into();
41925        self
41926    }
41927
41928    /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
41929    ///
41930    /// # Example
41931    /// ```ignore,no_run
41932    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41933    /// let x = CreateAssetRequest::new().set_asset_id("example");
41934    /// ```
41935    pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41936        self.asset_id = v.into();
41937        self
41938    }
41939
41940    /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
41941    ///
41942    /// # Example
41943    /// ```ignore,no_run
41944    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41945    /// use google_cloud_dataplex_v1::model::Asset;
41946    /// let x = CreateAssetRequest::new().set_asset(Asset::default()/* use setters */);
41947    /// ```
41948    pub fn set_asset<T>(mut self, v: T) -> Self
41949    where
41950        T: std::convert::Into<crate::model::Asset>,
41951    {
41952        self.asset = std::option::Option::Some(v.into());
41953        self
41954    }
41955
41956    /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
41957    ///
41958    /// # Example
41959    /// ```ignore,no_run
41960    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41961    /// use google_cloud_dataplex_v1::model::Asset;
41962    /// let x = CreateAssetRequest::new().set_or_clear_asset(Some(Asset::default()/* use setters */));
41963    /// let x = CreateAssetRequest::new().set_or_clear_asset(None::<Asset>);
41964    /// ```
41965    pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
41966    where
41967        T: std::convert::Into<crate::model::Asset>,
41968    {
41969        self.asset = v.map(|x| x.into());
41970        self
41971    }
41972
41973    /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
41974    ///
41975    /// # Example
41976    /// ```ignore,no_run
41977    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41978    /// let x = CreateAssetRequest::new().set_validate_only(true);
41979    /// ```
41980    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41981        self.validate_only = v.into();
41982        self
41983    }
41984}
41985
41986impl wkt::message::Message for CreateAssetRequest {
41987    fn typename() -> &'static str {
41988        "type.googleapis.com/google.cloud.dataplex.v1.CreateAssetRequest"
41989    }
41990}
41991
41992/// Update asset request.
41993#[derive(Clone, Default, PartialEq)]
41994#[non_exhaustive]
41995pub struct UpdateAssetRequest {
41996    /// Required. Mask of fields to update.
41997    pub update_mask: std::option::Option<wkt::FieldMask>,
41998
41999    /// Required. Update description.
42000    /// Only fields specified in `update_mask` are updated.
42001    pub asset: std::option::Option<crate::model::Asset>,
42002
42003    /// Optional. Only validate the request, but do not perform mutations.
42004    /// The default is false.
42005    pub validate_only: bool,
42006
42007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42008}
42009
42010impl UpdateAssetRequest {
42011    pub fn new() -> Self {
42012        std::default::Default::default()
42013    }
42014
42015    /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
42016    ///
42017    /// # Example
42018    /// ```ignore,no_run
42019    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42020    /// use wkt::FieldMask;
42021    /// let x = UpdateAssetRequest::new().set_update_mask(FieldMask::default()/* use setters */);
42022    /// ```
42023    pub fn set_update_mask<T>(mut self, v: T) -> Self
42024    where
42025        T: std::convert::Into<wkt::FieldMask>,
42026    {
42027        self.update_mask = std::option::Option::Some(v.into());
42028        self
42029    }
42030
42031    /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
42032    ///
42033    /// # Example
42034    /// ```ignore,no_run
42035    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42036    /// use wkt::FieldMask;
42037    /// let x = UpdateAssetRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
42038    /// let x = UpdateAssetRequest::new().set_or_clear_update_mask(None::<FieldMask>);
42039    /// ```
42040    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
42041    where
42042        T: std::convert::Into<wkt::FieldMask>,
42043    {
42044        self.update_mask = v.map(|x| x.into());
42045        self
42046    }
42047
42048    /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
42049    ///
42050    /// # Example
42051    /// ```ignore,no_run
42052    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42053    /// use google_cloud_dataplex_v1::model::Asset;
42054    /// let x = UpdateAssetRequest::new().set_asset(Asset::default()/* use setters */);
42055    /// ```
42056    pub fn set_asset<T>(mut self, v: T) -> Self
42057    where
42058        T: std::convert::Into<crate::model::Asset>,
42059    {
42060        self.asset = std::option::Option::Some(v.into());
42061        self
42062    }
42063
42064    /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
42065    ///
42066    /// # Example
42067    /// ```ignore,no_run
42068    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42069    /// use google_cloud_dataplex_v1::model::Asset;
42070    /// let x = UpdateAssetRequest::new().set_or_clear_asset(Some(Asset::default()/* use setters */));
42071    /// let x = UpdateAssetRequest::new().set_or_clear_asset(None::<Asset>);
42072    /// ```
42073    pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
42074    where
42075        T: std::convert::Into<crate::model::Asset>,
42076    {
42077        self.asset = v.map(|x| x.into());
42078        self
42079    }
42080
42081    /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
42082    ///
42083    /// # Example
42084    /// ```ignore,no_run
42085    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42086    /// let x = UpdateAssetRequest::new().set_validate_only(true);
42087    /// ```
42088    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42089        self.validate_only = v.into();
42090        self
42091    }
42092}
42093
42094impl wkt::message::Message for UpdateAssetRequest {
42095    fn typename() -> &'static str {
42096        "type.googleapis.com/google.cloud.dataplex.v1.UpdateAssetRequest"
42097    }
42098}
42099
42100/// Delete asset request.
42101#[derive(Clone, Default, PartialEq)]
42102#[non_exhaustive]
42103pub struct DeleteAssetRequest {
42104    /// Required. The resource name of the asset:
42105    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
42106    pub name: std::string::String,
42107
42108    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42109}
42110
42111impl DeleteAssetRequest {
42112    pub fn new() -> Self {
42113        std::default::Default::default()
42114    }
42115
42116    /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
42117    ///
42118    /// # Example
42119    /// ```ignore,no_run
42120    /// # use google_cloud_dataplex_v1::model::DeleteAssetRequest;
42121    /// let x = DeleteAssetRequest::new().set_name("example");
42122    /// ```
42123    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42124        self.name = v.into();
42125        self
42126    }
42127}
42128
42129impl wkt::message::Message for DeleteAssetRequest {
42130    fn typename() -> &'static str {
42131        "type.googleapis.com/google.cloud.dataplex.v1.DeleteAssetRequest"
42132    }
42133}
42134
42135/// List assets request.
42136#[derive(Clone, Default, PartialEq)]
42137#[non_exhaustive]
42138pub struct ListAssetsRequest {
42139    /// Required. The resource name of the parent zone:
42140    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
42141    pub parent: std::string::String,
42142
42143    /// Optional. Maximum number of asset to return. The service may return fewer
42144    /// than this value. If unspecified, at most 10 assets will be returned. The
42145    /// maximum value is 1000; values above 1000 will be coerced to 1000.
42146    pub page_size: i32,
42147
42148    /// Optional. Page token received from a previous `ListAssets` call. Provide
42149    /// this to retrieve the subsequent page. When paginating, all other parameters
42150    /// provided to `ListAssets` must match the call that provided the page
42151    /// token.
42152    pub page_token: std::string::String,
42153
42154    /// Optional. Filter request.
42155    pub filter: std::string::String,
42156
42157    /// Optional. Order by fields for the result.
42158    pub order_by: std::string::String,
42159
42160    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42161}
42162
42163impl ListAssetsRequest {
42164    pub fn new() -> Self {
42165        std::default::Default::default()
42166    }
42167
42168    /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
42169    ///
42170    /// # Example
42171    /// ```ignore,no_run
42172    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42173    /// let x = ListAssetsRequest::new().set_parent("example");
42174    /// ```
42175    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42176        self.parent = v.into();
42177        self
42178    }
42179
42180    /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
42181    ///
42182    /// # Example
42183    /// ```ignore,no_run
42184    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42185    /// let x = ListAssetsRequest::new().set_page_size(42);
42186    /// ```
42187    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
42188        self.page_size = v.into();
42189        self
42190    }
42191
42192    /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
42193    ///
42194    /// # Example
42195    /// ```ignore,no_run
42196    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42197    /// let x = ListAssetsRequest::new().set_page_token("example");
42198    /// ```
42199    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42200        self.page_token = v.into();
42201        self
42202    }
42203
42204    /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
42205    ///
42206    /// # Example
42207    /// ```ignore,no_run
42208    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42209    /// let x = ListAssetsRequest::new().set_filter("example");
42210    /// ```
42211    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42212        self.filter = v.into();
42213        self
42214    }
42215
42216    /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
42217    ///
42218    /// # Example
42219    /// ```ignore,no_run
42220    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42221    /// let x = ListAssetsRequest::new().set_order_by("example");
42222    /// ```
42223    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42224        self.order_by = v.into();
42225        self
42226    }
42227}
42228
42229impl wkt::message::Message for ListAssetsRequest {
42230    fn typename() -> &'static str {
42231        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsRequest"
42232    }
42233}
42234
42235/// List assets response.
42236#[derive(Clone, Default, PartialEq)]
42237#[non_exhaustive]
42238pub struct ListAssetsResponse {
42239    /// Asset under the given parent zone.
42240    pub assets: std::vec::Vec<crate::model::Asset>,
42241
42242    /// Token to retrieve the next page of results, or empty if there are no more
42243    /// results in the list.
42244    pub next_page_token: std::string::String,
42245
42246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42247}
42248
42249impl ListAssetsResponse {
42250    pub fn new() -> Self {
42251        std::default::Default::default()
42252    }
42253
42254    /// Sets the value of [assets][crate::model::ListAssetsResponse::assets].
42255    ///
42256    /// # Example
42257    /// ```ignore,no_run
42258    /// # use google_cloud_dataplex_v1::model::ListAssetsResponse;
42259    /// use google_cloud_dataplex_v1::model::Asset;
42260    /// let x = ListAssetsResponse::new()
42261    ///     .set_assets([
42262    ///         Asset::default()/* use setters */,
42263    ///         Asset::default()/* use (different) setters */,
42264    ///     ]);
42265    /// ```
42266    pub fn set_assets<T, V>(mut self, v: T) -> Self
42267    where
42268        T: std::iter::IntoIterator<Item = V>,
42269        V: std::convert::Into<crate::model::Asset>,
42270    {
42271        use std::iter::Iterator;
42272        self.assets = v.into_iter().map(|i| i.into()).collect();
42273        self
42274    }
42275
42276    /// Sets the value of [next_page_token][crate::model::ListAssetsResponse::next_page_token].
42277    ///
42278    /// # Example
42279    /// ```ignore,no_run
42280    /// # use google_cloud_dataplex_v1::model::ListAssetsResponse;
42281    /// let x = ListAssetsResponse::new().set_next_page_token("example");
42282    /// ```
42283    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42284        self.next_page_token = v.into();
42285        self
42286    }
42287}
42288
42289impl wkt::message::Message for ListAssetsResponse {
42290    fn typename() -> &'static str {
42291        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsResponse"
42292    }
42293}
42294
42295#[doc(hidden)]
42296impl gax::paginator::internal::PageableResponse for ListAssetsResponse {
42297    type PageItem = crate::model::Asset;
42298
42299    fn items(self) -> std::vec::Vec<Self::PageItem> {
42300        self.assets
42301    }
42302
42303    fn next_page_token(&self) -> std::string::String {
42304        use std::clone::Clone;
42305        self.next_page_token.clone()
42306    }
42307}
42308
42309/// List asset actions request.
42310#[derive(Clone, Default, PartialEq)]
42311#[non_exhaustive]
42312pub struct ListAssetActionsRequest {
42313    /// Required. The resource name of the parent asset:
42314    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
42315    pub parent: std::string::String,
42316
42317    /// Optional. Maximum number of actions to return. The service may return fewer
42318    /// than this value. If unspecified, at most 10 actions will be returned. The
42319    /// maximum value is 1000; values above 1000 will be coerced to 1000.
42320    pub page_size: i32,
42321
42322    /// Optional. Page token received from a previous `ListAssetActions` call.
42323    /// Provide this to retrieve the subsequent page. When paginating, all other
42324    /// parameters provided to `ListAssetActions` must match the call that provided
42325    /// the page token.
42326    pub page_token: std::string::String,
42327
42328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42329}
42330
42331impl ListAssetActionsRequest {
42332    pub fn new() -> Self {
42333        std::default::Default::default()
42334    }
42335
42336    /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
42337    ///
42338    /// # Example
42339    /// ```ignore,no_run
42340    /// # use google_cloud_dataplex_v1::model::ListAssetActionsRequest;
42341    /// let x = ListAssetActionsRequest::new().set_parent("example");
42342    /// ```
42343    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42344        self.parent = v.into();
42345        self
42346    }
42347
42348    /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
42349    ///
42350    /// # Example
42351    /// ```ignore,no_run
42352    /// # use google_cloud_dataplex_v1::model::ListAssetActionsRequest;
42353    /// let x = ListAssetActionsRequest::new().set_page_size(42);
42354    /// ```
42355    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
42356        self.page_size = v.into();
42357        self
42358    }
42359
42360    /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
42361    ///
42362    /// # Example
42363    /// ```ignore,no_run
42364    /// # use google_cloud_dataplex_v1::model::ListAssetActionsRequest;
42365    /// let x = ListAssetActionsRequest::new().set_page_token("example");
42366    /// ```
42367    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42368        self.page_token = v.into();
42369        self
42370    }
42371}
42372
42373impl wkt::message::Message for ListAssetActionsRequest {
42374    fn typename() -> &'static str {
42375        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetActionsRequest"
42376    }
42377}
42378
42379/// Get asset request.
42380#[derive(Clone, Default, PartialEq)]
42381#[non_exhaustive]
42382pub struct GetAssetRequest {
42383    /// Required. The resource name of the asset:
42384    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
42385    pub name: std::string::String,
42386
42387    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42388}
42389
42390impl GetAssetRequest {
42391    pub fn new() -> Self {
42392        std::default::Default::default()
42393    }
42394
42395    /// Sets the value of [name][crate::model::GetAssetRequest::name].
42396    ///
42397    /// # Example
42398    /// ```ignore,no_run
42399    /// # use google_cloud_dataplex_v1::model::GetAssetRequest;
42400    /// let x = GetAssetRequest::new().set_name("example");
42401    /// ```
42402    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42403        self.name = v.into();
42404        self
42405    }
42406}
42407
42408impl wkt::message::Message for GetAssetRequest {
42409    fn typename() -> &'static str {
42410        "type.googleapis.com/google.cloud.dataplex.v1.GetAssetRequest"
42411    }
42412}
42413
42414/// Represents the metadata of a long-running operation.
42415#[derive(Clone, Default, PartialEq)]
42416#[non_exhaustive]
42417pub struct OperationMetadata {
42418    /// Output only. The time the operation was created.
42419    pub create_time: std::option::Option<wkt::Timestamp>,
42420
42421    /// Output only. The time the operation finished running.
42422    pub end_time: std::option::Option<wkt::Timestamp>,
42423
42424    /// Output only. Server-defined resource path for the target of the operation.
42425    pub target: std::string::String,
42426
42427    /// Output only. Name of the verb executed by the operation.
42428    pub verb: std::string::String,
42429
42430    /// Output only. Human-readable status of the operation, if any.
42431    pub status_message: std::string::String,
42432
42433    /// Output only. Identifies whether the user has requested cancellation
42434    /// of the operation. Operations that have successfully been cancelled
42435    /// have [Operation.error][] value with a
42436    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
42437    /// `Code.CANCELLED`.
42438    ///
42439    /// [google.rpc.Status.code]: rpc::model::Status::code
42440    pub requested_cancellation: bool,
42441
42442    /// Output only. API version used to start the operation.
42443    pub api_version: std::string::String,
42444
42445    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42446}
42447
42448impl OperationMetadata {
42449    pub fn new() -> Self {
42450        std::default::Default::default()
42451    }
42452
42453    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
42454    ///
42455    /// # Example
42456    /// ```ignore,no_run
42457    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42458    /// use wkt::Timestamp;
42459    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
42460    /// ```
42461    pub fn set_create_time<T>(mut self, v: T) -> Self
42462    where
42463        T: std::convert::Into<wkt::Timestamp>,
42464    {
42465        self.create_time = std::option::Option::Some(v.into());
42466        self
42467    }
42468
42469    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
42470    ///
42471    /// # Example
42472    /// ```ignore,no_run
42473    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42474    /// use wkt::Timestamp;
42475    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
42476    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
42477    /// ```
42478    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
42479    where
42480        T: std::convert::Into<wkt::Timestamp>,
42481    {
42482        self.create_time = v.map(|x| x.into());
42483        self
42484    }
42485
42486    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
42487    ///
42488    /// # Example
42489    /// ```ignore,no_run
42490    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42491    /// use wkt::Timestamp;
42492    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
42493    /// ```
42494    pub fn set_end_time<T>(mut self, v: T) -> Self
42495    where
42496        T: std::convert::Into<wkt::Timestamp>,
42497    {
42498        self.end_time = std::option::Option::Some(v.into());
42499        self
42500    }
42501
42502    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
42503    ///
42504    /// # Example
42505    /// ```ignore,no_run
42506    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42507    /// use wkt::Timestamp;
42508    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
42509    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
42510    /// ```
42511    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
42512    where
42513        T: std::convert::Into<wkt::Timestamp>,
42514    {
42515        self.end_time = v.map(|x| x.into());
42516        self
42517    }
42518
42519    /// Sets the value of [target][crate::model::OperationMetadata::target].
42520    ///
42521    /// # Example
42522    /// ```ignore,no_run
42523    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42524    /// let x = OperationMetadata::new().set_target("example");
42525    /// ```
42526    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42527        self.target = v.into();
42528        self
42529    }
42530
42531    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
42532    ///
42533    /// # Example
42534    /// ```ignore,no_run
42535    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42536    /// let x = OperationMetadata::new().set_verb("example");
42537    /// ```
42538    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42539        self.verb = v.into();
42540        self
42541    }
42542
42543    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
42544    ///
42545    /// # Example
42546    /// ```ignore,no_run
42547    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42548    /// let x = OperationMetadata::new().set_status_message("example");
42549    /// ```
42550    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42551        self.status_message = v.into();
42552        self
42553    }
42554
42555    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
42556    ///
42557    /// # Example
42558    /// ```ignore,no_run
42559    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42560    /// let x = OperationMetadata::new().set_requested_cancellation(true);
42561    /// ```
42562    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42563        self.requested_cancellation = v.into();
42564        self
42565    }
42566
42567    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
42568    ///
42569    /// # Example
42570    /// ```ignore,no_run
42571    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42572    /// let x = OperationMetadata::new().set_api_version("example");
42573    /// ```
42574    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42575        self.api_version = v.into();
42576        self
42577    }
42578}
42579
42580impl wkt::message::Message for OperationMetadata {
42581    fn typename() -> &'static str {
42582        "type.googleapis.com/google.cloud.dataplex.v1.OperationMetadata"
42583    }
42584}
42585
42586/// Create task request.
42587#[derive(Clone, Default, PartialEq)]
42588#[non_exhaustive]
42589pub struct CreateTaskRequest {
42590    /// Required. The resource name of the parent lake:
42591    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
42592    pub parent: std::string::String,
42593
42594    /// Required. Task identifier.
42595    pub task_id: std::string::String,
42596
42597    /// Required. Task resource.
42598    pub task: std::option::Option<crate::model::Task>,
42599
42600    /// Optional. Only validate the request, but do not perform mutations.
42601    /// The default is false.
42602    pub validate_only: bool,
42603
42604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42605}
42606
42607impl CreateTaskRequest {
42608    pub fn new() -> Self {
42609        std::default::Default::default()
42610    }
42611
42612    /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
42613    ///
42614    /// # Example
42615    /// ```ignore,no_run
42616    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42617    /// let x = CreateTaskRequest::new().set_parent("example");
42618    /// ```
42619    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42620        self.parent = v.into();
42621        self
42622    }
42623
42624    /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
42625    ///
42626    /// # Example
42627    /// ```ignore,no_run
42628    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42629    /// let x = CreateTaskRequest::new().set_task_id("example");
42630    /// ```
42631    pub fn set_task_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42632        self.task_id = v.into();
42633        self
42634    }
42635
42636    /// Sets the value of [task][crate::model::CreateTaskRequest::task].
42637    ///
42638    /// # Example
42639    /// ```ignore,no_run
42640    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42641    /// use google_cloud_dataplex_v1::model::Task;
42642    /// let x = CreateTaskRequest::new().set_task(Task::default()/* use setters */);
42643    /// ```
42644    pub fn set_task<T>(mut self, v: T) -> Self
42645    where
42646        T: std::convert::Into<crate::model::Task>,
42647    {
42648        self.task = std::option::Option::Some(v.into());
42649        self
42650    }
42651
42652    /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
42653    ///
42654    /// # Example
42655    /// ```ignore,no_run
42656    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42657    /// use google_cloud_dataplex_v1::model::Task;
42658    /// let x = CreateTaskRequest::new().set_or_clear_task(Some(Task::default()/* use setters */));
42659    /// let x = CreateTaskRequest::new().set_or_clear_task(None::<Task>);
42660    /// ```
42661    pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
42662    where
42663        T: std::convert::Into<crate::model::Task>,
42664    {
42665        self.task = v.map(|x| x.into());
42666        self
42667    }
42668
42669    /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
42670    ///
42671    /// # Example
42672    /// ```ignore,no_run
42673    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42674    /// let x = CreateTaskRequest::new().set_validate_only(true);
42675    /// ```
42676    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42677        self.validate_only = v.into();
42678        self
42679    }
42680}
42681
42682impl wkt::message::Message for CreateTaskRequest {
42683    fn typename() -> &'static str {
42684        "type.googleapis.com/google.cloud.dataplex.v1.CreateTaskRequest"
42685    }
42686}
42687
42688/// Update task request.
42689#[derive(Clone, Default, PartialEq)]
42690#[non_exhaustive]
42691pub struct UpdateTaskRequest {
42692    /// Required. Mask of fields to update.
42693    pub update_mask: std::option::Option<wkt::FieldMask>,
42694
42695    /// Required. Update description.
42696    /// Only fields specified in `update_mask` are updated.
42697    pub task: std::option::Option<crate::model::Task>,
42698
42699    /// Optional. Only validate the request, but do not perform mutations.
42700    /// The default is false.
42701    pub validate_only: bool,
42702
42703    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42704}
42705
42706impl UpdateTaskRequest {
42707    pub fn new() -> Self {
42708        std::default::Default::default()
42709    }
42710
42711    /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
42712    ///
42713    /// # Example
42714    /// ```ignore,no_run
42715    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42716    /// use wkt::FieldMask;
42717    /// let x = UpdateTaskRequest::new().set_update_mask(FieldMask::default()/* use setters */);
42718    /// ```
42719    pub fn set_update_mask<T>(mut self, v: T) -> Self
42720    where
42721        T: std::convert::Into<wkt::FieldMask>,
42722    {
42723        self.update_mask = std::option::Option::Some(v.into());
42724        self
42725    }
42726
42727    /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
42728    ///
42729    /// # Example
42730    /// ```ignore,no_run
42731    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42732    /// use wkt::FieldMask;
42733    /// let x = UpdateTaskRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
42734    /// let x = UpdateTaskRequest::new().set_or_clear_update_mask(None::<FieldMask>);
42735    /// ```
42736    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
42737    where
42738        T: std::convert::Into<wkt::FieldMask>,
42739    {
42740        self.update_mask = v.map(|x| x.into());
42741        self
42742    }
42743
42744    /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
42745    ///
42746    /// # Example
42747    /// ```ignore,no_run
42748    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42749    /// use google_cloud_dataplex_v1::model::Task;
42750    /// let x = UpdateTaskRequest::new().set_task(Task::default()/* use setters */);
42751    /// ```
42752    pub fn set_task<T>(mut self, v: T) -> Self
42753    where
42754        T: std::convert::Into<crate::model::Task>,
42755    {
42756        self.task = std::option::Option::Some(v.into());
42757        self
42758    }
42759
42760    /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
42761    ///
42762    /// # Example
42763    /// ```ignore,no_run
42764    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42765    /// use google_cloud_dataplex_v1::model::Task;
42766    /// let x = UpdateTaskRequest::new().set_or_clear_task(Some(Task::default()/* use setters */));
42767    /// let x = UpdateTaskRequest::new().set_or_clear_task(None::<Task>);
42768    /// ```
42769    pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
42770    where
42771        T: std::convert::Into<crate::model::Task>,
42772    {
42773        self.task = v.map(|x| x.into());
42774        self
42775    }
42776
42777    /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
42778    ///
42779    /// # Example
42780    /// ```ignore,no_run
42781    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42782    /// let x = UpdateTaskRequest::new().set_validate_only(true);
42783    /// ```
42784    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42785        self.validate_only = v.into();
42786        self
42787    }
42788}
42789
42790impl wkt::message::Message for UpdateTaskRequest {
42791    fn typename() -> &'static str {
42792        "type.googleapis.com/google.cloud.dataplex.v1.UpdateTaskRequest"
42793    }
42794}
42795
42796/// Delete task request.
42797#[derive(Clone, Default, PartialEq)]
42798#[non_exhaustive]
42799pub struct DeleteTaskRequest {
42800    /// Required. The resource name of the task:
42801    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.
42802    pub name: std::string::String,
42803
42804    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42805}
42806
42807impl DeleteTaskRequest {
42808    pub fn new() -> Self {
42809        std::default::Default::default()
42810    }
42811
42812    /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
42813    ///
42814    /// # Example
42815    /// ```ignore,no_run
42816    /// # use google_cloud_dataplex_v1::model::DeleteTaskRequest;
42817    /// let x = DeleteTaskRequest::new().set_name("example");
42818    /// ```
42819    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42820        self.name = v.into();
42821        self
42822    }
42823}
42824
42825impl wkt::message::Message for DeleteTaskRequest {
42826    fn typename() -> &'static str {
42827        "type.googleapis.com/google.cloud.dataplex.v1.DeleteTaskRequest"
42828    }
42829}
42830
42831/// List tasks request.
42832#[derive(Clone, Default, PartialEq)]
42833#[non_exhaustive]
42834pub struct ListTasksRequest {
42835    /// Required. The resource name of the parent lake:
42836    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
42837    pub parent: std::string::String,
42838
42839    /// Optional. Maximum number of tasks to return. The service may return fewer
42840    /// than this value. If unspecified, at most 10 tasks will be returned. The
42841    /// maximum value is 1000; values above 1000 will be coerced to 1000.
42842    pub page_size: i32,
42843
42844    /// Optional. Page token received from a previous `ListZones` call. Provide
42845    /// this to retrieve the subsequent page. When paginating, all other parameters
42846    /// provided to `ListZones` must match the call that provided the page token.
42847    pub page_token: std::string::String,
42848
42849    /// Optional. Filter request.
42850    pub filter: std::string::String,
42851
42852    /// Optional. Order by fields for the result.
42853    pub order_by: std::string::String,
42854
42855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42856}
42857
42858impl ListTasksRequest {
42859    pub fn new() -> Self {
42860        std::default::Default::default()
42861    }
42862
42863    /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
42864    ///
42865    /// # Example
42866    /// ```ignore,no_run
42867    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42868    /// let x = ListTasksRequest::new().set_parent("example");
42869    /// ```
42870    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42871        self.parent = v.into();
42872        self
42873    }
42874
42875    /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
42876    ///
42877    /// # Example
42878    /// ```ignore,no_run
42879    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42880    /// let x = ListTasksRequest::new().set_page_size(42);
42881    /// ```
42882    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
42883        self.page_size = v.into();
42884        self
42885    }
42886
42887    /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
42888    ///
42889    /// # Example
42890    /// ```ignore,no_run
42891    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42892    /// let x = ListTasksRequest::new().set_page_token("example");
42893    /// ```
42894    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42895        self.page_token = v.into();
42896        self
42897    }
42898
42899    /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
42900    ///
42901    /// # Example
42902    /// ```ignore,no_run
42903    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42904    /// let x = ListTasksRequest::new().set_filter("example");
42905    /// ```
42906    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42907        self.filter = v.into();
42908        self
42909    }
42910
42911    /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
42912    ///
42913    /// # Example
42914    /// ```ignore,no_run
42915    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42916    /// let x = ListTasksRequest::new().set_order_by("example");
42917    /// ```
42918    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42919        self.order_by = v.into();
42920        self
42921    }
42922}
42923
42924impl wkt::message::Message for ListTasksRequest {
42925    fn typename() -> &'static str {
42926        "type.googleapis.com/google.cloud.dataplex.v1.ListTasksRequest"
42927    }
42928}
42929
42930/// List tasks response.
42931#[derive(Clone, Default, PartialEq)]
42932#[non_exhaustive]
42933pub struct ListTasksResponse {
42934    /// Tasks under the given parent lake.
42935    pub tasks: std::vec::Vec<crate::model::Task>,
42936
42937    /// Token to retrieve the next page of results, or empty if there are no more
42938    /// results in the list.
42939    pub next_page_token: std::string::String,
42940
42941    /// Locations that could not be reached.
42942    pub unreachable_locations: std::vec::Vec<std::string::String>,
42943
42944    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42945}
42946
42947impl ListTasksResponse {
42948    pub fn new() -> Self {
42949        std::default::Default::default()
42950    }
42951
42952    /// Sets the value of [tasks][crate::model::ListTasksResponse::tasks].
42953    ///
42954    /// # Example
42955    /// ```ignore,no_run
42956    /// # use google_cloud_dataplex_v1::model::ListTasksResponse;
42957    /// use google_cloud_dataplex_v1::model::Task;
42958    /// let x = ListTasksResponse::new()
42959    ///     .set_tasks([
42960    ///         Task::default()/* use setters */,
42961    ///         Task::default()/* use (different) setters */,
42962    ///     ]);
42963    /// ```
42964    pub fn set_tasks<T, V>(mut self, v: T) -> Self
42965    where
42966        T: std::iter::IntoIterator<Item = V>,
42967        V: std::convert::Into<crate::model::Task>,
42968    {
42969        use std::iter::Iterator;
42970        self.tasks = v.into_iter().map(|i| i.into()).collect();
42971        self
42972    }
42973
42974    /// Sets the value of [next_page_token][crate::model::ListTasksResponse::next_page_token].
42975    ///
42976    /// # Example
42977    /// ```ignore,no_run
42978    /// # use google_cloud_dataplex_v1::model::ListTasksResponse;
42979    /// let x = ListTasksResponse::new().set_next_page_token("example");
42980    /// ```
42981    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42982        self.next_page_token = v.into();
42983        self
42984    }
42985
42986    /// Sets the value of [unreachable_locations][crate::model::ListTasksResponse::unreachable_locations].
42987    ///
42988    /// # Example
42989    /// ```ignore,no_run
42990    /// # use google_cloud_dataplex_v1::model::ListTasksResponse;
42991    /// let x = ListTasksResponse::new().set_unreachable_locations(["a", "b", "c"]);
42992    /// ```
42993    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
42994    where
42995        T: std::iter::IntoIterator<Item = V>,
42996        V: std::convert::Into<std::string::String>,
42997    {
42998        use std::iter::Iterator;
42999        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
43000        self
43001    }
43002}
43003
43004impl wkt::message::Message for ListTasksResponse {
43005    fn typename() -> &'static str {
43006        "type.googleapis.com/google.cloud.dataplex.v1.ListTasksResponse"
43007    }
43008}
43009
43010#[doc(hidden)]
43011impl gax::paginator::internal::PageableResponse for ListTasksResponse {
43012    type PageItem = crate::model::Task;
43013
43014    fn items(self) -> std::vec::Vec<Self::PageItem> {
43015        self.tasks
43016    }
43017
43018    fn next_page_token(&self) -> std::string::String {
43019        use std::clone::Clone;
43020        self.next_page_token.clone()
43021    }
43022}
43023
43024/// Get task request.
43025#[derive(Clone, Default, PartialEq)]
43026#[non_exhaustive]
43027pub struct GetTaskRequest {
43028    /// Required. The resource name of the task:
43029    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.
43030    pub name: std::string::String,
43031
43032    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43033}
43034
43035impl GetTaskRequest {
43036    pub fn new() -> Self {
43037        std::default::Default::default()
43038    }
43039
43040    /// Sets the value of [name][crate::model::GetTaskRequest::name].
43041    ///
43042    /// # Example
43043    /// ```ignore,no_run
43044    /// # use google_cloud_dataplex_v1::model::GetTaskRequest;
43045    /// let x = GetTaskRequest::new().set_name("example");
43046    /// ```
43047    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43048        self.name = v.into();
43049        self
43050    }
43051}
43052
43053impl wkt::message::Message for GetTaskRequest {
43054    fn typename() -> &'static str {
43055        "type.googleapis.com/google.cloud.dataplex.v1.GetTaskRequest"
43056    }
43057}
43058
43059/// Get job request.
43060#[derive(Clone, Default, PartialEq)]
43061#[non_exhaustive]
43062pub struct GetJobRequest {
43063    /// Required. The resource name of the job:
43064    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
43065    pub name: std::string::String,
43066
43067    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43068}
43069
43070impl GetJobRequest {
43071    pub fn new() -> Self {
43072        std::default::Default::default()
43073    }
43074
43075    /// Sets the value of [name][crate::model::GetJobRequest::name].
43076    ///
43077    /// # Example
43078    /// ```ignore,no_run
43079    /// # use google_cloud_dataplex_v1::model::GetJobRequest;
43080    /// let x = GetJobRequest::new().set_name("example");
43081    /// ```
43082    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43083        self.name = v.into();
43084        self
43085    }
43086}
43087
43088impl wkt::message::Message for GetJobRequest {
43089    fn typename() -> &'static str {
43090        "type.googleapis.com/google.cloud.dataplex.v1.GetJobRequest"
43091    }
43092}
43093
43094#[derive(Clone, Default, PartialEq)]
43095#[non_exhaustive]
43096pub struct RunTaskRequest {
43097    /// Required. The resource name of the task:
43098    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
43099    pub name: std::string::String,
43100
43101    /// Optional. User-defined labels for the task. If the map is left empty, the
43102    /// task will run with existing labels from task definition. If the map
43103    /// contains an entry with a new key, the same will be added to existing set of
43104    /// labels. If the map contains an entry with an existing label key in task
43105    /// definition, the task will run with new label value for that entry. Clearing
43106    /// an existing label will require label value to be explicitly set to a hyphen
43107    /// "-". The label value cannot be empty.
43108    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
43109
43110    /// Optional. Execution spec arguments. If the map is left empty, the task will
43111    /// run with existing execution spec args from task definition. If the map
43112    /// contains an entry with a new key, the same will be added to existing set of
43113    /// args. If the map contains an entry with an existing arg key in task
43114    /// definition, the task will run with new arg value for that entry. Clearing
43115    /// an existing arg will require arg value to be explicitly set to a hyphen
43116    /// "-". The arg value cannot be empty.
43117    pub args: std::collections::HashMap<std::string::String, std::string::String>,
43118
43119    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43120}
43121
43122impl RunTaskRequest {
43123    pub fn new() -> Self {
43124        std::default::Default::default()
43125    }
43126
43127    /// Sets the value of [name][crate::model::RunTaskRequest::name].
43128    ///
43129    /// # Example
43130    /// ```ignore,no_run
43131    /// # use google_cloud_dataplex_v1::model::RunTaskRequest;
43132    /// let x = RunTaskRequest::new().set_name("example");
43133    /// ```
43134    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43135        self.name = v.into();
43136        self
43137    }
43138
43139    /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
43140    ///
43141    /// # Example
43142    /// ```ignore,no_run
43143    /// # use google_cloud_dataplex_v1::model::RunTaskRequest;
43144    /// let x = RunTaskRequest::new().set_labels([
43145    ///     ("key0", "abc"),
43146    ///     ("key1", "xyz"),
43147    /// ]);
43148    /// ```
43149    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
43150    where
43151        T: std::iter::IntoIterator<Item = (K, V)>,
43152        K: std::convert::Into<std::string::String>,
43153        V: std::convert::Into<std::string::String>,
43154    {
43155        use std::iter::Iterator;
43156        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
43157        self
43158    }
43159
43160    /// Sets the value of [args][crate::model::RunTaskRequest::args].
43161    ///
43162    /// # Example
43163    /// ```ignore,no_run
43164    /// # use google_cloud_dataplex_v1::model::RunTaskRequest;
43165    /// let x = RunTaskRequest::new().set_args([
43166    ///     ("key0", "abc"),
43167    ///     ("key1", "xyz"),
43168    /// ]);
43169    /// ```
43170    pub fn set_args<T, K, V>(mut self, v: T) -> Self
43171    where
43172        T: std::iter::IntoIterator<Item = (K, V)>,
43173        K: std::convert::Into<std::string::String>,
43174        V: std::convert::Into<std::string::String>,
43175    {
43176        use std::iter::Iterator;
43177        self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
43178        self
43179    }
43180}
43181
43182impl wkt::message::Message for RunTaskRequest {
43183    fn typename() -> &'static str {
43184        "type.googleapis.com/google.cloud.dataplex.v1.RunTaskRequest"
43185    }
43186}
43187
43188#[derive(Clone, Default, PartialEq)]
43189#[non_exhaustive]
43190pub struct RunTaskResponse {
43191    /// Jobs created by RunTask API.
43192    pub job: std::option::Option<crate::model::Job>,
43193
43194    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43195}
43196
43197impl RunTaskResponse {
43198    pub fn new() -> Self {
43199        std::default::Default::default()
43200    }
43201
43202    /// Sets the value of [job][crate::model::RunTaskResponse::job].
43203    ///
43204    /// # Example
43205    /// ```ignore,no_run
43206    /// # use google_cloud_dataplex_v1::model::RunTaskResponse;
43207    /// use google_cloud_dataplex_v1::model::Job;
43208    /// let x = RunTaskResponse::new().set_job(Job::default()/* use setters */);
43209    /// ```
43210    pub fn set_job<T>(mut self, v: T) -> Self
43211    where
43212        T: std::convert::Into<crate::model::Job>,
43213    {
43214        self.job = std::option::Option::Some(v.into());
43215        self
43216    }
43217
43218    /// Sets or clears the value of [job][crate::model::RunTaskResponse::job].
43219    ///
43220    /// # Example
43221    /// ```ignore,no_run
43222    /// # use google_cloud_dataplex_v1::model::RunTaskResponse;
43223    /// use google_cloud_dataplex_v1::model::Job;
43224    /// let x = RunTaskResponse::new().set_or_clear_job(Some(Job::default()/* use setters */));
43225    /// let x = RunTaskResponse::new().set_or_clear_job(None::<Job>);
43226    /// ```
43227    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
43228    where
43229        T: std::convert::Into<crate::model::Job>,
43230    {
43231        self.job = v.map(|x| x.into());
43232        self
43233    }
43234}
43235
43236impl wkt::message::Message for RunTaskResponse {
43237    fn typename() -> &'static str {
43238        "type.googleapis.com/google.cloud.dataplex.v1.RunTaskResponse"
43239    }
43240}
43241
43242/// List jobs request.
43243#[derive(Clone, Default, PartialEq)]
43244#[non_exhaustive]
43245pub struct ListJobsRequest {
43246    /// Required. The resource name of the parent environment:
43247    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
43248    pub parent: std::string::String,
43249
43250    /// Optional. Maximum number of jobs to return. The service may return fewer
43251    /// than this value. If unspecified, at most 10 jobs will be returned. The
43252    /// maximum value is 1000; values above 1000 will be coerced to 1000.
43253    pub page_size: i32,
43254
43255    /// Optional. Page token received from a previous `ListJobs` call. Provide this
43256    /// to retrieve the subsequent page. When paginating, all other parameters
43257    /// provided to `ListJobs` must match the call that provided the page
43258    /// token.
43259    pub page_token: std::string::String,
43260
43261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43262}
43263
43264impl ListJobsRequest {
43265    pub fn new() -> Self {
43266        std::default::Default::default()
43267    }
43268
43269    /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
43270    ///
43271    /// # Example
43272    /// ```ignore,no_run
43273    /// # use google_cloud_dataplex_v1::model::ListJobsRequest;
43274    /// let x = ListJobsRequest::new().set_parent("example");
43275    /// ```
43276    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43277        self.parent = v.into();
43278        self
43279    }
43280
43281    /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
43282    ///
43283    /// # Example
43284    /// ```ignore,no_run
43285    /// # use google_cloud_dataplex_v1::model::ListJobsRequest;
43286    /// let x = ListJobsRequest::new().set_page_size(42);
43287    /// ```
43288    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
43289        self.page_size = v.into();
43290        self
43291    }
43292
43293    /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
43294    ///
43295    /// # Example
43296    /// ```ignore,no_run
43297    /// # use google_cloud_dataplex_v1::model::ListJobsRequest;
43298    /// let x = ListJobsRequest::new().set_page_token("example");
43299    /// ```
43300    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43301        self.page_token = v.into();
43302        self
43303    }
43304}
43305
43306impl wkt::message::Message for ListJobsRequest {
43307    fn typename() -> &'static str {
43308        "type.googleapis.com/google.cloud.dataplex.v1.ListJobsRequest"
43309    }
43310}
43311
43312/// List jobs response.
43313#[derive(Clone, Default, PartialEq)]
43314#[non_exhaustive]
43315pub struct ListJobsResponse {
43316    /// Jobs under a given task.
43317    pub jobs: std::vec::Vec<crate::model::Job>,
43318
43319    /// Token to retrieve the next page of results, or empty if there are no more
43320    /// results in the list.
43321    pub next_page_token: std::string::String,
43322
43323    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43324}
43325
43326impl ListJobsResponse {
43327    pub fn new() -> Self {
43328        std::default::Default::default()
43329    }
43330
43331    /// Sets the value of [jobs][crate::model::ListJobsResponse::jobs].
43332    ///
43333    /// # Example
43334    /// ```ignore,no_run
43335    /// # use google_cloud_dataplex_v1::model::ListJobsResponse;
43336    /// use google_cloud_dataplex_v1::model::Job;
43337    /// let x = ListJobsResponse::new()
43338    ///     .set_jobs([
43339    ///         Job::default()/* use setters */,
43340    ///         Job::default()/* use (different) setters */,
43341    ///     ]);
43342    /// ```
43343    pub fn set_jobs<T, V>(mut self, v: T) -> Self
43344    where
43345        T: std::iter::IntoIterator<Item = V>,
43346        V: std::convert::Into<crate::model::Job>,
43347    {
43348        use std::iter::Iterator;
43349        self.jobs = v.into_iter().map(|i| i.into()).collect();
43350        self
43351    }
43352
43353    /// Sets the value of [next_page_token][crate::model::ListJobsResponse::next_page_token].
43354    ///
43355    /// # Example
43356    /// ```ignore,no_run
43357    /// # use google_cloud_dataplex_v1::model::ListJobsResponse;
43358    /// let x = ListJobsResponse::new().set_next_page_token("example");
43359    /// ```
43360    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43361        self.next_page_token = v.into();
43362        self
43363    }
43364}
43365
43366impl wkt::message::Message for ListJobsResponse {
43367    fn typename() -> &'static str {
43368        "type.googleapis.com/google.cloud.dataplex.v1.ListJobsResponse"
43369    }
43370}
43371
43372#[doc(hidden)]
43373impl gax::paginator::internal::PageableResponse for ListJobsResponse {
43374    type PageItem = crate::model::Job;
43375
43376    fn items(self) -> std::vec::Vec<Self::PageItem> {
43377        self.jobs
43378    }
43379
43380    fn next_page_token(&self) -> std::string::String {
43381        use std::clone::Clone;
43382        self.next_page_token.clone()
43383    }
43384}
43385
43386/// Cancel task jobs.
43387#[derive(Clone, Default, PartialEq)]
43388#[non_exhaustive]
43389pub struct CancelJobRequest {
43390    /// Required. The resource name of the job:
43391    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.
43392    pub name: std::string::String,
43393
43394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43395}
43396
43397impl CancelJobRequest {
43398    pub fn new() -> Self {
43399        std::default::Default::default()
43400    }
43401
43402    /// Sets the value of [name][crate::model::CancelJobRequest::name].
43403    ///
43404    /// # Example
43405    /// ```ignore,no_run
43406    /// # use google_cloud_dataplex_v1::model::CancelJobRequest;
43407    /// let x = CancelJobRequest::new().set_name("example");
43408    /// ```
43409    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43410        self.name = v.into();
43411        self
43412    }
43413}
43414
43415impl wkt::message::Message for CancelJobRequest {
43416    fn typename() -> &'static str {
43417        "type.googleapis.com/google.cloud.dataplex.v1.CancelJobRequest"
43418    }
43419}
43420
43421/// Create environment request.
43422#[derive(Clone, Default, PartialEq)]
43423#[non_exhaustive]
43424pub struct CreateEnvironmentRequest {
43425    /// Required. The resource name of the parent lake:
43426    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
43427    pub parent: std::string::String,
43428
43429    /// Required. Environment identifier.
43430    ///
43431    /// * Must contain only lowercase letters, numbers and hyphens.
43432    /// * Must start with a letter.
43433    /// * Must be between 1-63 characters.
43434    /// * Must end with a number or a letter.
43435    /// * Must be unique within the lake.
43436    pub environment_id: std::string::String,
43437
43438    /// Required. Environment resource.
43439    pub environment: std::option::Option<crate::model::Environment>,
43440
43441    /// Optional. Only validate the request, but do not perform mutations.
43442    /// The default is false.
43443    pub validate_only: bool,
43444
43445    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43446}
43447
43448impl CreateEnvironmentRequest {
43449    pub fn new() -> Self {
43450        std::default::Default::default()
43451    }
43452
43453    /// Sets the value of [parent][crate::model::CreateEnvironmentRequest::parent].
43454    ///
43455    /// # Example
43456    /// ```ignore,no_run
43457    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43458    /// let x = CreateEnvironmentRequest::new().set_parent("example");
43459    /// ```
43460    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43461        self.parent = v.into();
43462        self
43463    }
43464
43465    /// Sets the value of [environment_id][crate::model::CreateEnvironmentRequest::environment_id].
43466    ///
43467    /// # Example
43468    /// ```ignore,no_run
43469    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43470    /// let x = CreateEnvironmentRequest::new().set_environment_id("example");
43471    /// ```
43472    pub fn set_environment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43473        self.environment_id = v.into();
43474        self
43475    }
43476
43477    /// Sets the value of [environment][crate::model::CreateEnvironmentRequest::environment].
43478    ///
43479    /// # Example
43480    /// ```ignore,no_run
43481    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43482    /// use google_cloud_dataplex_v1::model::Environment;
43483    /// let x = CreateEnvironmentRequest::new().set_environment(Environment::default()/* use setters */);
43484    /// ```
43485    pub fn set_environment<T>(mut self, v: T) -> Self
43486    where
43487        T: std::convert::Into<crate::model::Environment>,
43488    {
43489        self.environment = std::option::Option::Some(v.into());
43490        self
43491    }
43492
43493    /// Sets or clears the value of [environment][crate::model::CreateEnvironmentRequest::environment].
43494    ///
43495    /// # Example
43496    /// ```ignore,no_run
43497    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43498    /// use google_cloud_dataplex_v1::model::Environment;
43499    /// let x = CreateEnvironmentRequest::new().set_or_clear_environment(Some(Environment::default()/* use setters */));
43500    /// let x = CreateEnvironmentRequest::new().set_or_clear_environment(None::<Environment>);
43501    /// ```
43502    pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
43503    where
43504        T: std::convert::Into<crate::model::Environment>,
43505    {
43506        self.environment = v.map(|x| x.into());
43507        self
43508    }
43509
43510    /// Sets the value of [validate_only][crate::model::CreateEnvironmentRequest::validate_only].
43511    ///
43512    /// # Example
43513    /// ```ignore,no_run
43514    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43515    /// let x = CreateEnvironmentRequest::new().set_validate_only(true);
43516    /// ```
43517    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
43518        self.validate_only = v.into();
43519        self
43520    }
43521}
43522
43523impl wkt::message::Message for CreateEnvironmentRequest {
43524    fn typename() -> &'static str {
43525        "type.googleapis.com/google.cloud.dataplex.v1.CreateEnvironmentRequest"
43526    }
43527}
43528
43529/// Update environment request.
43530#[derive(Clone, Default, PartialEq)]
43531#[non_exhaustive]
43532pub struct UpdateEnvironmentRequest {
43533    /// Required. Mask of fields to update.
43534    pub update_mask: std::option::Option<wkt::FieldMask>,
43535
43536    /// Required. Update description.
43537    /// Only fields specified in `update_mask` are updated.
43538    pub environment: std::option::Option<crate::model::Environment>,
43539
43540    /// Optional. Only validate the request, but do not perform mutations.
43541    /// The default is false.
43542    pub validate_only: bool,
43543
43544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43545}
43546
43547impl UpdateEnvironmentRequest {
43548    pub fn new() -> Self {
43549        std::default::Default::default()
43550    }
43551
43552    /// Sets the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
43553    ///
43554    /// # Example
43555    /// ```ignore,no_run
43556    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43557    /// use wkt::FieldMask;
43558    /// let x = UpdateEnvironmentRequest::new().set_update_mask(FieldMask::default()/* use setters */);
43559    /// ```
43560    pub fn set_update_mask<T>(mut self, v: T) -> Self
43561    where
43562        T: std::convert::Into<wkt::FieldMask>,
43563    {
43564        self.update_mask = std::option::Option::Some(v.into());
43565        self
43566    }
43567
43568    /// Sets or clears the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
43569    ///
43570    /// # Example
43571    /// ```ignore,no_run
43572    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43573    /// use wkt::FieldMask;
43574    /// let x = UpdateEnvironmentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
43575    /// let x = UpdateEnvironmentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
43576    /// ```
43577    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
43578    where
43579        T: std::convert::Into<wkt::FieldMask>,
43580    {
43581        self.update_mask = v.map(|x| x.into());
43582        self
43583    }
43584
43585    /// Sets the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
43586    ///
43587    /// # Example
43588    /// ```ignore,no_run
43589    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43590    /// use google_cloud_dataplex_v1::model::Environment;
43591    /// let x = UpdateEnvironmentRequest::new().set_environment(Environment::default()/* use setters */);
43592    /// ```
43593    pub fn set_environment<T>(mut self, v: T) -> Self
43594    where
43595        T: std::convert::Into<crate::model::Environment>,
43596    {
43597        self.environment = std::option::Option::Some(v.into());
43598        self
43599    }
43600
43601    /// Sets or clears the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
43602    ///
43603    /// # Example
43604    /// ```ignore,no_run
43605    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43606    /// use google_cloud_dataplex_v1::model::Environment;
43607    /// let x = UpdateEnvironmentRequest::new().set_or_clear_environment(Some(Environment::default()/* use setters */));
43608    /// let x = UpdateEnvironmentRequest::new().set_or_clear_environment(None::<Environment>);
43609    /// ```
43610    pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
43611    where
43612        T: std::convert::Into<crate::model::Environment>,
43613    {
43614        self.environment = v.map(|x| x.into());
43615        self
43616    }
43617
43618    /// Sets the value of [validate_only][crate::model::UpdateEnvironmentRequest::validate_only].
43619    ///
43620    /// # Example
43621    /// ```ignore,no_run
43622    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43623    /// let x = UpdateEnvironmentRequest::new().set_validate_only(true);
43624    /// ```
43625    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
43626        self.validate_only = v.into();
43627        self
43628    }
43629}
43630
43631impl wkt::message::Message for UpdateEnvironmentRequest {
43632    fn typename() -> &'static str {
43633        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEnvironmentRequest"
43634    }
43635}
43636
43637/// Delete environment request.
43638#[derive(Clone, Default, PartialEq)]
43639#[non_exhaustive]
43640pub struct DeleteEnvironmentRequest {
43641    /// Required. The resource name of the environment:
43642    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
43643    pub name: std::string::String,
43644
43645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43646}
43647
43648impl DeleteEnvironmentRequest {
43649    pub fn new() -> Self {
43650        std::default::Default::default()
43651    }
43652
43653    /// Sets the value of [name][crate::model::DeleteEnvironmentRequest::name].
43654    ///
43655    /// # Example
43656    /// ```ignore,no_run
43657    /// # use google_cloud_dataplex_v1::model::DeleteEnvironmentRequest;
43658    /// let x = DeleteEnvironmentRequest::new().set_name("example");
43659    /// ```
43660    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43661        self.name = v.into();
43662        self
43663    }
43664}
43665
43666impl wkt::message::Message for DeleteEnvironmentRequest {
43667    fn typename() -> &'static str {
43668        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEnvironmentRequest"
43669    }
43670}
43671
43672/// List environments request.
43673#[derive(Clone, Default, PartialEq)]
43674#[non_exhaustive]
43675pub struct ListEnvironmentsRequest {
43676    /// Required. The resource name of the parent lake:
43677    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
43678    pub parent: std::string::String,
43679
43680    /// Optional. Maximum number of environments to return. The service may return
43681    /// fewer than this value. If unspecified, at most 10 environments will be
43682    /// returned. The maximum value is 1000; values above 1000 will be coerced to
43683    /// 1000.
43684    pub page_size: i32,
43685
43686    /// Optional. Page token received from a previous `ListEnvironments` call.
43687    /// Provide this to retrieve the subsequent page. When paginating, all other
43688    /// parameters provided to `ListEnvironments` must match the call that provided
43689    /// the page token.
43690    pub page_token: std::string::String,
43691
43692    /// Optional. Filter request.
43693    pub filter: std::string::String,
43694
43695    /// Optional. Order by fields for the result.
43696    pub order_by: std::string::String,
43697
43698    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43699}
43700
43701impl ListEnvironmentsRequest {
43702    pub fn new() -> Self {
43703        std::default::Default::default()
43704    }
43705
43706    /// Sets the value of [parent][crate::model::ListEnvironmentsRequest::parent].
43707    ///
43708    /// # Example
43709    /// ```ignore,no_run
43710    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43711    /// let x = ListEnvironmentsRequest::new().set_parent("example");
43712    /// ```
43713    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43714        self.parent = v.into();
43715        self
43716    }
43717
43718    /// Sets the value of [page_size][crate::model::ListEnvironmentsRequest::page_size].
43719    ///
43720    /// # Example
43721    /// ```ignore,no_run
43722    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43723    /// let x = ListEnvironmentsRequest::new().set_page_size(42);
43724    /// ```
43725    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
43726        self.page_size = v.into();
43727        self
43728    }
43729
43730    /// Sets the value of [page_token][crate::model::ListEnvironmentsRequest::page_token].
43731    ///
43732    /// # Example
43733    /// ```ignore,no_run
43734    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43735    /// let x = ListEnvironmentsRequest::new().set_page_token("example");
43736    /// ```
43737    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43738        self.page_token = v.into();
43739        self
43740    }
43741
43742    /// Sets the value of [filter][crate::model::ListEnvironmentsRequest::filter].
43743    ///
43744    /// # Example
43745    /// ```ignore,no_run
43746    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43747    /// let x = ListEnvironmentsRequest::new().set_filter("example");
43748    /// ```
43749    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43750        self.filter = v.into();
43751        self
43752    }
43753
43754    /// Sets the value of [order_by][crate::model::ListEnvironmentsRequest::order_by].
43755    ///
43756    /// # Example
43757    /// ```ignore,no_run
43758    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43759    /// let x = ListEnvironmentsRequest::new().set_order_by("example");
43760    /// ```
43761    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43762        self.order_by = v.into();
43763        self
43764    }
43765}
43766
43767impl wkt::message::Message for ListEnvironmentsRequest {
43768    fn typename() -> &'static str {
43769        "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsRequest"
43770    }
43771}
43772
43773/// List environments response.
43774#[derive(Clone, Default, PartialEq)]
43775#[non_exhaustive]
43776pub struct ListEnvironmentsResponse {
43777    /// Environments under the given parent lake.
43778    pub environments: std::vec::Vec<crate::model::Environment>,
43779
43780    /// Token to retrieve the next page of results, or empty if there are no more
43781    /// results in the list.
43782    pub next_page_token: std::string::String,
43783
43784    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43785}
43786
43787impl ListEnvironmentsResponse {
43788    pub fn new() -> Self {
43789        std::default::Default::default()
43790    }
43791
43792    /// Sets the value of [environments][crate::model::ListEnvironmentsResponse::environments].
43793    ///
43794    /// # Example
43795    /// ```ignore,no_run
43796    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsResponse;
43797    /// use google_cloud_dataplex_v1::model::Environment;
43798    /// let x = ListEnvironmentsResponse::new()
43799    ///     .set_environments([
43800    ///         Environment::default()/* use setters */,
43801    ///         Environment::default()/* use (different) setters */,
43802    ///     ]);
43803    /// ```
43804    pub fn set_environments<T, V>(mut self, v: T) -> Self
43805    where
43806        T: std::iter::IntoIterator<Item = V>,
43807        V: std::convert::Into<crate::model::Environment>,
43808    {
43809        use std::iter::Iterator;
43810        self.environments = v.into_iter().map(|i| i.into()).collect();
43811        self
43812    }
43813
43814    /// Sets the value of [next_page_token][crate::model::ListEnvironmentsResponse::next_page_token].
43815    ///
43816    /// # Example
43817    /// ```ignore,no_run
43818    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsResponse;
43819    /// let x = ListEnvironmentsResponse::new().set_next_page_token("example");
43820    /// ```
43821    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43822        self.next_page_token = v.into();
43823        self
43824    }
43825}
43826
43827impl wkt::message::Message for ListEnvironmentsResponse {
43828    fn typename() -> &'static str {
43829        "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsResponse"
43830    }
43831}
43832
43833#[doc(hidden)]
43834impl gax::paginator::internal::PageableResponse for ListEnvironmentsResponse {
43835    type PageItem = crate::model::Environment;
43836
43837    fn items(self) -> std::vec::Vec<Self::PageItem> {
43838        self.environments
43839    }
43840
43841    fn next_page_token(&self) -> std::string::String {
43842        use std::clone::Clone;
43843        self.next_page_token.clone()
43844    }
43845}
43846
43847/// Get environment request.
43848#[derive(Clone, Default, PartialEq)]
43849#[non_exhaustive]
43850pub struct GetEnvironmentRequest {
43851    /// Required. The resource name of the environment:
43852    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
43853    pub name: std::string::String,
43854
43855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43856}
43857
43858impl GetEnvironmentRequest {
43859    pub fn new() -> Self {
43860        std::default::Default::default()
43861    }
43862
43863    /// Sets the value of [name][crate::model::GetEnvironmentRequest::name].
43864    ///
43865    /// # Example
43866    /// ```ignore,no_run
43867    /// # use google_cloud_dataplex_v1::model::GetEnvironmentRequest;
43868    /// let x = GetEnvironmentRequest::new().set_name("example");
43869    /// ```
43870    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43871        self.name = v.into();
43872        self
43873    }
43874}
43875
43876impl wkt::message::Message for GetEnvironmentRequest {
43877    fn typename() -> &'static str {
43878        "type.googleapis.com/google.cloud.dataplex.v1.GetEnvironmentRequest"
43879    }
43880}
43881
43882/// List sessions request.
43883#[derive(Clone, Default, PartialEq)]
43884#[non_exhaustive]
43885pub struct ListSessionsRequest {
43886    /// Required. The resource name of the parent environment:
43887    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.
43888    pub parent: std::string::String,
43889
43890    /// Optional. Maximum number of sessions to return. The service may return
43891    /// fewer than this value. If unspecified, at most 10 sessions will be
43892    /// returned. The maximum value is 1000; values above 1000 will be coerced to
43893    /// 1000.
43894    pub page_size: i32,
43895
43896    /// Optional. Page token received from a previous `ListSessions` call. Provide
43897    /// this to retrieve the subsequent page. When paginating, all other parameters
43898    /// provided to `ListSessions` must match the call that provided the page
43899    /// token.
43900    pub page_token: std::string::String,
43901
43902    /// Optional. Filter request. The following `mode` filter is supported to
43903    /// return only the sessions belonging to the requester when the mode is USER
43904    /// and return sessions of all the users when the mode is ADMIN. When no filter
43905    /// is sent default to USER mode. NOTE: When the mode is ADMIN, the requester
43906    /// should have `dataplex.environments.listAllSessions` permission to list all
43907    /// sessions, in absence of the permission, the request fails.
43908    ///
43909    /// mode = ADMIN | USER
43910    pub filter: std::string::String,
43911
43912    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43913}
43914
43915impl ListSessionsRequest {
43916    pub fn new() -> Self {
43917        std::default::Default::default()
43918    }
43919
43920    /// Sets the value of [parent][crate::model::ListSessionsRequest::parent].
43921    ///
43922    /// # Example
43923    /// ```ignore,no_run
43924    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43925    /// let x = ListSessionsRequest::new().set_parent("example");
43926    /// ```
43927    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43928        self.parent = v.into();
43929        self
43930    }
43931
43932    /// Sets the value of [page_size][crate::model::ListSessionsRequest::page_size].
43933    ///
43934    /// # Example
43935    /// ```ignore,no_run
43936    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43937    /// let x = ListSessionsRequest::new().set_page_size(42);
43938    /// ```
43939    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
43940        self.page_size = v.into();
43941        self
43942    }
43943
43944    /// Sets the value of [page_token][crate::model::ListSessionsRequest::page_token].
43945    ///
43946    /// # Example
43947    /// ```ignore,no_run
43948    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43949    /// let x = ListSessionsRequest::new().set_page_token("example");
43950    /// ```
43951    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43952        self.page_token = v.into();
43953        self
43954    }
43955
43956    /// Sets the value of [filter][crate::model::ListSessionsRequest::filter].
43957    ///
43958    /// # Example
43959    /// ```ignore,no_run
43960    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43961    /// let x = ListSessionsRequest::new().set_filter("example");
43962    /// ```
43963    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43964        self.filter = v.into();
43965        self
43966    }
43967}
43968
43969impl wkt::message::Message for ListSessionsRequest {
43970    fn typename() -> &'static str {
43971        "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsRequest"
43972    }
43973}
43974
43975/// List sessions response.
43976#[derive(Clone, Default, PartialEq)]
43977#[non_exhaustive]
43978pub struct ListSessionsResponse {
43979    /// Sessions under a given environment.
43980    pub sessions: std::vec::Vec<crate::model::Session>,
43981
43982    /// Token to retrieve the next page of results, or empty if there are no more
43983    /// results in the list.
43984    pub next_page_token: std::string::String,
43985
43986    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43987}
43988
43989impl ListSessionsResponse {
43990    pub fn new() -> Self {
43991        std::default::Default::default()
43992    }
43993
43994    /// Sets the value of [sessions][crate::model::ListSessionsResponse::sessions].
43995    ///
43996    /// # Example
43997    /// ```ignore,no_run
43998    /// # use google_cloud_dataplex_v1::model::ListSessionsResponse;
43999    /// use google_cloud_dataplex_v1::model::Session;
44000    /// let x = ListSessionsResponse::new()
44001    ///     .set_sessions([
44002    ///         Session::default()/* use setters */,
44003    ///         Session::default()/* use (different) setters */,
44004    ///     ]);
44005    /// ```
44006    pub fn set_sessions<T, V>(mut self, v: T) -> Self
44007    where
44008        T: std::iter::IntoIterator<Item = V>,
44009        V: std::convert::Into<crate::model::Session>,
44010    {
44011        use std::iter::Iterator;
44012        self.sessions = v.into_iter().map(|i| i.into()).collect();
44013        self
44014    }
44015
44016    /// Sets the value of [next_page_token][crate::model::ListSessionsResponse::next_page_token].
44017    ///
44018    /// # Example
44019    /// ```ignore,no_run
44020    /// # use google_cloud_dataplex_v1::model::ListSessionsResponse;
44021    /// let x = ListSessionsResponse::new().set_next_page_token("example");
44022    /// ```
44023    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44024        self.next_page_token = v.into();
44025        self
44026    }
44027}
44028
44029impl wkt::message::Message for ListSessionsResponse {
44030    fn typename() -> &'static str {
44031        "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsResponse"
44032    }
44033}
44034
44035#[doc(hidden)]
44036impl gax::paginator::internal::PageableResponse for ListSessionsResponse {
44037    type PageItem = crate::model::Session;
44038
44039    fn items(self) -> std::vec::Vec<Self::PageItem> {
44040        self.sessions
44041    }
44042
44043    fn next_page_token(&self) -> std::string::String {
44044        use std::clone::Clone;
44045        self.next_page_token.clone()
44046    }
44047}
44048
44049/// A task represents a user-visible job.
44050#[derive(Clone, Default, PartialEq)]
44051#[non_exhaustive]
44052pub struct Task {
44053    /// Output only. The relative resource name of the task, of the form:
44054    /// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/
44055    /// tasks/{task_id}.
44056    pub name: std::string::String,
44057
44058    /// Output only. System generated globally unique ID for the task. This ID will
44059    /// be different if the task is deleted and re-created with the same name.
44060    pub uid: std::string::String,
44061
44062    /// Output only. The time when the task was created.
44063    pub create_time: std::option::Option<wkt::Timestamp>,
44064
44065    /// Output only. The time when the task was last updated.
44066    pub update_time: std::option::Option<wkt::Timestamp>,
44067
44068    /// Optional. Description of the task.
44069    pub description: std::string::String,
44070
44071    /// Optional. User friendly display name.
44072    pub display_name: std::string::String,
44073
44074    /// Output only. Current state of the task.
44075    pub state: crate::model::State,
44076
44077    /// Optional. User-defined labels for the task.
44078    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
44079
44080    /// Required. Spec related to how often and when a task should be triggered.
44081    pub trigger_spec: std::option::Option<crate::model::task::TriggerSpec>,
44082
44083    /// Required. Spec related to how a task is executed.
44084    pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
44085
44086    /// Output only. Status of the latest task executions.
44087    pub execution_status: std::option::Option<crate::model::task::ExecutionStatus>,
44088
44089    /// Task template specific user-specified config.
44090    pub config: std::option::Option<crate::model::task::Config>,
44091
44092    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44093}
44094
44095impl Task {
44096    pub fn new() -> Self {
44097        std::default::Default::default()
44098    }
44099
44100    /// Sets the value of [name][crate::model::Task::name].
44101    ///
44102    /// # Example
44103    /// ```ignore,no_run
44104    /// # use google_cloud_dataplex_v1::model::Task;
44105    /// let x = Task::new().set_name("example");
44106    /// ```
44107    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44108        self.name = v.into();
44109        self
44110    }
44111
44112    /// Sets the value of [uid][crate::model::Task::uid].
44113    ///
44114    /// # Example
44115    /// ```ignore,no_run
44116    /// # use google_cloud_dataplex_v1::model::Task;
44117    /// let x = Task::new().set_uid("example");
44118    /// ```
44119    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44120        self.uid = v.into();
44121        self
44122    }
44123
44124    /// Sets the value of [create_time][crate::model::Task::create_time].
44125    ///
44126    /// # Example
44127    /// ```ignore,no_run
44128    /// # use google_cloud_dataplex_v1::model::Task;
44129    /// use wkt::Timestamp;
44130    /// let x = Task::new().set_create_time(Timestamp::default()/* use setters */);
44131    /// ```
44132    pub fn set_create_time<T>(mut self, v: T) -> Self
44133    where
44134        T: std::convert::Into<wkt::Timestamp>,
44135    {
44136        self.create_time = std::option::Option::Some(v.into());
44137        self
44138    }
44139
44140    /// Sets or clears the value of [create_time][crate::model::Task::create_time].
44141    ///
44142    /// # Example
44143    /// ```ignore,no_run
44144    /// # use google_cloud_dataplex_v1::model::Task;
44145    /// use wkt::Timestamp;
44146    /// let x = Task::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
44147    /// let x = Task::new().set_or_clear_create_time(None::<Timestamp>);
44148    /// ```
44149    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
44150    where
44151        T: std::convert::Into<wkt::Timestamp>,
44152    {
44153        self.create_time = v.map(|x| x.into());
44154        self
44155    }
44156
44157    /// Sets the value of [update_time][crate::model::Task::update_time].
44158    ///
44159    /// # Example
44160    /// ```ignore,no_run
44161    /// # use google_cloud_dataplex_v1::model::Task;
44162    /// use wkt::Timestamp;
44163    /// let x = Task::new().set_update_time(Timestamp::default()/* use setters */);
44164    /// ```
44165    pub fn set_update_time<T>(mut self, v: T) -> Self
44166    where
44167        T: std::convert::Into<wkt::Timestamp>,
44168    {
44169        self.update_time = std::option::Option::Some(v.into());
44170        self
44171    }
44172
44173    /// Sets or clears the value of [update_time][crate::model::Task::update_time].
44174    ///
44175    /// # Example
44176    /// ```ignore,no_run
44177    /// # use google_cloud_dataplex_v1::model::Task;
44178    /// use wkt::Timestamp;
44179    /// let x = Task::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
44180    /// let x = Task::new().set_or_clear_update_time(None::<Timestamp>);
44181    /// ```
44182    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
44183    where
44184        T: std::convert::Into<wkt::Timestamp>,
44185    {
44186        self.update_time = v.map(|x| x.into());
44187        self
44188    }
44189
44190    /// Sets the value of [description][crate::model::Task::description].
44191    ///
44192    /// # Example
44193    /// ```ignore,no_run
44194    /// # use google_cloud_dataplex_v1::model::Task;
44195    /// let x = Task::new().set_description("example");
44196    /// ```
44197    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44198        self.description = v.into();
44199        self
44200    }
44201
44202    /// Sets the value of [display_name][crate::model::Task::display_name].
44203    ///
44204    /// # Example
44205    /// ```ignore,no_run
44206    /// # use google_cloud_dataplex_v1::model::Task;
44207    /// let x = Task::new().set_display_name("example");
44208    /// ```
44209    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44210        self.display_name = v.into();
44211        self
44212    }
44213
44214    /// Sets the value of [state][crate::model::Task::state].
44215    ///
44216    /// # Example
44217    /// ```ignore,no_run
44218    /// # use google_cloud_dataplex_v1::model::Task;
44219    /// use google_cloud_dataplex_v1::model::State;
44220    /// let x0 = Task::new().set_state(State::Active);
44221    /// let x1 = Task::new().set_state(State::Creating);
44222    /// let x2 = Task::new().set_state(State::Deleting);
44223    /// ```
44224    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
44225        self.state = v.into();
44226        self
44227    }
44228
44229    /// Sets the value of [labels][crate::model::Task::labels].
44230    ///
44231    /// # Example
44232    /// ```ignore,no_run
44233    /// # use google_cloud_dataplex_v1::model::Task;
44234    /// let x = Task::new().set_labels([
44235    ///     ("key0", "abc"),
44236    ///     ("key1", "xyz"),
44237    /// ]);
44238    /// ```
44239    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
44240    where
44241        T: std::iter::IntoIterator<Item = (K, V)>,
44242        K: std::convert::Into<std::string::String>,
44243        V: std::convert::Into<std::string::String>,
44244    {
44245        use std::iter::Iterator;
44246        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
44247        self
44248    }
44249
44250    /// Sets the value of [trigger_spec][crate::model::Task::trigger_spec].
44251    ///
44252    /// # Example
44253    /// ```ignore,no_run
44254    /// # use google_cloud_dataplex_v1::model::Task;
44255    /// use google_cloud_dataplex_v1::model::task::TriggerSpec;
44256    /// let x = Task::new().set_trigger_spec(TriggerSpec::default()/* use setters */);
44257    /// ```
44258    pub fn set_trigger_spec<T>(mut self, v: T) -> Self
44259    where
44260        T: std::convert::Into<crate::model::task::TriggerSpec>,
44261    {
44262        self.trigger_spec = std::option::Option::Some(v.into());
44263        self
44264    }
44265
44266    /// Sets or clears the value of [trigger_spec][crate::model::Task::trigger_spec].
44267    ///
44268    /// # Example
44269    /// ```ignore,no_run
44270    /// # use google_cloud_dataplex_v1::model::Task;
44271    /// use google_cloud_dataplex_v1::model::task::TriggerSpec;
44272    /// let x = Task::new().set_or_clear_trigger_spec(Some(TriggerSpec::default()/* use setters */));
44273    /// let x = Task::new().set_or_clear_trigger_spec(None::<TriggerSpec>);
44274    /// ```
44275    pub fn set_or_clear_trigger_spec<T>(mut self, v: std::option::Option<T>) -> Self
44276    where
44277        T: std::convert::Into<crate::model::task::TriggerSpec>,
44278    {
44279        self.trigger_spec = v.map(|x| x.into());
44280        self
44281    }
44282
44283    /// Sets the value of [execution_spec][crate::model::Task::execution_spec].
44284    ///
44285    /// # Example
44286    /// ```ignore,no_run
44287    /// # use google_cloud_dataplex_v1::model::Task;
44288    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
44289    /// let x = Task::new().set_execution_spec(ExecutionSpec::default()/* use setters */);
44290    /// ```
44291    pub fn set_execution_spec<T>(mut self, v: T) -> Self
44292    where
44293        T: std::convert::Into<crate::model::task::ExecutionSpec>,
44294    {
44295        self.execution_spec = std::option::Option::Some(v.into());
44296        self
44297    }
44298
44299    /// Sets or clears the value of [execution_spec][crate::model::Task::execution_spec].
44300    ///
44301    /// # Example
44302    /// ```ignore,no_run
44303    /// # use google_cloud_dataplex_v1::model::Task;
44304    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
44305    /// let x = Task::new().set_or_clear_execution_spec(Some(ExecutionSpec::default()/* use setters */));
44306    /// let x = Task::new().set_or_clear_execution_spec(None::<ExecutionSpec>);
44307    /// ```
44308    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
44309    where
44310        T: std::convert::Into<crate::model::task::ExecutionSpec>,
44311    {
44312        self.execution_spec = v.map(|x| x.into());
44313        self
44314    }
44315
44316    /// Sets the value of [execution_status][crate::model::Task::execution_status].
44317    ///
44318    /// # Example
44319    /// ```ignore,no_run
44320    /// # use google_cloud_dataplex_v1::model::Task;
44321    /// use google_cloud_dataplex_v1::model::task::ExecutionStatus;
44322    /// let x = Task::new().set_execution_status(ExecutionStatus::default()/* use setters */);
44323    /// ```
44324    pub fn set_execution_status<T>(mut self, v: T) -> Self
44325    where
44326        T: std::convert::Into<crate::model::task::ExecutionStatus>,
44327    {
44328        self.execution_status = std::option::Option::Some(v.into());
44329        self
44330    }
44331
44332    /// Sets or clears the value of [execution_status][crate::model::Task::execution_status].
44333    ///
44334    /// # Example
44335    /// ```ignore,no_run
44336    /// # use google_cloud_dataplex_v1::model::Task;
44337    /// use google_cloud_dataplex_v1::model::task::ExecutionStatus;
44338    /// let x = Task::new().set_or_clear_execution_status(Some(ExecutionStatus::default()/* use setters */));
44339    /// let x = Task::new().set_or_clear_execution_status(None::<ExecutionStatus>);
44340    /// ```
44341    pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
44342    where
44343        T: std::convert::Into<crate::model::task::ExecutionStatus>,
44344    {
44345        self.execution_status = v.map(|x| x.into());
44346        self
44347    }
44348
44349    /// Sets the value of [config][crate::model::Task::config].
44350    ///
44351    /// Note that all the setters affecting `config` are mutually
44352    /// exclusive.
44353    ///
44354    /// # Example
44355    /// ```ignore,no_run
44356    /// # use google_cloud_dataplex_v1::model::Task;
44357    /// use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
44358    /// let x = Task::new().set_config(Some(
44359    ///     google_cloud_dataplex_v1::model::task::Config::Spark(SparkTaskConfig::default().into())));
44360    /// ```
44361    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::task::Config>>>(
44362        mut self,
44363        v: T,
44364    ) -> Self {
44365        self.config = v.into();
44366        self
44367    }
44368
44369    /// The value of [config][crate::model::Task::config]
44370    /// if it holds a `Spark`, `None` if the field is not set or
44371    /// holds a different branch.
44372    pub fn spark(
44373        &self,
44374    ) -> std::option::Option<&std::boxed::Box<crate::model::task::SparkTaskConfig>> {
44375        #[allow(unreachable_patterns)]
44376        self.config.as_ref().and_then(|v| match v {
44377            crate::model::task::Config::Spark(v) => std::option::Option::Some(v),
44378            _ => std::option::Option::None,
44379        })
44380    }
44381
44382    /// Sets the value of [config][crate::model::Task::config]
44383    /// to hold a `Spark`.
44384    ///
44385    /// Note that all the setters affecting `config` are
44386    /// mutually exclusive.
44387    ///
44388    /// # Example
44389    /// ```ignore,no_run
44390    /// # use google_cloud_dataplex_v1::model::Task;
44391    /// use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
44392    /// let x = Task::new().set_spark(SparkTaskConfig::default()/* use setters */);
44393    /// assert!(x.spark().is_some());
44394    /// assert!(x.notebook().is_none());
44395    /// ```
44396    pub fn set_spark<
44397        T: std::convert::Into<std::boxed::Box<crate::model::task::SparkTaskConfig>>,
44398    >(
44399        mut self,
44400        v: T,
44401    ) -> Self {
44402        self.config = std::option::Option::Some(crate::model::task::Config::Spark(v.into()));
44403        self
44404    }
44405
44406    /// The value of [config][crate::model::Task::config]
44407    /// if it holds a `Notebook`, `None` if the field is not set or
44408    /// holds a different branch.
44409    pub fn notebook(
44410        &self,
44411    ) -> std::option::Option<&std::boxed::Box<crate::model::task::NotebookTaskConfig>> {
44412        #[allow(unreachable_patterns)]
44413        self.config.as_ref().and_then(|v| match v {
44414            crate::model::task::Config::Notebook(v) => std::option::Option::Some(v),
44415            _ => std::option::Option::None,
44416        })
44417    }
44418
44419    /// Sets the value of [config][crate::model::Task::config]
44420    /// to hold a `Notebook`.
44421    ///
44422    /// Note that all the setters affecting `config` are
44423    /// mutually exclusive.
44424    ///
44425    /// # Example
44426    /// ```ignore,no_run
44427    /// # use google_cloud_dataplex_v1::model::Task;
44428    /// use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
44429    /// let x = Task::new().set_notebook(NotebookTaskConfig::default()/* use setters */);
44430    /// assert!(x.notebook().is_some());
44431    /// assert!(x.spark().is_none());
44432    /// ```
44433    pub fn set_notebook<
44434        T: std::convert::Into<std::boxed::Box<crate::model::task::NotebookTaskConfig>>,
44435    >(
44436        mut self,
44437        v: T,
44438    ) -> Self {
44439        self.config = std::option::Option::Some(crate::model::task::Config::Notebook(v.into()));
44440        self
44441    }
44442}
44443
44444impl wkt::message::Message for Task {
44445    fn typename() -> &'static str {
44446        "type.googleapis.com/google.cloud.dataplex.v1.Task"
44447    }
44448}
44449
44450/// Defines additional types related to [Task].
44451pub mod task {
44452    #[allow(unused_imports)]
44453    use super::*;
44454
44455    /// Configuration for the underlying infrastructure used to run workloads.
44456    #[derive(Clone, Default, PartialEq)]
44457    #[non_exhaustive]
44458    pub struct InfrastructureSpec {
44459        /// Hardware config.
44460        pub resources: std::option::Option<crate::model::task::infrastructure_spec::Resources>,
44461
44462        /// Software config.
44463        pub runtime: std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
44464
44465        /// Networking config.
44466        pub network: std::option::Option<crate::model::task::infrastructure_spec::Network>,
44467
44468        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44469    }
44470
44471    impl InfrastructureSpec {
44472        pub fn new() -> Self {
44473            std::default::Default::default()
44474        }
44475
44476        /// Sets the value of [resources][crate::model::task::InfrastructureSpec::resources].
44477        ///
44478        /// Note that all the setters affecting `resources` are mutually
44479        /// exclusive.
44480        ///
44481        /// # Example
44482        /// ```ignore,no_run
44483        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44484        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44485        /// let x = InfrastructureSpec::new().set_resources(Some(
44486        ///     google_cloud_dataplex_v1::model::task::infrastructure_spec::Resources::Batch(BatchComputeResources::default().into())));
44487        /// ```
44488        pub fn set_resources<
44489            T: std::convert::Into<
44490                    std::option::Option<crate::model::task::infrastructure_spec::Resources>,
44491                >,
44492        >(
44493            mut self,
44494            v: T,
44495        ) -> Self {
44496            self.resources = v.into();
44497            self
44498        }
44499
44500        /// The value of [resources][crate::model::task::InfrastructureSpec::resources]
44501        /// if it holds a `Batch`, `None` if the field is not set or
44502        /// holds a different branch.
44503        pub fn batch(
44504            &self,
44505        ) -> std::option::Option<
44506            &std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
44507        > {
44508            #[allow(unreachable_patterns)]
44509            self.resources.as_ref().and_then(|v| match v {
44510                crate::model::task::infrastructure_spec::Resources::Batch(v) => {
44511                    std::option::Option::Some(v)
44512                }
44513                _ => std::option::Option::None,
44514            })
44515        }
44516
44517        /// Sets the value of [resources][crate::model::task::InfrastructureSpec::resources]
44518        /// to hold a `Batch`.
44519        ///
44520        /// Note that all the setters affecting `resources` are
44521        /// mutually exclusive.
44522        ///
44523        /// # Example
44524        /// ```ignore,no_run
44525        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44526        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44527        /// let x = InfrastructureSpec::new().set_batch(BatchComputeResources::default()/* use setters */);
44528        /// assert!(x.batch().is_some());
44529        /// ```
44530        pub fn set_batch<
44531            T: std::convert::Into<
44532                    std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
44533                >,
44534        >(
44535            mut self,
44536            v: T,
44537        ) -> Self {
44538            self.resources = std::option::Option::Some(
44539                crate::model::task::infrastructure_spec::Resources::Batch(v.into()),
44540            );
44541            self
44542        }
44543
44544        /// Sets the value of [runtime][crate::model::task::InfrastructureSpec::runtime].
44545        ///
44546        /// Note that all the setters affecting `runtime` are mutually
44547        /// exclusive.
44548        ///
44549        /// # Example
44550        /// ```ignore,no_run
44551        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44552        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44553        /// let x = InfrastructureSpec::new().set_runtime(Some(
44554        ///     google_cloud_dataplex_v1::model::task::infrastructure_spec::Runtime::ContainerImage(ContainerImageRuntime::default().into())));
44555        /// ```
44556        pub fn set_runtime<
44557            T: std::convert::Into<
44558                    std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
44559                >,
44560        >(
44561            mut self,
44562            v: T,
44563        ) -> Self {
44564            self.runtime = v.into();
44565            self
44566        }
44567
44568        /// The value of [runtime][crate::model::task::InfrastructureSpec::runtime]
44569        /// if it holds a `ContainerImage`, `None` if the field is not set or
44570        /// holds a different branch.
44571        pub fn container_image(
44572            &self,
44573        ) -> std::option::Option<
44574            &std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
44575        > {
44576            #[allow(unreachable_patterns)]
44577            self.runtime.as_ref().and_then(|v| match v {
44578                crate::model::task::infrastructure_spec::Runtime::ContainerImage(v) => {
44579                    std::option::Option::Some(v)
44580                }
44581                _ => std::option::Option::None,
44582            })
44583        }
44584
44585        /// Sets the value of [runtime][crate::model::task::InfrastructureSpec::runtime]
44586        /// to hold a `ContainerImage`.
44587        ///
44588        /// Note that all the setters affecting `runtime` are
44589        /// mutually exclusive.
44590        ///
44591        /// # Example
44592        /// ```ignore,no_run
44593        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44594        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44595        /// let x = InfrastructureSpec::new().set_container_image(ContainerImageRuntime::default()/* use setters */);
44596        /// assert!(x.container_image().is_some());
44597        /// ```
44598        pub fn set_container_image<
44599            T: std::convert::Into<
44600                    std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
44601                >,
44602        >(
44603            mut self,
44604            v: T,
44605        ) -> Self {
44606            self.runtime = std::option::Option::Some(
44607                crate::model::task::infrastructure_spec::Runtime::ContainerImage(v.into()),
44608            );
44609            self
44610        }
44611
44612        /// Sets the value of [network][crate::model::task::InfrastructureSpec::network].
44613        ///
44614        /// Note that all the setters affecting `network` are mutually
44615        /// exclusive.
44616        ///
44617        /// # Example
44618        /// ```ignore,no_run
44619        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44620        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44621        /// let x = InfrastructureSpec::new().set_network(Some(
44622        ///     google_cloud_dataplex_v1::model::task::infrastructure_spec::Network::VpcNetwork(VpcNetwork::default().into())));
44623        /// ```
44624        pub fn set_network<
44625            T: std::convert::Into<
44626                    std::option::Option<crate::model::task::infrastructure_spec::Network>,
44627                >,
44628        >(
44629            mut self,
44630            v: T,
44631        ) -> Self {
44632            self.network = v.into();
44633            self
44634        }
44635
44636        /// The value of [network][crate::model::task::InfrastructureSpec::network]
44637        /// if it holds a `VpcNetwork`, `None` if the field is not set or
44638        /// holds a different branch.
44639        pub fn vpc_network(
44640            &self,
44641        ) -> std::option::Option<
44642            &std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
44643        > {
44644            #[allow(unreachable_patterns)]
44645            self.network.as_ref().and_then(|v| match v {
44646                crate::model::task::infrastructure_spec::Network::VpcNetwork(v) => {
44647                    std::option::Option::Some(v)
44648                }
44649                _ => std::option::Option::None,
44650            })
44651        }
44652
44653        /// Sets the value of [network][crate::model::task::InfrastructureSpec::network]
44654        /// to hold a `VpcNetwork`.
44655        ///
44656        /// Note that all the setters affecting `network` are
44657        /// mutually exclusive.
44658        ///
44659        /// # Example
44660        /// ```ignore,no_run
44661        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44662        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44663        /// let x = InfrastructureSpec::new().set_vpc_network(VpcNetwork::default()/* use setters */);
44664        /// assert!(x.vpc_network().is_some());
44665        /// ```
44666        pub fn set_vpc_network<
44667            T: std::convert::Into<
44668                    std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
44669                >,
44670        >(
44671            mut self,
44672            v: T,
44673        ) -> Self {
44674            self.network = std::option::Option::Some(
44675                crate::model::task::infrastructure_spec::Network::VpcNetwork(v.into()),
44676            );
44677            self
44678        }
44679    }
44680
44681    impl wkt::message::Message for InfrastructureSpec {
44682        fn typename() -> &'static str {
44683            "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec"
44684        }
44685    }
44686
44687    /// Defines additional types related to [InfrastructureSpec].
44688    pub mod infrastructure_spec {
44689        #[allow(unused_imports)]
44690        use super::*;
44691
44692        /// Batch compute resources associated with the task.
44693        #[derive(Clone, Default, PartialEq)]
44694        #[non_exhaustive]
44695        pub struct BatchComputeResources {
44696            /// Optional. Total number of job executors.
44697            /// Executor Count should be between 2 and 100. [Default=2]
44698            pub executors_count: i32,
44699
44700            /// Optional. Max configurable executors.
44701            /// If max_executors_count > executors_count, then auto-scaling is enabled.
44702            /// Max Executor Count should be between 2 and 1000. [Default=1000]
44703            pub max_executors_count: i32,
44704
44705            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44706        }
44707
44708        impl BatchComputeResources {
44709            pub fn new() -> Self {
44710                std::default::Default::default()
44711            }
44712
44713            /// Sets the value of [executors_count][crate::model::task::infrastructure_spec::BatchComputeResources::executors_count].
44714            ///
44715            /// # Example
44716            /// ```ignore,no_run
44717            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44718            /// let x = BatchComputeResources::new().set_executors_count(42);
44719            /// ```
44720            pub fn set_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
44721                self.executors_count = v.into();
44722                self
44723            }
44724
44725            /// Sets the value of [max_executors_count][crate::model::task::infrastructure_spec::BatchComputeResources::max_executors_count].
44726            ///
44727            /// # Example
44728            /// ```ignore,no_run
44729            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44730            /// let x = BatchComputeResources::new().set_max_executors_count(42);
44731            /// ```
44732            pub fn set_max_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
44733                self.max_executors_count = v.into();
44734                self
44735            }
44736        }
44737
44738        impl wkt::message::Message for BatchComputeResources {
44739            fn typename() -> &'static str {
44740                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"
44741            }
44742        }
44743
44744        /// Container Image Runtime Configuration used with Batch execution.
44745        #[derive(Clone, Default, PartialEq)]
44746        #[non_exhaustive]
44747        pub struct ContainerImageRuntime {
44748            /// Optional. Container image to use.
44749            pub image: std::string::String,
44750
44751            /// Optional. A list of Java JARS to add to the classpath.
44752            /// Valid input includes Cloud Storage URIs to Jar binaries.
44753            /// For example, gs://bucket-name/my/path/to/file.jar
44754            pub java_jars: std::vec::Vec<std::string::String>,
44755
44756            /// Optional. A list of python packages to be installed.
44757            /// Valid formats include Cloud Storage URI to a PIP installable library.
44758            /// For example, gs://bucket-name/my/path/to/lib.tar.gz
44759            pub python_packages: std::vec::Vec<std::string::String>,
44760
44761            /// Optional. Override to common configuration of open source components
44762            /// installed on the Dataproc cluster. The properties to set on daemon
44763            /// config files. Property keys are specified in `prefix:property` format,
44764            /// for example `core:hadoop.tmp.dir`. For more information, see [Cluster
44765            /// properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
44766            pub properties: std::collections::HashMap<std::string::String, std::string::String>,
44767
44768            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44769        }
44770
44771        impl ContainerImageRuntime {
44772            pub fn new() -> Self {
44773                std::default::Default::default()
44774            }
44775
44776            /// Sets the value of [image][crate::model::task::infrastructure_spec::ContainerImageRuntime::image].
44777            ///
44778            /// # Example
44779            /// ```ignore,no_run
44780            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44781            /// let x = ContainerImageRuntime::new().set_image("example");
44782            /// ```
44783            pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44784                self.image = v.into();
44785                self
44786            }
44787
44788            /// Sets the value of [java_jars][crate::model::task::infrastructure_spec::ContainerImageRuntime::java_jars].
44789            ///
44790            /// # Example
44791            /// ```ignore,no_run
44792            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44793            /// let x = ContainerImageRuntime::new().set_java_jars(["a", "b", "c"]);
44794            /// ```
44795            pub fn set_java_jars<T, V>(mut self, v: T) -> Self
44796            where
44797                T: std::iter::IntoIterator<Item = V>,
44798                V: std::convert::Into<std::string::String>,
44799            {
44800                use std::iter::Iterator;
44801                self.java_jars = v.into_iter().map(|i| i.into()).collect();
44802                self
44803            }
44804
44805            /// Sets the value of [python_packages][crate::model::task::infrastructure_spec::ContainerImageRuntime::python_packages].
44806            ///
44807            /// # Example
44808            /// ```ignore,no_run
44809            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44810            /// let x = ContainerImageRuntime::new().set_python_packages(["a", "b", "c"]);
44811            /// ```
44812            pub fn set_python_packages<T, V>(mut self, v: T) -> Self
44813            where
44814                T: std::iter::IntoIterator<Item = V>,
44815                V: std::convert::Into<std::string::String>,
44816            {
44817                use std::iter::Iterator;
44818                self.python_packages = v.into_iter().map(|i| i.into()).collect();
44819                self
44820            }
44821
44822            /// Sets the value of [properties][crate::model::task::infrastructure_spec::ContainerImageRuntime::properties].
44823            ///
44824            /// # Example
44825            /// ```ignore,no_run
44826            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44827            /// let x = ContainerImageRuntime::new().set_properties([
44828            ///     ("key0", "abc"),
44829            ///     ("key1", "xyz"),
44830            /// ]);
44831            /// ```
44832            pub fn set_properties<T, K, V>(mut self, v: T) -> Self
44833            where
44834                T: std::iter::IntoIterator<Item = (K, V)>,
44835                K: std::convert::Into<std::string::String>,
44836                V: std::convert::Into<std::string::String>,
44837            {
44838                use std::iter::Iterator;
44839                self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
44840                self
44841            }
44842        }
44843
44844        impl wkt::message::Message for ContainerImageRuntime {
44845            fn typename() -> &'static str {
44846                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"
44847            }
44848        }
44849
44850        /// Cloud VPC Network used to run the infrastructure.
44851        #[derive(Clone, Default, PartialEq)]
44852        #[non_exhaustive]
44853        pub struct VpcNetwork {
44854            /// Optional. List of network tags to apply to the job.
44855            pub network_tags: std::vec::Vec<std::string::String>,
44856
44857            /// The Cloud VPC network identifier.
44858            pub network_name: std::option::Option<
44859                crate::model::task::infrastructure_spec::vpc_network::NetworkName,
44860            >,
44861
44862            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44863        }
44864
44865        impl VpcNetwork {
44866            pub fn new() -> Self {
44867                std::default::Default::default()
44868            }
44869
44870            /// Sets the value of [network_tags][crate::model::task::infrastructure_spec::VpcNetwork::network_tags].
44871            ///
44872            /// # Example
44873            /// ```ignore,no_run
44874            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44875            /// let x = VpcNetwork::new().set_network_tags(["a", "b", "c"]);
44876            /// ```
44877            pub fn set_network_tags<T, V>(mut self, v: T) -> Self
44878            where
44879                T: std::iter::IntoIterator<Item = V>,
44880                V: std::convert::Into<std::string::String>,
44881            {
44882                use std::iter::Iterator;
44883                self.network_tags = v.into_iter().map(|i| i.into()).collect();
44884                self
44885            }
44886
44887            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name].
44888            ///
44889            /// Note that all the setters affecting `network_name` are mutually
44890            /// exclusive.
44891            ///
44892            /// # Example
44893            /// ```ignore,no_run
44894            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44895            /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::vpc_network::NetworkName;
44896            /// let x = VpcNetwork::new().set_network_name(Some(NetworkName::Network("example".to_string())));
44897            /// ```
44898            pub fn set_network_name<
44899                T: std::convert::Into<
44900                        std::option::Option<
44901                            crate::model::task::infrastructure_spec::vpc_network::NetworkName,
44902                        >,
44903                    >,
44904            >(
44905                mut self,
44906                v: T,
44907            ) -> Self {
44908                self.network_name = v.into();
44909                self
44910            }
44911
44912            /// The value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44913            /// if it holds a `Network`, `None` if the field is not set or
44914            /// holds a different branch.
44915            pub fn network(&self) -> std::option::Option<&std::string::String> {
44916                #[allow(unreachable_patterns)]
44917                self.network_name.as_ref().and_then(|v| match v {
44918                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
44919                        v,
44920                    ) => std::option::Option::Some(v),
44921                    _ => std::option::Option::None,
44922                })
44923            }
44924
44925            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44926            /// to hold a `Network`.
44927            ///
44928            /// Note that all the setters affecting `network_name` are
44929            /// mutually exclusive.
44930            ///
44931            /// # Example
44932            /// ```ignore,no_run
44933            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44934            /// let x = VpcNetwork::new().set_network("example");
44935            /// assert!(x.network().is_some());
44936            /// assert!(x.sub_network().is_none());
44937            /// ```
44938            pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44939                self.network_name = std::option::Option::Some(
44940                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
44941                        v.into(),
44942                    ),
44943                );
44944                self
44945            }
44946
44947            /// The value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44948            /// if it holds a `SubNetwork`, `None` if the field is not set or
44949            /// holds a different branch.
44950            pub fn sub_network(&self) -> std::option::Option<&std::string::String> {
44951                #[allow(unreachable_patterns)]
44952                self.network_name.as_ref().and_then(|v| match v {
44953                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(v) => std::option::Option::Some(v),
44954                    _ => std::option::Option::None,
44955                })
44956            }
44957
44958            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44959            /// to hold a `SubNetwork`.
44960            ///
44961            /// Note that all the setters affecting `network_name` are
44962            /// mutually exclusive.
44963            ///
44964            /// # Example
44965            /// ```ignore,no_run
44966            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44967            /// let x = VpcNetwork::new().set_sub_network("example");
44968            /// assert!(x.sub_network().is_some());
44969            /// assert!(x.network().is_none());
44970            /// ```
44971            pub fn set_sub_network<T: std::convert::Into<std::string::String>>(
44972                mut self,
44973                v: T,
44974            ) -> Self {
44975                self.network_name = std::option::Option::Some(
44976                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(
44977                        v.into(),
44978                    ),
44979                );
44980                self
44981            }
44982        }
44983
44984        impl wkt::message::Message for VpcNetwork {
44985            fn typename() -> &'static str {
44986                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"
44987            }
44988        }
44989
44990        /// Defines additional types related to [VpcNetwork].
44991        pub mod vpc_network {
44992            #[allow(unused_imports)]
44993            use super::*;
44994
44995            /// The Cloud VPC network identifier.
44996            #[derive(Clone, Debug, PartialEq)]
44997            #[non_exhaustive]
44998            pub enum NetworkName {
44999                /// Optional. The Cloud VPC network in which the job is run. By default,
45000                /// the Cloud VPC network named Default within the project is used.
45001                Network(std::string::String),
45002                /// Optional. The Cloud VPC sub-network in which the job is run.
45003                SubNetwork(std::string::String),
45004            }
45005        }
45006
45007        /// Hardware config.
45008        #[derive(Clone, Debug, PartialEq)]
45009        #[non_exhaustive]
45010        pub enum Resources {
45011            /// Compute resources needed for a Task when using Dataproc Serverless.
45012            Batch(std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>),
45013        }
45014
45015        /// Software config.
45016        #[derive(Clone, Debug, PartialEq)]
45017        #[non_exhaustive]
45018        pub enum Runtime {
45019            /// Container Image Runtime Configuration.
45020            ContainerImage(
45021                std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
45022            ),
45023        }
45024
45025        /// Networking config.
45026        #[derive(Clone, Debug, PartialEq)]
45027        #[non_exhaustive]
45028        pub enum Network {
45029            /// Vpc network.
45030            VpcNetwork(std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>),
45031        }
45032    }
45033
45034    /// Task scheduling and trigger settings.
45035    #[derive(Clone, Default, PartialEq)]
45036    #[non_exhaustive]
45037    pub struct TriggerSpec {
45038        /// Required. Immutable. Trigger type of the user-specified Task.
45039        pub r#type: crate::model::task::trigger_spec::Type,
45040
45041        /// Optional. The first run of the task will be after this time.
45042        /// If not specified, the task will run shortly after being submitted if
45043        /// ON_DEMAND and based on the schedule if RECURRING.
45044        pub start_time: std::option::Option<wkt::Timestamp>,
45045
45046        /// Optional. Prevent the task from executing.
45047        /// This does not cancel already running tasks. It is intended to temporarily
45048        /// disable RECURRING tasks.
45049        pub disabled: bool,
45050
45051        /// Optional. Number of retry attempts before aborting.
45052        /// Set to zero to never attempt to retry a failed task.
45053        pub max_retries: i32,
45054
45055        /// Trigger only applies for RECURRING tasks.
45056        pub trigger: std::option::Option<crate::model::task::trigger_spec::Trigger>,
45057
45058        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45059    }
45060
45061    impl TriggerSpec {
45062        pub fn new() -> Self {
45063            std::default::Default::default()
45064        }
45065
45066        /// Sets the value of [r#type][crate::model::task::TriggerSpec::type].
45067        ///
45068        /// # Example
45069        /// ```ignore,no_run
45070        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45071        /// use google_cloud_dataplex_v1::model::task::trigger_spec::Type;
45072        /// let x0 = TriggerSpec::new().set_type(Type::OnDemand);
45073        /// let x1 = TriggerSpec::new().set_type(Type::Recurring);
45074        /// ```
45075        pub fn set_type<T: std::convert::Into<crate::model::task::trigger_spec::Type>>(
45076            mut self,
45077            v: T,
45078        ) -> Self {
45079            self.r#type = v.into();
45080            self
45081        }
45082
45083        /// Sets the value of [start_time][crate::model::task::TriggerSpec::start_time].
45084        ///
45085        /// # Example
45086        /// ```ignore,no_run
45087        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45088        /// use wkt::Timestamp;
45089        /// let x = TriggerSpec::new().set_start_time(Timestamp::default()/* use setters */);
45090        /// ```
45091        pub fn set_start_time<T>(mut self, v: T) -> Self
45092        where
45093            T: std::convert::Into<wkt::Timestamp>,
45094        {
45095            self.start_time = std::option::Option::Some(v.into());
45096            self
45097        }
45098
45099        /// Sets or clears the value of [start_time][crate::model::task::TriggerSpec::start_time].
45100        ///
45101        /// # Example
45102        /// ```ignore,no_run
45103        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45104        /// use wkt::Timestamp;
45105        /// let x = TriggerSpec::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
45106        /// let x = TriggerSpec::new().set_or_clear_start_time(None::<Timestamp>);
45107        /// ```
45108        pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
45109        where
45110            T: std::convert::Into<wkt::Timestamp>,
45111        {
45112            self.start_time = v.map(|x| x.into());
45113            self
45114        }
45115
45116        /// Sets the value of [disabled][crate::model::task::TriggerSpec::disabled].
45117        ///
45118        /// # Example
45119        /// ```ignore,no_run
45120        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45121        /// let x = TriggerSpec::new().set_disabled(true);
45122        /// ```
45123        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
45124            self.disabled = v.into();
45125            self
45126        }
45127
45128        /// Sets the value of [max_retries][crate::model::task::TriggerSpec::max_retries].
45129        ///
45130        /// # Example
45131        /// ```ignore,no_run
45132        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45133        /// let x = TriggerSpec::new().set_max_retries(42);
45134        /// ```
45135        pub fn set_max_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
45136            self.max_retries = v.into();
45137            self
45138        }
45139
45140        /// Sets the value of [trigger][crate::model::task::TriggerSpec::trigger].
45141        ///
45142        /// Note that all the setters affecting `trigger` are mutually
45143        /// exclusive.
45144        ///
45145        /// # Example
45146        /// ```ignore,no_run
45147        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45148        /// use google_cloud_dataplex_v1::model::task::trigger_spec::Trigger;
45149        /// let x = TriggerSpec::new().set_trigger(Some(Trigger::Schedule("example".to_string())));
45150        /// ```
45151        pub fn set_trigger<
45152            T: std::convert::Into<std::option::Option<crate::model::task::trigger_spec::Trigger>>,
45153        >(
45154            mut self,
45155            v: T,
45156        ) -> Self {
45157            self.trigger = v.into();
45158            self
45159        }
45160
45161        /// The value of [trigger][crate::model::task::TriggerSpec::trigger]
45162        /// if it holds a `Schedule`, `None` if the field is not set or
45163        /// holds a different branch.
45164        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
45165            #[allow(unreachable_patterns)]
45166            self.trigger.as_ref().and_then(|v| match v {
45167                crate::model::task::trigger_spec::Trigger::Schedule(v) => {
45168                    std::option::Option::Some(v)
45169                }
45170                _ => std::option::Option::None,
45171            })
45172        }
45173
45174        /// Sets the value of [trigger][crate::model::task::TriggerSpec::trigger]
45175        /// to hold a `Schedule`.
45176        ///
45177        /// Note that all the setters affecting `trigger` are
45178        /// mutually exclusive.
45179        ///
45180        /// # Example
45181        /// ```ignore,no_run
45182        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45183        /// let x = TriggerSpec::new().set_schedule("example");
45184        /// assert!(x.schedule().is_some());
45185        /// ```
45186        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45187            self.trigger = std::option::Option::Some(
45188                crate::model::task::trigger_spec::Trigger::Schedule(v.into()),
45189            );
45190            self
45191        }
45192    }
45193
45194    impl wkt::message::Message for TriggerSpec {
45195        fn typename() -> &'static str {
45196            "type.googleapis.com/google.cloud.dataplex.v1.Task.TriggerSpec"
45197        }
45198    }
45199
45200    /// Defines additional types related to [TriggerSpec].
45201    pub mod trigger_spec {
45202        #[allow(unused_imports)]
45203        use super::*;
45204
45205        /// Determines how often and when the job will run.
45206        ///
45207        /// # Working with unknown values
45208        ///
45209        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
45210        /// additional enum variants at any time. Adding new variants is not considered
45211        /// a breaking change. Applications should write their code in anticipation of:
45212        ///
45213        /// - New values appearing in future releases of the client library, **and**
45214        /// - New values received dynamically, without application changes.
45215        ///
45216        /// Please consult the [Working with enums] section in the user guide for some
45217        /// guidelines.
45218        ///
45219        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
45220        #[derive(Clone, Debug, PartialEq)]
45221        #[non_exhaustive]
45222        pub enum Type {
45223            /// Unspecified trigger type.
45224            Unspecified,
45225            /// The task runs one-time shortly after Task Creation.
45226            OnDemand,
45227            /// The task is scheduled to run periodically.
45228            Recurring,
45229            /// If set, the enum was initialized with an unknown value.
45230            ///
45231            /// Applications can examine the value using [Type::value] or
45232            /// [Type::name].
45233            UnknownValue(r#type::UnknownValue),
45234        }
45235
45236        #[doc(hidden)]
45237        pub mod r#type {
45238            #[allow(unused_imports)]
45239            use super::*;
45240            #[derive(Clone, Debug, PartialEq)]
45241            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
45242        }
45243
45244        impl Type {
45245            /// Gets the enum value.
45246            ///
45247            /// Returns `None` if the enum contains an unknown value deserialized from
45248            /// the string representation of enums.
45249            pub fn value(&self) -> std::option::Option<i32> {
45250                match self {
45251                    Self::Unspecified => std::option::Option::Some(0),
45252                    Self::OnDemand => std::option::Option::Some(1),
45253                    Self::Recurring => std::option::Option::Some(2),
45254                    Self::UnknownValue(u) => u.0.value(),
45255                }
45256            }
45257
45258            /// Gets the enum value as a string.
45259            ///
45260            /// Returns `None` if the enum contains an unknown value deserialized from
45261            /// the integer representation of enums.
45262            pub fn name(&self) -> std::option::Option<&str> {
45263                match self {
45264                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
45265                    Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
45266                    Self::Recurring => std::option::Option::Some("RECURRING"),
45267                    Self::UnknownValue(u) => u.0.name(),
45268                }
45269            }
45270        }
45271
45272        impl std::default::Default for Type {
45273            fn default() -> Self {
45274                use std::convert::From;
45275                Self::from(0)
45276            }
45277        }
45278
45279        impl std::fmt::Display for Type {
45280            fn fmt(
45281                &self,
45282                f: &mut std::fmt::Formatter<'_>,
45283            ) -> std::result::Result<(), std::fmt::Error> {
45284                wkt::internal::display_enum(f, self.name(), self.value())
45285            }
45286        }
45287
45288        impl std::convert::From<i32> for Type {
45289            fn from(value: i32) -> Self {
45290                match value {
45291                    0 => Self::Unspecified,
45292                    1 => Self::OnDemand,
45293                    2 => Self::Recurring,
45294                    _ => Self::UnknownValue(r#type::UnknownValue(
45295                        wkt::internal::UnknownEnumValue::Integer(value),
45296                    )),
45297                }
45298            }
45299        }
45300
45301        impl std::convert::From<&str> for Type {
45302            fn from(value: &str) -> Self {
45303                use std::string::ToString;
45304                match value {
45305                    "TYPE_UNSPECIFIED" => Self::Unspecified,
45306                    "ON_DEMAND" => Self::OnDemand,
45307                    "RECURRING" => Self::Recurring,
45308                    _ => Self::UnknownValue(r#type::UnknownValue(
45309                        wkt::internal::UnknownEnumValue::String(value.to_string()),
45310                    )),
45311                }
45312            }
45313        }
45314
45315        impl serde::ser::Serialize for Type {
45316            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
45317            where
45318                S: serde::Serializer,
45319            {
45320                match self {
45321                    Self::Unspecified => serializer.serialize_i32(0),
45322                    Self::OnDemand => serializer.serialize_i32(1),
45323                    Self::Recurring => serializer.serialize_i32(2),
45324                    Self::UnknownValue(u) => u.0.serialize(serializer),
45325                }
45326            }
45327        }
45328
45329        impl<'de> serde::de::Deserialize<'de> for Type {
45330            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
45331            where
45332                D: serde::Deserializer<'de>,
45333            {
45334                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
45335                    ".google.cloud.dataplex.v1.Task.TriggerSpec.Type",
45336                ))
45337            }
45338        }
45339
45340        /// Trigger only applies for RECURRING tasks.
45341        #[derive(Clone, Debug, PartialEq)]
45342        #[non_exhaustive]
45343        pub enum Trigger {
45344            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
45345            /// running tasks periodically. To explicitly set a timezone to the cron
45346            /// tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
45347            /// "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid
45348            /// string from IANA time zone database. For example,
45349            /// `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * *
45350            /// *`. This field is required for RECURRING tasks.
45351            Schedule(std::string::String),
45352        }
45353    }
45354
45355    /// Execution related settings, like retry and service_account.
45356    #[derive(Clone, Default, PartialEq)]
45357    #[non_exhaustive]
45358    pub struct ExecutionSpec {
45359        /// Optional. The arguments to pass to the task.
45360        /// The args can use placeholders of the format ${placeholder} as
45361        /// part of key/value string. These will be interpolated before passing the
45362        /// args to the driver. Currently supported placeholders:
45363        ///
45364        /// - ${task_id}
45365        /// - ${job_time}
45366        ///   To pass positional args, set the key as TASK_ARGS. The value should be a
45367        ///   comma-separated string of all the positional arguments. To use a
45368        ///   delimiter other than comma, refer to
45369        ///   <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of
45370        ///   other keys being present in the args, then TASK_ARGS will be passed as
45371        ///   the last argument.
45372        pub args: std::collections::HashMap<std::string::String, std::string::String>,
45373
45374        /// Required. Service account to use to execute a task.
45375        /// If not provided, the default Compute service account for the project is
45376        /// used.
45377        pub service_account: std::string::String,
45378
45379        /// Optional. The project in which jobs are run. By default, the project
45380        /// containing the Lake is used. If a project is provided, the
45381        /// [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
45382        /// must belong to this project.
45383        ///
45384        /// [google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]: crate::model::task::ExecutionSpec::service_account
45385        pub project: std::string::String,
45386
45387        /// Optional. The maximum duration after which the job execution is expired.
45388        pub max_job_execution_lifetime: std::option::Option<wkt::Duration>,
45389
45390        /// Optional. The Cloud KMS key to use for encryption, of the form:
45391        /// `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`.
45392        pub kms_key: std::string::String,
45393
45394        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45395    }
45396
45397    impl ExecutionSpec {
45398        pub fn new() -> Self {
45399            std::default::Default::default()
45400        }
45401
45402        /// Sets the value of [args][crate::model::task::ExecutionSpec::args].
45403        ///
45404        /// # Example
45405        /// ```ignore,no_run
45406        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45407        /// let x = ExecutionSpec::new().set_args([
45408        ///     ("key0", "abc"),
45409        ///     ("key1", "xyz"),
45410        /// ]);
45411        /// ```
45412        pub fn set_args<T, K, V>(mut self, v: T) -> Self
45413        where
45414            T: std::iter::IntoIterator<Item = (K, V)>,
45415            K: std::convert::Into<std::string::String>,
45416            V: std::convert::Into<std::string::String>,
45417        {
45418            use std::iter::Iterator;
45419            self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
45420            self
45421        }
45422
45423        /// Sets the value of [service_account][crate::model::task::ExecutionSpec::service_account].
45424        ///
45425        /// # Example
45426        /// ```ignore,no_run
45427        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45428        /// let x = ExecutionSpec::new().set_service_account("example");
45429        /// ```
45430        pub fn set_service_account<T: std::convert::Into<std::string::String>>(
45431            mut self,
45432            v: T,
45433        ) -> Self {
45434            self.service_account = v.into();
45435            self
45436        }
45437
45438        /// Sets the value of [project][crate::model::task::ExecutionSpec::project].
45439        ///
45440        /// # Example
45441        /// ```ignore,no_run
45442        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45443        /// let x = ExecutionSpec::new().set_project("example");
45444        /// ```
45445        pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45446            self.project = v.into();
45447            self
45448        }
45449
45450        /// Sets the value of [max_job_execution_lifetime][crate::model::task::ExecutionSpec::max_job_execution_lifetime].
45451        ///
45452        /// # Example
45453        /// ```ignore,no_run
45454        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45455        /// use wkt::Duration;
45456        /// let x = ExecutionSpec::new().set_max_job_execution_lifetime(Duration::default()/* use setters */);
45457        /// ```
45458        pub fn set_max_job_execution_lifetime<T>(mut self, v: T) -> Self
45459        where
45460            T: std::convert::Into<wkt::Duration>,
45461        {
45462            self.max_job_execution_lifetime = std::option::Option::Some(v.into());
45463            self
45464        }
45465
45466        /// Sets or clears the value of [max_job_execution_lifetime][crate::model::task::ExecutionSpec::max_job_execution_lifetime].
45467        ///
45468        /// # Example
45469        /// ```ignore,no_run
45470        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45471        /// use wkt::Duration;
45472        /// let x = ExecutionSpec::new().set_or_clear_max_job_execution_lifetime(Some(Duration::default()/* use setters */));
45473        /// let x = ExecutionSpec::new().set_or_clear_max_job_execution_lifetime(None::<Duration>);
45474        /// ```
45475        pub fn set_or_clear_max_job_execution_lifetime<T>(
45476            mut self,
45477            v: std::option::Option<T>,
45478        ) -> Self
45479        where
45480            T: std::convert::Into<wkt::Duration>,
45481        {
45482            self.max_job_execution_lifetime = v.map(|x| x.into());
45483            self
45484        }
45485
45486        /// Sets the value of [kms_key][crate::model::task::ExecutionSpec::kms_key].
45487        ///
45488        /// # Example
45489        /// ```ignore,no_run
45490        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45491        /// let x = ExecutionSpec::new().set_kms_key("example");
45492        /// ```
45493        pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45494            self.kms_key = v.into();
45495            self
45496        }
45497    }
45498
45499    impl wkt::message::Message for ExecutionSpec {
45500        fn typename() -> &'static str {
45501            "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionSpec"
45502        }
45503    }
45504
45505    /// User-specified config for running a Spark task.
45506    #[derive(Clone, Default, PartialEq)]
45507    #[non_exhaustive]
45508    pub struct SparkTaskConfig {
45509        /// Optional. Cloud Storage URIs of files to be placed in the working
45510        /// directory of each executor.
45511        pub file_uris: std::vec::Vec<std::string::String>,
45512
45513        /// Optional. Cloud Storage URIs of archives to be extracted into the working
45514        /// directory of each executor. Supported file types: .jar, .tar, .tar.gz,
45515        /// .tgz, and .zip.
45516        pub archive_uris: std::vec::Vec<std::string::String>,
45517
45518        /// Optional. Infrastructure specification for the execution.
45519        pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
45520
45521        /// Required. The specification of the main method to call to drive the
45522        /// job. Specify either the jar file that contains the main class or the
45523        /// main class name.
45524        pub driver: std::option::Option<crate::model::task::spark_task_config::Driver>,
45525
45526        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45527    }
45528
45529    impl SparkTaskConfig {
45530        pub fn new() -> Self {
45531            std::default::Default::default()
45532        }
45533
45534        /// Sets the value of [file_uris][crate::model::task::SparkTaskConfig::file_uris].
45535        ///
45536        /// # Example
45537        /// ```ignore,no_run
45538        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45539        /// let x = SparkTaskConfig::new().set_file_uris(["a", "b", "c"]);
45540        /// ```
45541        pub fn set_file_uris<T, V>(mut self, v: T) -> Self
45542        where
45543            T: std::iter::IntoIterator<Item = V>,
45544            V: std::convert::Into<std::string::String>,
45545        {
45546            use std::iter::Iterator;
45547            self.file_uris = v.into_iter().map(|i| i.into()).collect();
45548            self
45549        }
45550
45551        /// Sets the value of [archive_uris][crate::model::task::SparkTaskConfig::archive_uris].
45552        ///
45553        /// # Example
45554        /// ```ignore,no_run
45555        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45556        /// let x = SparkTaskConfig::new().set_archive_uris(["a", "b", "c"]);
45557        /// ```
45558        pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
45559        where
45560            T: std::iter::IntoIterator<Item = V>,
45561            V: std::convert::Into<std::string::String>,
45562        {
45563            use std::iter::Iterator;
45564            self.archive_uris = v.into_iter().map(|i| i.into()).collect();
45565            self
45566        }
45567
45568        /// Sets the value of [infrastructure_spec][crate::model::task::SparkTaskConfig::infrastructure_spec].
45569        ///
45570        /// # Example
45571        /// ```ignore,no_run
45572        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45573        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45574        /// let x = SparkTaskConfig::new().set_infrastructure_spec(InfrastructureSpec::default()/* use setters */);
45575        /// ```
45576        pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
45577        where
45578            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45579        {
45580            self.infrastructure_spec = std::option::Option::Some(v.into());
45581            self
45582        }
45583
45584        /// Sets or clears the value of [infrastructure_spec][crate::model::task::SparkTaskConfig::infrastructure_spec].
45585        ///
45586        /// # Example
45587        /// ```ignore,no_run
45588        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45589        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45590        /// let x = SparkTaskConfig::new().set_or_clear_infrastructure_spec(Some(InfrastructureSpec::default()/* use setters */));
45591        /// let x = SparkTaskConfig::new().set_or_clear_infrastructure_spec(None::<InfrastructureSpec>);
45592        /// ```
45593        pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
45594        where
45595            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45596        {
45597            self.infrastructure_spec = v.map(|x| x.into());
45598            self
45599        }
45600
45601        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver].
45602        ///
45603        /// Note that all the setters affecting `driver` are mutually
45604        /// exclusive.
45605        ///
45606        /// # Example
45607        /// ```ignore,no_run
45608        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45609        /// use google_cloud_dataplex_v1::model::task::spark_task_config::Driver;
45610        /// let x = SparkTaskConfig::new().set_driver(Some(Driver::MainJarFileUri("example".to_string())));
45611        /// ```
45612        pub fn set_driver<
45613            T: std::convert::Into<std::option::Option<crate::model::task::spark_task_config::Driver>>,
45614        >(
45615            mut self,
45616            v: T,
45617        ) -> Self {
45618            self.driver = v.into();
45619            self
45620        }
45621
45622        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45623        /// if it holds a `MainJarFileUri`, `None` if the field is not set or
45624        /// holds a different branch.
45625        pub fn main_jar_file_uri(&self) -> std::option::Option<&std::string::String> {
45626            #[allow(unreachable_patterns)]
45627            self.driver.as_ref().and_then(|v| match v {
45628                crate::model::task::spark_task_config::Driver::MainJarFileUri(v) => {
45629                    std::option::Option::Some(v)
45630                }
45631                _ => std::option::Option::None,
45632            })
45633        }
45634
45635        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45636        /// to hold a `MainJarFileUri`.
45637        ///
45638        /// Note that all the setters affecting `driver` are
45639        /// mutually exclusive.
45640        ///
45641        /// # Example
45642        /// ```ignore,no_run
45643        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45644        /// let x = SparkTaskConfig::new().set_main_jar_file_uri("example");
45645        /// assert!(x.main_jar_file_uri().is_some());
45646        /// assert!(x.main_class().is_none());
45647        /// assert!(x.python_script_file().is_none());
45648        /// assert!(x.sql_script_file().is_none());
45649        /// assert!(x.sql_script().is_none());
45650        /// ```
45651        pub fn set_main_jar_file_uri<T: std::convert::Into<std::string::String>>(
45652            mut self,
45653            v: T,
45654        ) -> Self {
45655            self.driver = std::option::Option::Some(
45656                crate::model::task::spark_task_config::Driver::MainJarFileUri(v.into()),
45657            );
45658            self
45659        }
45660
45661        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45662        /// if it holds a `MainClass`, `None` if the field is not set or
45663        /// holds a different branch.
45664        pub fn main_class(&self) -> std::option::Option<&std::string::String> {
45665            #[allow(unreachable_patterns)]
45666            self.driver.as_ref().and_then(|v| match v {
45667                crate::model::task::spark_task_config::Driver::MainClass(v) => {
45668                    std::option::Option::Some(v)
45669                }
45670                _ => std::option::Option::None,
45671            })
45672        }
45673
45674        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45675        /// to hold a `MainClass`.
45676        ///
45677        /// Note that all the setters affecting `driver` are
45678        /// mutually exclusive.
45679        ///
45680        /// # Example
45681        /// ```ignore,no_run
45682        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45683        /// let x = SparkTaskConfig::new().set_main_class("example");
45684        /// assert!(x.main_class().is_some());
45685        /// assert!(x.main_jar_file_uri().is_none());
45686        /// assert!(x.python_script_file().is_none());
45687        /// assert!(x.sql_script_file().is_none());
45688        /// assert!(x.sql_script().is_none());
45689        /// ```
45690        pub fn set_main_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45691            self.driver = std::option::Option::Some(
45692                crate::model::task::spark_task_config::Driver::MainClass(v.into()),
45693            );
45694            self
45695        }
45696
45697        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45698        /// if it holds a `PythonScriptFile`, `None` if the field is not set or
45699        /// holds a different branch.
45700        pub fn python_script_file(&self) -> std::option::Option<&std::string::String> {
45701            #[allow(unreachable_patterns)]
45702            self.driver.as_ref().and_then(|v| match v {
45703                crate::model::task::spark_task_config::Driver::PythonScriptFile(v) => {
45704                    std::option::Option::Some(v)
45705                }
45706                _ => std::option::Option::None,
45707            })
45708        }
45709
45710        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45711        /// to hold a `PythonScriptFile`.
45712        ///
45713        /// Note that all the setters affecting `driver` are
45714        /// mutually exclusive.
45715        ///
45716        /// # Example
45717        /// ```ignore,no_run
45718        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45719        /// let x = SparkTaskConfig::new().set_python_script_file("example");
45720        /// assert!(x.python_script_file().is_some());
45721        /// assert!(x.main_jar_file_uri().is_none());
45722        /// assert!(x.main_class().is_none());
45723        /// assert!(x.sql_script_file().is_none());
45724        /// assert!(x.sql_script().is_none());
45725        /// ```
45726        pub fn set_python_script_file<T: std::convert::Into<std::string::String>>(
45727            mut self,
45728            v: T,
45729        ) -> Self {
45730            self.driver = std::option::Option::Some(
45731                crate::model::task::spark_task_config::Driver::PythonScriptFile(v.into()),
45732            );
45733            self
45734        }
45735
45736        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45737        /// if it holds a `SqlScriptFile`, `None` if the field is not set or
45738        /// holds a different branch.
45739        pub fn sql_script_file(&self) -> std::option::Option<&std::string::String> {
45740            #[allow(unreachable_patterns)]
45741            self.driver.as_ref().and_then(|v| match v {
45742                crate::model::task::spark_task_config::Driver::SqlScriptFile(v) => {
45743                    std::option::Option::Some(v)
45744                }
45745                _ => std::option::Option::None,
45746            })
45747        }
45748
45749        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45750        /// to hold a `SqlScriptFile`.
45751        ///
45752        /// Note that all the setters affecting `driver` are
45753        /// mutually exclusive.
45754        ///
45755        /// # Example
45756        /// ```ignore,no_run
45757        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45758        /// let x = SparkTaskConfig::new().set_sql_script_file("example");
45759        /// assert!(x.sql_script_file().is_some());
45760        /// assert!(x.main_jar_file_uri().is_none());
45761        /// assert!(x.main_class().is_none());
45762        /// assert!(x.python_script_file().is_none());
45763        /// assert!(x.sql_script().is_none());
45764        /// ```
45765        pub fn set_sql_script_file<T: std::convert::Into<std::string::String>>(
45766            mut self,
45767            v: T,
45768        ) -> Self {
45769            self.driver = std::option::Option::Some(
45770                crate::model::task::spark_task_config::Driver::SqlScriptFile(v.into()),
45771            );
45772            self
45773        }
45774
45775        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45776        /// if it holds a `SqlScript`, `None` if the field is not set or
45777        /// holds a different branch.
45778        pub fn sql_script(&self) -> std::option::Option<&std::string::String> {
45779            #[allow(unreachable_patterns)]
45780            self.driver.as_ref().and_then(|v| match v {
45781                crate::model::task::spark_task_config::Driver::SqlScript(v) => {
45782                    std::option::Option::Some(v)
45783                }
45784                _ => std::option::Option::None,
45785            })
45786        }
45787
45788        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45789        /// to hold a `SqlScript`.
45790        ///
45791        /// Note that all the setters affecting `driver` are
45792        /// mutually exclusive.
45793        ///
45794        /// # Example
45795        /// ```ignore,no_run
45796        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45797        /// let x = SparkTaskConfig::new().set_sql_script("example");
45798        /// assert!(x.sql_script().is_some());
45799        /// assert!(x.main_jar_file_uri().is_none());
45800        /// assert!(x.main_class().is_none());
45801        /// assert!(x.python_script_file().is_none());
45802        /// assert!(x.sql_script_file().is_none());
45803        /// ```
45804        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45805            self.driver = std::option::Option::Some(
45806                crate::model::task::spark_task_config::Driver::SqlScript(v.into()),
45807            );
45808            self
45809        }
45810    }
45811
45812    impl wkt::message::Message for SparkTaskConfig {
45813        fn typename() -> &'static str {
45814            "type.googleapis.com/google.cloud.dataplex.v1.Task.SparkTaskConfig"
45815        }
45816    }
45817
45818    /// Defines additional types related to [SparkTaskConfig].
45819    pub mod spark_task_config {
45820        #[allow(unused_imports)]
45821        use super::*;
45822
45823        /// Required. The specification of the main method to call to drive the
45824        /// job. Specify either the jar file that contains the main class or the
45825        /// main class name.
45826        #[derive(Clone, Debug, PartialEq)]
45827        #[non_exhaustive]
45828        pub enum Driver {
45829            /// The Cloud Storage URI of the jar file that contains the main class.
45830            /// The execution args are passed in as a sequence of named process
45831            /// arguments (`--key=value`).
45832            MainJarFileUri(std::string::String),
45833            /// The name of the driver's main class. The jar file that contains the
45834            /// class must be in the default CLASSPATH or specified in
45835            /// `jar_file_uris`.
45836            /// The execution args are passed in as a sequence of named process
45837            /// arguments (`--key=value`).
45838            MainClass(std::string::String),
45839            /// The Gcloud Storage URI of the main Python file to use as the driver.
45840            /// Must be a .py file. The execution args are passed in as a sequence of
45841            /// named process arguments (`--key=value`).
45842            PythonScriptFile(std::string::String),
45843            /// A reference to a query file. This should be the Cloud Storage URI of
45844            /// the query file. The execution args are used to declare a set of script
45845            /// variables (`set key="value";`).
45846            SqlScriptFile(std::string::String),
45847            /// The query text.
45848            /// The execution args are used to declare a set of script variables
45849            /// (`set key="value";`).
45850            SqlScript(std::string::String),
45851        }
45852    }
45853
45854    /// Config for running scheduled notebooks.
45855    #[derive(Clone, Default, PartialEq)]
45856    #[non_exhaustive]
45857    pub struct NotebookTaskConfig {
45858        /// Required. Path to input notebook. This can be the Cloud Storage URI of
45859        /// the notebook file or the path to a Notebook Content. The execution args
45860        /// are accessible as environment variables
45861        /// (`TASK_key=value`).
45862        pub notebook: std::string::String,
45863
45864        /// Optional. Infrastructure specification for the execution.
45865        pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
45866
45867        /// Optional. Cloud Storage URIs of files to be placed in the working
45868        /// directory of each executor.
45869        pub file_uris: std::vec::Vec<std::string::String>,
45870
45871        /// Optional. Cloud Storage URIs of archives to be extracted into the working
45872        /// directory of each executor. Supported file types: .jar, .tar, .tar.gz,
45873        /// .tgz, and .zip.
45874        pub archive_uris: std::vec::Vec<std::string::String>,
45875
45876        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45877    }
45878
45879    impl NotebookTaskConfig {
45880        pub fn new() -> Self {
45881            std::default::Default::default()
45882        }
45883
45884        /// Sets the value of [notebook][crate::model::task::NotebookTaskConfig::notebook].
45885        ///
45886        /// # Example
45887        /// ```ignore,no_run
45888        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45889        /// let x = NotebookTaskConfig::new().set_notebook("example");
45890        /// ```
45891        pub fn set_notebook<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45892            self.notebook = v.into();
45893            self
45894        }
45895
45896        /// Sets the value of [infrastructure_spec][crate::model::task::NotebookTaskConfig::infrastructure_spec].
45897        ///
45898        /// # Example
45899        /// ```ignore,no_run
45900        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45901        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45902        /// let x = NotebookTaskConfig::new().set_infrastructure_spec(InfrastructureSpec::default()/* use setters */);
45903        /// ```
45904        pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
45905        where
45906            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45907        {
45908            self.infrastructure_spec = std::option::Option::Some(v.into());
45909            self
45910        }
45911
45912        /// Sets or clears the value of [infrastructure_spec][crate::model::task::NotebookTaskConfig::infrastructure_spec].
45913        ///
45914        /// # Example
45915        /// ```ignore,no_run
45916        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45917        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45918        /// let x = NotebookTaskConfig::new().set_or_clear_infrastructure_spec(Some(InfrastructureSpec::default()/* use setters */));
45919        /// let x = NotebookTaskConfig::new().set_or_clear_infrastructure_spec(None::<InfrastructureSpec>);
45920        /// ```
45921        pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
45922        where
45923            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45924        {
45925            self.infrastructure_spec = v.map(|x| x.into());
45926            self
45927        }
45928
45929        /// Sets the value of [file_uris][crate::model::task::NotebookTaskConfig::file_uris].
45930        ///
45931        /// # Example
45932        /// ```ignore,no_run
45933        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45934        /// let x = NotebookTaskConfig::new().set_file_uris(["a", "b", "c"]);
45935        /// ```
45936        pub fn set_file_uris<T, V>(mut self, v: T) -> Self
45937        where
45938            T: std::iter::IntoIterator<Item = V>,
45939            V: std::convert::Into<std::string::String>,
45940        {
45941            use std::iter::Iterator;
45942            self.file_uris = v.into_iter().map(|i| i.into()).collect();
45943            self
45944        }
45945
45946        /// Sets the value of [archive_uris][crate::model::task::NotebookTaskConfig::archive_uris].
45947        ///
45948        /// # Example
45949        /// ```ignore,no_run
45950        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45951        /// let x = NotebookTaskConfig::new().set_archive_uris(["a", "b", "c"]);
45952        /// ```
45953        pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
45954        where
45955            T: std::iter::IntoIterator<Item = V>,
45956            V: std::convert::Into<std::string::String>,
45957        {
45958            use std::iter::Iterator;
45959            self.archive_uris = v.into_iter().map(|i| i.into()).collect();
45960            self
45961        }
45962    }
45963
45964    impl wkt::message::Message for NotebookTaskConfig {
45965        fn typename() -> &'static str {
45966            "type.googleapis.com/google.cloud.dataplex.v1.Task.NotebookTaskConfig"
45967        }
45968    }
45969
45970    /// Status of the task execution (e.g. Jobs).
45971    #[derive(Clone, Default, PartialEq)]
45972    #[non_exhaustive]
45973    pub struct ExecutionStatus {
45974        /// Output only. Last update time of the status.
45975        pub update_time: std::option::Option<wkt::Timestamp>,
45976
45977        /// Output only. latest job execution
45978        pub latest_job: std::option::Option<crate::model::Job>,
45979
45980        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45981    }
45982
45983    impl ExecutionStatus {
45984        pub fn new() -> Self {
45985            std::default::Default::default()
45986        }
45987
45988        /// Sets the value of [update_time][crate::model::task::ExecutionStatus::update_time].
45989        ///
45990        /// # Example
45991        /// ```ignore,no_run
45992        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
45993        /// use wkt::Timestamp;
45994        /// let x = ExecutionStatus::new().set_update_time(Timestamp::default()/* use setters */);
45995        /// ```
45996        pub fn set_update_time<T>(mut self, v: T) -> Self
45997        where
45998            T: std::convert::Into<wkt::Timestamp>,
45999        {
46000            self.update_time = std::option::Option::Some(v.into());
46001            self
46002        }
46003
46004        /// Sets or clears the value of [update_time][crate::model::task::ExecutionStatus::update_time].
46005        ///
46006        /// # Example
46007        /// ```ignore,no_run
46008        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
46009        /// use wkt::Timestamp;
46010        /// let x = ExecutionStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
46011        /// let x = ExecutionStatus::new().set_or_clear_update_time(None::<Timestamp>);
46012        /// ```
46013        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
46014        where
46015            T: std::convert::Into<wkt::Timestamp>,
46016        {
46017            self.update_time = v.map(|x| x.into());
46018            self
46019        }
46020
46021        /// Sets the value of [latest_job][crate::model::task::ExecutionStatus::latest_job].
46022        ///
46023        /// # Example
46024        /// ```ignore,no_run
46025        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
46026        /// use google_cloud_dataplex_v1::model::Job;
46027        /// let x = ExecutionStatus::new().set_latest_job(Job::default()/* use setters */);
46028        /// ```
46029        pub fn set_latest_job<T>(mut self, v: T) -> Self
46030        where
46031            T: std::convert::Into<crate::model::Job>,
46032        {
46033            self.latest_job = std::option::Option::Some(v.into());
46034            self
46035        }
46036
46037        /// Sets or clears the value of [latest_job][crate::model::task::ExecutionStatus::latest_job].
46038        ///
46039        /// # Example
46040        /// ```ignore,no_run
46041        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
46042        /// use google_cloud_dataplex_v1::model::Job;
46043        /// let x = ExecutionStatus::new().set_or_clear_latest_job(Some(Job::default()/* use setters */));
46044        /// let x = ExecutionStatus::new().set_or_clear_latest_job(None::<Job>);
46045        /// ```
46046        pub fn set_or_clear_latest_job<T>(mut self, v: std::option::Option<T>) -> Self
46047        where
46048            T: std::convert::Into<crate::model::Job>,
46049        {
46050            self.latest_job = v.map(|x| x.into());
46051            self
46052        }
46053    }
46054
46055    impl wkt::message::Message for ExecutionStatus {
46056        fn typename() -> &'static str {
46057            "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionStatus"
46058        }
46059    }
46060
46061    /// Task template specific user-specified config.
46062    #[derive(Clone, Debug, PartialEq)]
46063    #[non_exhaustive]
46064    pub enum Config {
46065        /// Config related to running custom Spark tasks.
46066        Spark(std::boxed::Box<crate::model::task::SparkTaskConfig>),
46067        /// Config related to running scheduled Notebooks.
46068        Notebook(std::boxed::Box<crate::model::task::NotebookTaskConfig>),
46069    }
46070}
46071
46072/// A job represents an instance of a task.
46073#[derive(Clone, Default, PartialEq)]
46074#[non_exhaustive]
46075pub struct Job {
46076    /// Output only. The relative resource name of the job, of the form:
46077    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
46078    pub name: std::string::String,
46079
46080    /// Output only. System generated globally unique ID for the job.
46081    pub uid: std::string::String,
46082
46083    /// Output only. The time when the job was started.
46084    pub start_time: std::option::Option<wkt::Timestamp>,
46085
46086    /// Output only. The time when the job ended.
46087    pub end_time: std::option::Option<wkt::Timestamp>,
46088
46089    /// Output only. Execution state for the job.
46090    pub state: crate::model::job::State,
46091
46092    /// Output only. The number of times the job has been retried (excluding the
46093    /// initial attempt).
46094    pub retry_count: u32,
46095
46096    /// Output only. The underlying service running a job.
46097    pub service: crate::model::job::Service,
46098
46099    /// Output only. The full resource name for the job run under a particular
46100    /// service.
46101    pub service_job: std::string::String,
46102
46103    /// Output only. Additional information about the current state.
46104    pub message: std::string::String,
46105
46106    /// Output only. User-defined labels for the task.
46107    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
46108
46109    /// Output only. Job execution trigger.
46110    pub trigger: crate::model::job::Trigger,
46111
46112    /// Output only. Spec related to how a task is executed.
46113    pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
46114
46115    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46116}
46117
46118impl Job {
46119    pub fn new() -> Self {
46120        std::default::Default::default()
46121    }
46122
46123    /// Sets the value of [name][crate::model::Job::name].
46124    ///
46125    /// # Example
46126    /// ```ignore,no_run
46127    /// # use google_cloud_dataplex_v1::model::Job;
46128    /// let x = Job::new().set_name("example");
46129    /// ```
46130    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46131        self.name = v.into();
46132        self
46133    }
46134
46135    /// Sets the value of [uid][crate::model::Job::uid].
46136    ///
46137    /// # Example
46138    /// ```ignore,no_run
46139    /// # use google_cloud_dataplex_v1::model::Job;
46140    /// let x = Job::new().set_uid("example");
46141    /// ```
46142    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46143        self.uid = v.into();
46144        self
46145    }
46146
46147    /// Sets the value of [start_time][crate::model::Job::start_time].
46148    ///
46149    /// # Example
46150    /// ```ignore,no_run
46151    /// # use google_cloud_dataplex_v1::model::Job;
46152    /// use wkt::Timestamp;
46153    /// let x = Job::new().set_start_time(Timestamp::default()/* use setters */);
46154    /// ```
46155    pub fn set_start_time<T>(mut self, v: T) -> Self
46156    where
46157        T: std::convert::Into<wkt::Timestamp>,
46158    {
46159        self.start_time = std::option::Option::Some(v.into());
46160        self
46161    }
46162
46163    /// Sets or clears the value of [start_time][crate::model::Job::start_time].
46164    ///
46165    /// # Example
46166    /// ```ignore,no_run
46167    /// # use google_cloud_dataplex_v1::model::Job;
46168    /// use wkt::Timestamp;
46169    /// let x = Job::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
46170    /// let x = Job::new().set_or_clear_start_time(None::<Timestamp>);
46171    /// ```
46172    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
46173    where
46174        T: std::convert::Into<wkt::Timestamp>,
46175    {
46176        self.start_time = v.map(|x| x.into());
46177        self
46178    }
46179
46180    /// Sets the value of [end_time][crate::model::Job::end_time].
46181    ///
46182    /// # Example
46183    /// ```ignore,no_run
46184    /// # use google_cloud_dataplex_v1::model::Job;
46185    /// use wkt::Timestamp;
46186    /// let x = Job::new().set_end_time(Timestamp::default()/* use setters */);
46187    /// ```
46188    pub fn set_end_time<T>(mut self, v: T) -> Self
46189    where
46190        T: std::convert::Into<wkt::Timestamp>,
46191    {
46192        self.end_time = std::option::Option::Some(v.into());
46193        self
46194    }
46195
46196    /// Sets or clears the value of [end_time][crate::model::Job::end_time].
46197    ///
46198    /// # Example
46199    /// ```ignore,no_run
46200    /// # use google_cloud_dataplex_v1::model::Job;
46201    /// use wkt::Timestamp;
46202    /// let x = Job::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
46203    /// let x = Job::new().set_or_clear_end_time(None::<Timestamp>);
46204    /// ```
46205    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
46206    where
46207        T: std::convert::Into<wkt::Timestamp>,
46208    {
46209        self.end_time = v.map(|x| x.into());
46210        self
46211    }
46212
46213    /// Sets the value of [state][crate::model::Job::state].
46214    ///
46215    /// # Example
46216    /// ```ignore,no_run
46217    /// # use google_cloud_dataplex_v1::model::Job;
46218    /// use google_cloud_dataplex_v1::model::job::State;
46219    /// let x0 = Job::new().set_state(State::Running);
46220    /// let x1 = Job::new().set_state(State::Cancelling);
46221    /// let x2 = Job::new().set_state(State::Cancelled);
46222    /// ```
46223    pub fn set_state<T: std::convert::Into<crate::model::job::State>>(mut self, v: T) -> Self {
46224        self.state = v.into();
46225        self
46226    }
46227
46228    /// Sets the value of [retry_count][crate::model::Job::retry_count].
46229    ///
46230    /// # Example
46231    /// ```ignore,no_run
46232    /// # use google_cloud_dataplex_v1::model::Job;
46233    /// let x = Job::new().set_retry_count(42_u32);
46234    /// ```
46235    pub fn set_retry_count<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
46236        self.retry_count = v.into();
46237        self
46238    }
46239
46240    /// Sets the value of [service][crate::model::Job::service].
46241    ///
46242    /// # Example
46243    /// ```ignore,no_run
46244    /// # use google_cloud_dataplex_v1::model::Job;
46245    /// use google_cloud_dataplex_v1::model::job::Service;
46246    /// let x0 = Job::new().set_service(Service::Dataproc);
46247    /// ```
46248    pub fn set_service<T: std::convert::Into<crate::model::job::Service>>(mut self, v: T) -> Self {
46249        self.service = v.into();
46250        self
46251    }
46252
46253    /// Sets the value of [service_job][crate::model::Job::service_job].
46254    ///
46255    /// # Example
46256    /// ```ignore,no_run
46257    /// # use google_cloud_dataplex_v1::model::Job;
46258    /// let x = Job::new().set_service_job("example");
46259    /// ```
46260    pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46261        self.service_job = v.into();
46262        self
46263    }
46264
46265    /// Sets the value of [message][crate::model::Job::message].
46266    ///
46267    /// # Example
46268    /// ```ignore,no_run
46269    /// # use google_cloud_dataplex_v1::model::Job;
46270    /// let x = Job::new().set_message("example");
46271    /// ```
46272    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46273        self.message = v.into();
46274        self
46275    }
46276
46277    /// Sets the value of [labels][crate::model::Job::labels].
46278    ///
46279    /// # Example
46280    /// ```ignore,no_run
46281    /// # use google_cloud_dataplex_v1::model::Job;
46282    /// let x = Job::new().set_labels([
46283    ///     ("key0", "abc"),
46284    ///     ("key1", "xyz"),
46285    /// ]);
46286    /// ```
46287    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
46288    where
46289        T: std::iter::IntoIterator<Item = (K, V)>,
46290        K: std::convert::Into<std::string::String>,
46291        V: std::convert::Into<std::string::String>,
46292    {
46293        use std::iter::Iterator;
46294        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
46295        self
46296    }
46297
46298    /// Sets the value of [trigger][crate::model::Job::trigger].
46299    ///
46300    /// # Example
46301    /// ```ignore,no_run
46302    /// # use google_cloud_dataplex_v1::model::Job;
46303    /// use google_cloud_dataplex_v1::model::job::Trigger;
46304    /// let x0 = Job::new().set_trigger(Trigger::TaskConfig);
46305    /// let x1 = Job::new().set_trigger(Trigger::RunRequest);
46306    /// ```
46307    pub fn set_trigger<T: std::convert::Into<crate::model::job::Trigger>>(mut self, v: T) -> Self {
46308        self.trigger = v.into();
46309        self
46310    }
46311
46312    /// Sets the value of [execution_spec][crate::model::Job::execution_spec].
46313    ///
46314    /// # Example
46315    /// ```ignore,no_run
46316    /// # use google_cloud_dataplex_v1::model::Job;
46317    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
46318    /// let x = Job::new().set_execution_spec(ExecutionSpec::default()/* use setters */);
46319    /// ```
46320    pub fn set_execution_spec<T>(mut self, v: T) -> Self
46321    where
46322        T: std::convert::Into<crate::model::task::ExecutionSpec>,
46323    {
46324        self.execution_spec = std::option::Option::Some(v.into());
46325        self
46326    }
46327
46328    /// Sets or clears the value of [execution_spec][crate::model::Job::execution_spec].
46329    ///
46330    /// # Example
46331    /// ```ignore,no_run
46332    /// # use google_cloud_dataplex_v1::model::Job;
46333    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
46334    /// let x = Job::new().set_or_clear_execution_spec(Some(ExecutionSpec::default()/* use setters */));
46335    /// let x = Job::new().set_or_clear_execution_spec(None::<ExecutionSpec>);
46336    /// ```
46337    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
46338    where
46339        T: std::convert::Into<crate::model::task::ExecutionSpec>,
46340    {
46341        self.execution_spec = v.map(|x| x.into());
46342        self
46343    }
46344}
46345
46346impl wkt::message::Message for Job {
46347    fn typename() -> &'static str {
46348        "type.googleapis.com/google.cloud.dataplex.v1.Job"
46349    }
46350}
46351
46352/// Defines additional types related to [Job].
46353pub mod job {
46354    #[allow(unused_imports)]
46355    use super::*;
46356
46357    ///
46358    /// # Working with unknown values
46359    ///
46360    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46361    /// additional enum variants at any time. Adding new variants is not considered
46362    /// a breaking change. Applications should write their code in anticipation of:
46363    ///
46364    /// - New values appearing in future releases of the client library, **and**
46365    /// - New values received dynamically, without application changes.
46366    ///
46367    /// Please consult the [Working with enums] section in the user guide for some
46368    /// guidelines.
46369    ///
46370    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46371    #[derive(Clone, Debug, PartialEq)]
46372    #[non_exhaustive]
46373    pub enum Service {
46374        /// Service used to run the job is unspecified.
46375        Unspecified,
46376        /// Dataproc service is used to run this job.
46377        Dataproc,
46378        /// If set, the enum was initialized with an unknown value.
46379        ///
46380        /// Applications can examine the value using [Service::value] or
46381        /// [Service::name].
46382        UnknownValue(service::UnknownValue),
46383    }
46384
46385    #[doc(hidden)]
46386    pub mod service {
46387        #[allow(unused_imports)]
46388        use super::*;
46389        #[derive(Clone, Debug, PartialEq)]
46390        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46391    }
46392
46393    impl Service {
46394        /// Gets the enum value.
46395        ///
46396        /// Returns `None` if the enum contains an unknown value deserialized from
46397        /// the string representation of enums.
46398        pub fn value(&self) -> std::option::Option<i32> {
46399            match self {
46400                Self::Unspecified => std::option::Option::Some(0),
46401                Self::Dataproc => std::option::Option::Some(1),
46402                Self::UnknownValue(u) => u.0.value(),
46403            }
46404        }
46405
46406        /// Gets the enum value as a string.
46407        ///
46408        /// Returns `None` if the enum contains an unknown value deserialized from
46409        /// the integer representation of enums.
46410        pub fn name(&self) -> std::option::Option<&str> {
46411            match self {
46412                Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
46413                Self::Dataproc => std::option::Option::Some("DATAPROC"),
46414                Self::UnknownValue(u) => u.0.name(),
46415            }
46416        }
46417    }
46418
46419    impl std::default::Default for Service {
46420        fn default() -> Self {
46421            use std::convert::From;
46422            Self::from(0)
46423        }
46424    }
46425
46426    impl std::fmt::Display for Service {
46427        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46428            wkt::internal::display_enum(f, self.name(), self.value())
46429        }
46430    }
46431
46432    impl std::convert::From<i32> for Service {
46433        fn from(value: i32) -> Self {
46434            match value {
46435                0 => Self::Unspecified,
46436                1 => Self::Dataproc,
46437                _ => Self::UnknownValue(service::UnknownValue(
46438                    wkt::internal::UnknownEnumValue::Integer(value),
46439                )),
46440            }
46441        }
46442    }
46443
46444    impl std::convert::From<&str> for Service {
46445        fn from(value: &str) -> Self {
46446            use std::string::ToString;
46447            match value {
46448                "SERVICE_UNSPECIFIED" => Self::Unspecified,
46449                "DATAPROC" => Self::Dataproc,
46450                _ => Self::UnknownValue(service::UnknownValue(
46451                    wkt::internal::UnknownEnumValue::String(value.to_string()),
46452                )),
46453            }
46454        }
46455    }
46456
46457    impl serde::ser::Serialize for Service {
46458        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46459        where
46460            S: serde::Serializer,
46461        {
46462            match self {
46463                Self::Unspecified => serializer.serialize_i32(0),
46464                Self::Dataproc => serializer.serialize_i32(1),
46465                Self::UnknownValue(u) => u.0.serialize(serializer),
46466            }
46467        }
46468    }
46469
46470    impl<'de> serde::de::Deserialize<'de> for Service {
46471        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46472        where
46473            D: serde::Deserializer<'de>,
46474        {
46475            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
46476                ".google.cloud.dataplex.v1.Job.Service",
46477            ))
46478        }
46479    }
46480
46481    ///
46482    /// # Working with unknown values
46483    ///
46484    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46485    /// additional enum variants at any time. Adding new variants is not considered
46486    /// a breaking change. Applications should write their code in anticipation of:
46487    ///
46488    /// - New values appearing in future releases of the client library, **and**
46489    /// - New values received dynamically, without application changes.
46490    ///
46491    /// Please consult the [Working with enums] section in the user guide for some
46492    /// guidelines.
46493    ///
46494    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46495    #[derive(Clone, Debug, PartialEq)]
46496    #[non_exhaustive]
46497    pub enum State {
46498        /// The job state is unknown.
46499        Unspecified,
46500        /// The job is running.
46501        Running,
46502        /// The job is cancelling.
46503        Cancelling,
46504        /// The job cancellation was successful.
46505        Cancelled,
46506        /// The job completed successfully.
46507        Succeeded,
46508        /// The job is no longer running due to an error.
46509        Failed,
46510        /// The job was cancelled outside of Dataplex Universal Catalog.
46511        Aborted,
46512        /// If set, the enum was initialized with an unknown value.
46513        ///
46514        /// Applications can examine the value using [State::value] or
46515        /// [State::name].
46516        UnknownValue(state::UnknownValue),
46517    }
46518
46519    #[doc(hidden)]
46520    pub mod state {
46521        #[allow(unused_imports)]
46522        use super::*;
46523        #[derive(Clone, Debug, PartialEq)]
46524        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46525    }
46526
46527    impl State {
46528        /// Gets the enum value.
46529        ///
46530        /// Returns `None` if the enum contains an unknown value deserialized from
46531        /// the string representation of enums.
46532        pub fn value(&self) -> std::option::Option<i32> {
46533            match self {
46534                Self::Unspecified => std::option::Option::Some(0),
46535                Self::Running => std::option::Option::Some(1),
46536                Self::Cancelling => std::option::Option::Some(2),
46537                Self::Cancelled => std::option::Option::Some(3),
46538                Self::Succeeded => std::option::Option::Some(4),
46539                Self::Failed => std::option::Option::Some(5),
46540                Self::Aborted => std::option::Option::Some(6),
46541                Self::UnknownValue(u) => u.0.value(),
46542            }
46543        }
46544
46545        /// Gets the enum value as a string.
46546        ///
46547        /// Returns `None` if the enum contains an unknown value deserialized from
46548        /// the integer representation of enums.
46549        pub fn name(&self) -> std::option::Option<&str> {
46550            match self {
46551                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
46552                Self::Running => std::option::Option::Some("RUNNING"),
46553                Self::Cancelling => std::option::Option::Some("CANCELLING"),
46554                Self::Cancelled => std::option::Option::Some("CANCELLED"),
46555                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
46556                Self::Failed => std::option::Option::Some("FAILED"),
46557                Self::Aborted => std::option::Option::Some("ABORTED"),
46558                Self::UnknownValue(u) => u.0.name(),
46559            }
46560        }
46561    }
46562
46563    impl std::default::Default for State {
46564        fn default() -> Self {
46565            use std::convert::From;
46566            Self::from(0)
46567        }
46568    }
46569
46570    impl std::fmt::Display for State {
46571        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46572            wkt::internal::display_enum(f, self.name(), self.value())
46573        }
46574    }
46575
46576    impl std::convert::From<i32> for State {
46577        fn from(value: i32) -> Self {
46578            match value {
46579                0 => Self::Unspecified,
46580                1 => Self::Running,
46581                2 => Self::Cancelling,
46582                3 => Self::Cancelled,
46583                4 => Self::Succeeded,
46584                5 => Self::Failed,
46585                6 => Self::Aborted,
46586                _ => Self::UnknownValue(state::UnknownValue(
46587                    wkt::internal::UnknownEnumValue::Integer(value),
46588                )),
46589            }
46590        }
46591    }
46592
46593    impl std::convert::From<&str> for State {
46594        fn from(value: &str) -> Self {
46595            use std::string::ToString;
46596            match value {
46597                "STATE_UNSPECIFIED" => Self::Unspecified,
46598                "RUNNING" => Self::Running,
46599                "CANCELLING" => Self::Cancelling,
46600                "CANCELLED" => Self::Cancelled,
46601                "SUCCEEDED" => Self::Succeeded,
46602                "FAILED" => Self::Failed,
46603                "ABORTED" => Self::Aborted,
46604                _ => Self::UnknownValue(state::UnknownValue(
46605                    wkt::internal::UnknownEnumValue::String(value.to_string()),
46606                )),
46607            }
46608        }
46609    }
46610
46611    impl serde::ser::Serialize for State {
46612        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46613        where
46614            S: serde::Serializer,
46615        {
46616            match self {
46617                Self::Unspecified => serializer.serialize_i32(0),
46618                Self::Running => serializer.serialize_i32(1),
46619                Self::Cancelling => serializer.serialize_i32(2),
46620                Self::Cancelled => serializer.serialize_i32(3),
46621                Self::Succeeded => serializer.serialize_i32(4),
46622                Self::Failed => serializer.serialize_i32(5),
46623                Self::Aborted => serializer.serialize_i32(6),
46624                Self::UnknownValue(u) => u.0.serialize(serializer),
46625            }
46626        }
46627    }
46628
46629    impl<'de> serde::de::Deserialize<'de> for State {
46630        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46631        where
46632            D: serde::Deserializer<'de>,
46633        {
46634            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
46635                ".google.cloud.dataplex.v1.Job.State",
46636            ))
46637        }
46638    }
46639
46640    /// Job execution trigger.
46641    ///
46642    /// # Working with unknown values
46643    ///
46644    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46645    /// additional enum variants at any time. Adding new variants is not considered
46646    /// a breaking change. Applications should write their code in anticipation of:
46647    ///
46648    /// - New values appearing in future releases of the client library, **and**
46649    /// - New values received dynamically, without application changes.
46650    ///
46651    /// Please consult the [Working with enums] section in the user guide for some
46652    /// guidelines.
46653    ///
46654    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46655    #[derive(Clone, Debug, PartialEq)]
46656    #[non_exhaustive]
46657    pub enum Trigger {
46658        /// The trigger is unspecified.
46659        Unspecified,
46660        /// The job was triggered by Dataplex Universal Catalog based on trigger spec
46661        /// from task definition.
46662        TaskConfig,
46663        /// The job was triggered by the explicit call of Task API.
46664        RunRequest,
46665        /// If set, the enum was initialized with an unknown value.
46666        ///
46667        /// Applications can examine the value using [Trigger::value] or
46668        /// [Trigger::name].
46669        UnknownValue(trigger::UnknownValue),
46670    }
46671
46672    #[doc(hidden)]
46673    pub mod trigger {
46674        #[allow(unused_imports)]
46675        use super::*;
46676        #[derive(Clone, Debug, PartialEq)]
46677        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46678    }
46679
46680    impl Trigger {
46681        /// Gets the enum value.
46682        ///
46683        /// Returns `None` if the enum contains an unknown value deserialized from
46684        /// the string representation of enums.
46685        pub fn value(&self) -> std::option::Option<i32> {
46686            match self {
46687                Self::Unspecified => std::option::Option::Some(0),
46688                Self::TaskConfig => std::option::Option::Some(1),
46689                Self::RunRequest => std::option::Option::Some(2),
46690                Self::UnknownValue(u) => u.0.value(),
46691            }
46692        }
46693
46694        /// Gets the enum value as a string.
46695        ///
46696        /// Returns `None` if the enum contains an unknown value deserialized from
46697        /// the integer representation of enums.
46698        pub fn name(&self) -> std::option::Option<&str> {
46699            match self {
46700                Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
46701                Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
46702                Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
46703                Self::UnknownValue(u) => u.0.name(),
46704            }
46705        }
46706    }
46707
46708    impl std::default::Default for Trigger {
46709        fn default() -> Self {
46710            use std::convert::From;
46711            Self::from(0)
46712        }
46713    }
46714
46715    impl std::fmt::Display for Trigger {
46716        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46717            wkt::internal::display_enum(f, self.name(), self.value())
46718        }
46719    }
46720
46721    impl std::convert::From<i32> for Trigger {
46722        fn from(value: i32) -> Self {
46723            match value {
46724                0 => Self::Unspecified,
46725                1 => Self::TaskConfig,
46726                2 => Self::RunRequest,
46727                _ => Self::UnknownValue(trigger::UnknownValue(
46728                    wkt::internal::UnknownEnumValue::Integer(value),
46729                )),
46730            }
46731        }
46732    }
46733
46734    impl std::convert::From<&str> for Trigger {
46735        fn from(value: &str) -> Self {
46736            use std::string::ToString;
46737            match value {
46738                "TRIGGER_UNSPECIFIED" => Self::Unspecified,
46739                "TASK_CONFIG" => Self::TaskConfig,
46740                "RUN_REQUEST" => Self::RunRequest,
46741                _ => Self::UnknownValue(trigger::UnknownValue(
46742                    wkt::internal::UnknownEnumValue::String(value.to_string()),
46743                )),
46744            }
46745        }
46746    }
46747
46748    impl serde::ser::Serialize for Trigger {
46749        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46750        where
46751            S: serde::Serializer,
46752        {
46753            match self {
46754                Self::Unspecified => serializer.serialize_i32(0),
46755                Self::TaskConfig => serializer.serialize_i32(1),
46756                Self::RunRequest => serializer.serialize_i32(2),
46757                Self::UnknownValue(u) => u.0.serialize(serializer),
46758            }
46759        }
46760    }
46761
46762    impl<'de> serde::de::Deserialize<'de> for Trigger {
46763        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46764        where
46765            D: serde::Deserializer<'de>,
46766        {
46767            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
46768                ".google.cloud.dataplex.v1.Job.Trigger",
46769            ))
46770        }
46771    }
46772}
46773
46774/// View for controlling which parts of an entry are to be returned.
46775///
46776/// # Working with unknown values
46777///
46778/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46779/// additional enum variants at any time. Adding new variants is not considered
46780/// a breaking change. Applications should write their code in anticipation of:
46781///
46782/// - New values appearing in future releases of the client library, **and**
46783/// - New values received dynamically, without application changes.
46784///
46785/// Please consult the [Working with enums] section in the user guide for some
46786/// guidelines.
46787///
46788/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46789#[derive(Clone, Debug, PartialEq)]
46790#[non_exhaustive]
46791pub enum EntryView {
46792    /// Unspecified EntryView. Defaults to FULL.
46793    Unspecified,
46794    /// Returns entry only, without aspects.
46795    Basic,
46796    /// Returns all required aspects as well as the keys of all non-required
46797    /// aspects.
46798    Full,
46799    /// Returns aspects matching custom fields in GetEntryRequest. If the number of
46800    /// aspects exceeds 100, the first 100 will be returned.
46801    Custom,
46802    All,
46803    /// If set, the enum was initialized with an unknown value.
46804    ///
46805    /// Applications can examine the value using [EntryView::value] or
46806    /// [EntryView::name].
46807    UnknownValue(entry_view::UnknownValue),
46808}
46809
46810#[doc(hidden)]
46811pub mod entry_view {
46812    #[allow(unused_imports)]
46813    use super::*;
46814    #[derive(Clone, Debug, PartialEq)]
46815    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46816}
46817
46818impl EntryView {
46819    /// Gets the enum value.
46820    ///
46821    /// Returns `None` if the enum contains an unknown value deserialized from
46822    /// the string representation of enums.
46823    pub fn value(&self) -> std::option::Option<i32> {
46824        match self {
46825            Self::Unspecified => std::option::Option::Some(0),
46826            Self::Basic => std::option::Option::Some(1),
46827            Self::Full => std::option::Option::Some(2),
46828            Self::Custom => std::option::Option::Some(3),
46829            Self::All => std::option::Option::Some(4),
46830            Self::UnknownValue(u) => u.0.value(),
46831        }
46832    }
46833
46834    /// Gets the enum value as a string.
46835    ///
46836    /// Returns `None` if the enum contains an unknown value deserialized from
46837    /// the integer representation of enums.
46838    pub fn name(&self) -> std::option::Option<&str> {
46839        match self {
46840            Self::Unspecified => std::option::Option::Some("ENTRY_VIEW_UNSPECIFIED"),
46841            Self::Basic => std::option::Option::Some("BASIC"),
46842            Self::Full => std::option::Option::Some("FULL"),
46843            Self::Custom => std::option::Option::Some("CUSTOM"),
46844            Self::All => std::option::Option::Some("ALL"),
46845            Self::UnknownValue(u) => u.0.name(),
46846        }
46847    }
46848}
46849
46850impl std::default::Default for EntryView {
46851    fn default() -> Self {
46852        use std::convert::From;
46853        Self::from(0)
46854    }
46855}
46856
46857impl std::fmt::Display for EntryView {
46858    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46859        wkt::internal::display_enum(f, self.name(), self.value())
46860    }
46861}
46862
46863impl std::convert::From<i32> for EntryView {
46864    fn from(value: i32) -> Self {
46865        match value {
46866            0 => Self::Unspecified,
46867            1 => Self::Basic,
46868            2 => Self::Full,
46869            3 => Self::Custom,
46870            4 => Self::All,
46871            _ => Self::UnknownValue(entry_view::UnknownValue(
46872                wkt::internal::UnknownEnumValue::Integer(value),
46873            )),
46874        }
46875    }
46876}
46877
46878impl std::convert::From<&str> for EntryView {
46879    fn from(value: &str) -> Self {
46880        use std::string::ToString;
46881        match value {
46882            "ENTRY_VIEW_UNSPECIFIED" => Self::Unspecified,
46883            "BASIC" => Self::Basic,
46884            "FULL" => Self::Full,
46885            "CUSTOM" => Self::Custom,
46886            "ALL" => Self::All,
46887            _ => Self::UnknownValue(entry_view::UnknownValue(
46888                wkt::internal::UnknownEnumValue::String(value.to_string()),
46889            )),
46890        }
46891    }
46892}
46893
46894impl serde::ser::Serialize for EntryView {
46895    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46896    where
46897        S: serde::Serializer,
46898    {
46899        match self {
46900            Self::Unspecified => serializer.serialize_i32(0),
46901            Self::Basic => serializer.serialize_i32(1),
46902            Self::Full => serializer.serialize_i32(2),
46903            Self::Custom => serializer.serialize_i32(3),
46904            Self::All => serializer.serialize_i32(4),
46905            Self::UnknownValue(u) => u.0.serialize(serializer),
46906        }
46907    }
46908}
46909
46910impl<'de> serde::de::Deserialize<'de> for EntryView {
46911    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46912    where
46913        D: serde::Deserializer<'de>,
46914    {
46915        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntryView>::new(
46916            ".google.cloud.dataplex.v1.EntryView",
46917        ))
46918    }
46919}
46920
46921/// Denotes the transfer status of a resource. It is unspecified for resources
46922/// created from Dataplex API.
46923///
46924/// # Working with unknown values
46925///
46926/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46927/// additional enum variants at any time. Adding new variants is not considered
46928/// a breaking change. Applications should write their code in anticipation of:
46929///
46930/// - New values appearing in future releases of the client library, **and**
46931/// - New values received dynamically, without application changes.
46932///
46933/// Please consult the [Working with enums] section in the user guide for some
46934/// guidelines.
46935///
46936/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46937#[derive(Clone, Debug, PartialEq)]
46938#[non_exhaustive]
46939pub enum TransferStatus {
46940    /// The default value. It is set for resources that were not subject for
46941    /// migration from Data Catalog service.
46942    Unspecified,
46943    /// Indicates that a resource was migrated from Data Catalog service but it
46944    /// hasn't been transferred yet. In particular the resource cannot be updated
46945    /// from Dataplex API.
46946    Migrated,
46947    /// Indicates that a resource was transferred from Data Catalog service. The
46948    /// resource can only be updated from Dataplex API.
46949    Transferred,
46950    /// If set, the enum was initialized with an unknown value.
46951    ///
46952    /// Applications can examine the value using [TransferStatus::value] or
46953    /// [TransferStatus::name].
46954    UnknownValue(transfer_status::UnknownValue),
46955}
46956
46957#[doc(hidden)]
46958pub mod transfer_status {
46959    #[allow(unused_imports)]
46960    use super::*;
46961    #[derive(Clone, Debug, PartialEq)]
46962    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46963}
46964
46965impl TransferStatus {
46966    /// Gets the enum value.
46967    ///
46968    /// Returns `None` if the enum contains an unknown value deserialized from
46969    /// the string representation of enums.
46970    pub fn value(&self) -> std::option::Option<i32> {
46971        match self {
46972            Self::Unspecified => std::option::Option::Some(0),
46973            Self::Migrated => std::option::Option::Some(1),
46974            Self::Transferred => std::option::Option::Some(2),
46975            Self::UnknownValue(u) => u.0.value(),
46976        }
46977    }
46978
46979    /// Gets the enum value as a string.
46980    ///
46981    /// Returns `None` if the enum contains an unknown value deserialized from
46982    /// the integer representation of enums.
46983    pub fn name(&self) -> std::option::Option<&str> {
46984        match self {
46985            Self::Unspecified => std::option::Option::Some("TRANSFER_STATUS_UNSPECIFIED"),
46986            Self::Migrated => std::option::Option::Some("TRANSFER_STATUS_MIGRATED"),
46987            Self::Transferred => std::option::Option::Some("TRANSFER_STATUS_TRANSFERRED"),
46988            Self::UnknownValue(u) => u.0.name(),
46989        }
46990    }
46991}
46992
46993impl std::default::Default for TransferStatus {
46994    fn default() -> Self {
46995        use std::convert::From;
46996        Self::from(0)
46997    }
46998}
46999
47000impl std::fmt::Display for TransferStatus {
47001    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47002        wkt::internal::display_enum(f, self.name(), self.value())
47003    }
47004}
47005
47006impl std::convert::From<i32> for TransferStatus {
47007    fn from(value: i32) -> Self {
47008        match value {
47009            0 => Self::Unspecified,
47010            1 => Self::Migrated,
47011            2 => Self::Transferred,
47012            _ => Self::UnknownValue(transfer_status::UnknownValue(
47013                wkt::internal::UnknownEnumValue::Integer(value),
47014            )),
47015        }
47016    }
47017}
47018
47019impl std::convert::From<&str> for TransferStatus {
47020    fn from(value: &str) -> Self {
47021        use std::string::ToString;
47022        match value {
47023            "TRANSFER_STATUS_UNSPECIFIED" => Self::Unspecified,
47024            "TRANSFER_STATUS_MIGRATED" => Self::Migrated,
47025            "TRANSFER_STATUS_TRANSFERRED" => Self::Transferred,
47026            _ => Self::UnknownValue(transfer_status::UnknownValue(
47027                wkt::internal::UnknownEnumValue::String(value.to_string()),
47028            )),
47029        }
47030    }
47031}
47032
47033impl serde::ser::Serialize for TransferStatus {
47034    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47035    where
47036        S: serde::Serializer,
47037    {
47038        match self {
47039            Self::Unspecified => serializer.serialize_i32(0),
47040            Self::Migrated => serializer.serialize_i32(1),
47041            Self::Transferred => serializer.serialize_i32(2),
47042            Self::UnknownValue(u) => u.0.serialize(serializer),
47043        }
47044    }
47045}
47046
47047impl<'de> serde::de::Deserialize<'de> for TransferStatus {
47048    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47049    where
47050        D: serde::Deserializer<'de>,
47051    {
47052        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TransferStatus>::new(
47053            ".google.cloud.dataplex.v1.TransferStatus",
47054        ))
47055    }
47056}
47057
47058/// The type of data scan.
47059///
47060/// # Working with unknown values
47061///
47062/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
47063/// additional enum variants at any time. Adding new variants is not considered
47064/// a breaking change. Applications should write their code in anticipation of:
47065///
47066/// - New values appearing in future releases of the client library, **and**
47067/// - New values received dynamically, without application changes.
47068///
47069/// Please consult the [Working with enums] section in the user guide for some
47070/// guidelines.
47071///
47072/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
47073#[derive(Clone, Debug, PartialEq)]
47074#[non_exhaustive]
47075pub enum DataScanType {
47076    /// The data scan type is unspecified.
47077    Unspecified,
47078    /// Data quality scan.
47079    DataQuality,
47080    /// Data profile scan.
47081    DataProfile,
47082    /// Data discovery scan.
47083    DataDiscovery,
47084    /// Data documentation scan.
47085    DataDocumentation,
47086    /// If set, the enum was initialized with an unknown value.
47087    ///
47088    /// Applications can examine the value using [DataScanType::value] or
47089    /// [DataScanType::name].
47090    UnknownValue(data_scan_type::UnknownValue),
47091}
47092
47093#[doc(hidden)]
47094pub mod data_scan_type {
47095    #[allow(unused_imports)]
47096    use super::*;
47097    #[derive(Clone, Debug, PartialEq)]
47098    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47099}
47100
47101impl DataScanType {
47102    /// Gets the enum value.
47103    ///
47104    /// Returns `None` if the enum contains an unknown value deserialized from
47105    /// the string representation of enums.
47106    pub fn value(&self) -> std::option::Option<i32> {
47107        match self {
47108            Self::Unspecified => std::option::Option::Some(0),
47109            Self::DataQuality => std::option::Option::Some(1),
47110            Self::DataProfile => std::option::Option::Some(2),
47111            Self::DataDiscovery => std::option::Option::Some(3),
47112            Self::DataDocumentation => std::option::Option::Some(4),
47113            Self::UnknownValue(u) => u.0.value(),
47114        }
47115    }
47116
47117    /// Gets the enum value as a string.
47118    ///
47119    /// Returns `None` if the enum contains an unknown value deserialized from
47120    /// the integer representation of enums.
47121    pub fn name(&self) -> std::option::Option<&str> {
47122        match self {
47123            Self::Unspecified => std::option::Option::Some("DATA_SCAN_TYPE_UNSPECIFIED"),
47124            Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
47125            Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
47126            Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
47127            Self::DataDocumentation => std::option::Option::Some("DATA_DOCUMENTATION"),
47128            Self::UnknownValue(u) => u.0.name(),
47129        }
47130    }
47131}
47132
47133impl std::default::Default for DataScanType {
47134    fn default() -> Self {
47135        use std::convert::From;
47136        Self::from(0)
47137    }
47138}
47139
47140impl std::fmt::Display for DataScanType {
47141    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47142        wkt::internal::display_enum(f, self.name(), self.value())
47143    }
47144}
47145
47146impl std::convert::From<i32> for DataScanType {
47147    fn from(value: i32) -> Self {
47148        match value {
47149            0 => Self::Unspecified,
47150            1 => Self::DataQuality,
47151            2 => Self::DataProfile,
47152            3 => Self::DataDiscovery,
47153            4 => Self::DataDocumentation,
47154            _ => Self::UnknownValue(data_scan_type::UnknownValue(
47155                wkt::internal::UnknownEnumValue::Integer(value),
47156            )),
47157        }
47158    }
47159}
47160
47161impl std::convert::From<&str> for DataScanType {
47162    fn from(value: &str) -> Self {
47163        use std::string::ToString;
47164        match value {
47165            "DATA_SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
47166            "DATA_QUALITY" => Self::DataQuality,
47167            "DATA_PROFILE" => Self::DataProfile,
47168            "DATA_DISCOVERY" => Self::DataDiscovery,
47169            "DATA_DOCUMENTATION" => Self::DataDocumentation,
47170            _ => Self::UnknownValue(data_scan_type::UnknownValue(
47171                wkt::internal::UnknownEnumValue::String(value.to_string()),
47172            )),
47173        }
47174    }
47175}
47176
47177impl serde::ser::Serialize for DataScanType {
47178    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47179    where
47180        S: serde::Serializer,
47181    {
47182        match self {
47183            Self::Unspecified => serializer.serialize_i32(0),
47184            Self::DataQuality => serializer.serialize_i32(1),
47185            Self::DataProfile => serializer.serialize_i32(2),
47186            Self::DataDiscovery => serializer.serialize_i32(3),
47187            Self::DataDocumentation => serializer.serialize_i32(4),
47188            Self::UnknownValue(u) => u.0.serialize(serializer),
47189        }
47190    }
47191}
47192
47193impl<'de> serde::de::Deserialize<'de> for DataScanType {
47194    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47195    where
47196        D: serde::Deserializer<'de>,
47197    {
47198        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanType>::new(
47199            ".google.cloud.dataplex.v1.DataScanType",
47200        ))
47201    }
47202}
47203
47204/// Identifies the cloud system that manages the data storage.
47205///
47206/// # Working with unknown values
47207///
47208/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
47209/// additional enum variants at any time. Adding new variants is not considered
47210/// a breaking change. Applications should write their code in anticipation of:
47211///
47212/// - New values appearing in future releases of the client library, **and**
47213/// - New values received dynamically, without application changes.
47214///
47215/// Please consult the [Working with enums] section in the user guide for some
47216/// guidelines.
47217///
47218/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
47219#[derive(Clone, Debug, PartialEq)]
47220#[non_exhaustive]
47221pub enum StorageSystem {
47222    /// Storage system unspecified.
47223    Unspecified,
47224    /// The entity data is contained within a Cloud Storage bucket.
47225    CloudStorage,
47226    /// The entity data is contained within a BigQuery dataset.
47227    Bigquery,
47228    /// If set, the enum was initialized with an unknown value.
47229    ///
47230    /// Applications can examine the value using [StorageSystem::value] or
47231    /// [StorageSystem::name].
47232    UnknownValue(storage_system::UnknownValue),
47233}
47234
47235#[doc(hidden)]
47236pub mod storage_system {
47237    #[allow(unused_imports)]
47238    use super::*;
47239    #[derive(Clone, Debug, PartialEq)]
47240    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47241}
47242
47243impl StorageSystem {
47244    /// Gets the enum value.
47245    ///
47246    /// Returns `None` if the enum contains an unknown value deserialized from
47247    /// the string representation of enums.
47248    pub fn value(&self) -> std::option::Option<i32> {
47249        match self {
47250            Self::Unspecified => std::option::Option::Some(0),
47251            Self::CloudStorage => std::option::Option::Some(1),
47252            Self::Bigquery => std::option::Option::Some(2),
47253            Self::UnknownValue(u) => u.0.value(),
47254        }
47255    }
47256
47257    /// Gets the enum value as a string.
47258    ///
47259    /// Returns `None` if the enum contains an unknown value deserialized from
47260    /// the integer representation of enums.
47261    pub fn name(&self) -> std::option::Option<&str> {
47262        match self {
47263            Self::Unspecified => std::option::Option::Some("STORAGE_SYSTEM_UNSPECIFIED"),
47264            Self::CloudStorage => std::option::Option::Some("CLOUD_STORAGE"),
47265            Self::Bigquery => std::option::Option::Some("BIGQUERY"),
47266            Self::UnknownValue(u) => u.0.name(),
47267        }
47268    }
47269}
47270
47271impl std::default::Default for StorageSystem {
47272    fn default() -> Self {
47273        use std::convert::From;
47274        Self::from(0)
47275    }
47276}
47277
47278impl std::fmt::Display for StorageSystem {
47279    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47280        wkt::internal::display_enum(f, self.name(), self.value())
47281    }
47282}
47283
47284impl std::convert::From<i32> for StorageSystem {
47285    fn from(value: i32) -> Self {
47286        match value {
47287            0 => Self::Unspecified,
47288            1 => Self::CloudStorage,
47289            2 => Self::Bigquery,
47290            _ => Self::UnknownValue(storage_system::UnknownValue(
47291                wkt::internal::UnknownEnumValue::Integer(value),
47292            )),
47293        }
47294    }
47295}
47296
47297impl std::convert::From<&str> for StorageSystem {
47298    fn from(value: &str) -> Self {
47299        use std::string::ToString;
47300        match value {
47301            "STORAGE_SYSTEM_UNSPECIFIED" => Self::Unspecified,
47302            "CLOUD_STORAGE" => Self::CloudStorage,
47303            "BIGQUERY" => Self::Bigquery,
47304            _ => Self::UnknownValue(storage_system::UnknownValue(
47305                wkt::internal::UnknownEnumValue::String(value.to_string()),
47306            )),
47307        }
47308    }
47309}
47310
47311impl serde::ser::Serialize for StorageSystem {
47312    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47313    where
47314        S: serde::Serializer,
47315    {
47316        match self {
47317            Self::Unspecified => serializer.serialize_i32(0),
47318            Self::CloudStorage => serializer.serialize_i32(1),
47319            Self::Bigquery => serializer.serialize_i32(2),
47320            Self::UnknownValue(u) => u.0.serialize(serializer),
47321        }
47322    }
47323}
47324
47325impl<'de> serde::de::Deserialize<'de> for StorageSystem {
47326    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47327    where
47328        D: serde::Deserializer<'de>,
47329    {
47330        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageSystem>::new(
47331            ".google.cloud.dataplex.v1.StorageSystem",
47332        ))
47333    }
47334}
47335
47336/// State of a resource.
47337///
47338/// # Working with unknown values
47339///
47340/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
47341/// additional enum variants at any time. Adding new variants is not considered
47342/// a breaking change. Applications should write their code in anticipation of:
47343///
47344/// - New values appearing in future releases of the client library, **and**
47345/// - New values received dynamically, without application changes.
47346///
47347/// Please consult the [Working with enums] section in the user guide for some
47348/// guidelines.
47349///
47350/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
47351#[derive(Clone, Debug, PartialEq)]
47352#[non_exhaustive]
47353pub enum State {
47354    /// State is not specified.
47355    Unspecified,
47356    /// Resource is active, i.e., ready to use.
47357    Active,
47358    /// Resource is under creation.
47359    Creating,
47360    /// Resource is under deletion.
47361    Deleting,
47362    /// Resource is active but has unresolved actions.
47363    ActionRequired,
47364    /// If set, the enum was initialized with an unknown value.
47365    ///
47366    /// Applications can examine the value using [State::value] or
47367    /// [State::name].
47368    UnknownValue(state::UnknownValue),
47369}
47370
47371#[doc(hidden)]
47372pub mod state {
47373    #[allow(unused_imports)]
47374    use super::*;
47375    #[derive(Clone, Debug, PartialEq)]
47376    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47377}
47378
47379impl State {
47380    /// Gets the enum value.
47381    ///
47382    /// Returns `None` if the enum contains an unknown value deserialized from
47383    /// the string representation of enums.
47384    pub fn value(&self) -> std::option::Option<i32> {
47385        match self {
47386            Self::Unspecified => std::option::Option::Some(0),
47387            Self::Active => std::option::Option::Some(1),
47388            Self::Creating => std::option::Option::Some(2),
47389            Self::Deleting => std::option::Option::Some(3),
47390            Self::ActionRequired => std::option::Option::Some(4),
47391            Self::UnknownValue(u) => u.0.value(),
47392        }
47393    }
47394
47395    /// Gets the enum value as a string.
47396    ///
47397    /// Returns `None` if the enum contains an unknown value deserialized from
47398    /// the integer representation of enums.
47399    pub fn name(&self) -> std::option::Option<&str> {
47400        match self {
47401            Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
47402            Self::Active => std::option::Option::Some("ACTIVE"),
47403            Self::Creating => std::option::Option::Some("CREATING"),
47404            Self::Deleting => std::option::Option::Some("DELETING"),
47405            Self::ActionRequired => std::option::Option::Some("ACTION_REQUIRED"),
47406            Self::UnknownValue(u) => u.0.name(),
47407        }
47408    }
47409}
47410
47411impl std::default::Default for State {
47412    fn default() -> Self {
47413        use std::convert::From;
47414        Self::from(0)
47415    }
47416}
47417
47418impl std::fmt::Display for State {
47419    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47420        wkt::internal::display_enum(f, self.name(), self.value())
47421    }
47422}
47423
47424impl std::convert::From<i32> for State {
47425    fn from(value: i32) -> Self {
47426        match value {
47427            0 => Self::Unspecified,
47428            1 => Self::Active,
47429            2 => Self::Creating,
47430            3 => Self::Deleting,
47431            4 => Self::ActionRequired,
47432            _ => Self::UnknownValue(state::UnknownValue(
47433                wkt::internal::UnknownEnumValue::Integer(value),
47434            )),
47435        }
47436    }
47437}
47438
47439impl std::convert::From<&str> for State {
47440    fn from(value: &str) -> Self {
47441        use std::string::ToString;
47442        match value {
47443            "STATE_UNSPECIFIED" => Self::Unspecified,
47444            "ACTIVE" => Self::Active,
47445            "CREATING" => Self::Creating,
47446            "DELETING" => Self::Deleting,
47447            "ACTION_REQUIRED" => Self::ActionRequired,
47448            _ => Self::UnknownValue(state::UnknownValue(
47449                wkt::internal::UnknownEnumValue::String(value.to_string()),
47450            )),
47451        }
47452    }
47453}
47454
47455impl serde::ser::Serialize for State {
47456    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47457    where
47458        S: serde::Serializer,
47459    {
47460        match self {
47461            Self::Unspecified => serializer.serialize_i32(0),
47462            Self::Active => serializer.serialize_i32(1),
47463            Self::Creating => serializer.serialize_i32(2),
47464            Self::Deleting => serializer.serialize_i32(3),
47465            Self::ActionRequired => serializer.serialize_i32(4),
47466            Self::UnknownValue(u) => u.0.serialize(serializer),
47467        }
47468    }
47469}
47470
47471impl<'de> serde::de::Deserialize<'de> for State {
47472    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47473    where
47474        D: serde::Deserializer<'de>,
47475    {
47476        deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
47477            ".google.cloud.dataplex.v1.State",
47478        ))
47479    }
47480}